mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
Couple of questions... greatful for any help, as much detail as you can give is good.

Thinking on scripts that store and call data.

1. What exactly is the difference between an ini file and a txt file? What are advantages and disadvantages of both? how do I go about using .ini files to save data?

2. A friend gave me a script that pulls data from an online database, then writes it to a .txt file, then writes it to the channel it was called from. When I asked him why bother writing it to the txt file he said the guy who wrote it told him it pastes faster. Does that make any sense, and if so why?

3. Say I want a script that stores and calls A LOT of info (like for an encyclopedia bot) how would it be best to store that info? Would it be easier on my client to pull that info from an online database or from a txt file? As it is im using txt files for everything, my script is a popular one, being used a lot and working hard to keep up. Im wondering if it would be better to use an online database instead.

mIRC and browsers...

4. I want a timer to open a link in the active browser window (as opposed to a new window) and keep it minimized. From what I can tell /url has a switch to open it in the active window, and /run has a switch to minimize the window that is opened, but neither has both. Is there any way I can do both? Or... can I use /run to refresh a specific browser window, and if so how?

5. Some websites track where traffic came from right? So when you follow a link from irc what can they see?

6. Is it possible to have a script somehow read the data that was loaded in a browser window (like from a cache file) and how would I do that?

Last question...

7. I have a script (running on a second client) that writes to an online database on remote command. For some reason recently it stopped responding to me, but it still responds to other people, and if I change my nick it works again. This happens sometimes, and wont work until I change my nick, but then sometimes it works fine, and sometimes it just wont respond to anyone. This only started happening recently, and I havent changed the script at all, I dont have myself on ignore, and other remote scripts work fine. I cant even begin to understand why this is happening. Whatever it is it has to do with what nick Im using. If you can think of a possible reason why this is happening people do let me know? Otherwise I'll just have to assume it doesnt like me :P



Thanks in advance for any help.
I know thats a lot but these are all questions I have thought about for a while and haven't yet come up with the answers. I know Im asking a lot but as much detail as possible will help a bunch.
smile


Warning: noob on the loose
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) The basic difference between ini files and txt files, is the format in which the information is saved.
1a) A txt file can save the information without needing anything special.
eg: /write text.txt Hello there
Would put the line Hello there as the last line of the file text.txt (of course, if the file doesn't have anything in it, then the last line is also the first line)
1b) An ini file requires the information to be provided in a specific order
eg: /writeini Ops.ini $chan $nick $address($nick,5)
Might write something like
[#help]
RusselB RusselB!ident@host.com

2) I find this very hard to believe, since it means that the information has to go from an electronic source (internet) to a physical storage medium (hard drive), then from the hard drive to mIRC (which is also an electronic source).
There's no way you're going to be able to do that faster than going from the internet to mIRC.
Most hard drives have a rotational speed of 7200 rpm, which means that the disc is moving at a rate of 7200 rotations per minute . If your hard drive is 3 1/2", then it's moving at a rate of about 2100 feet per minute. Compare this with the electronic format, which runs at about the speed of light which is about 186,282.397 feet per second. It doesn't take a genius to see that the hard drive speed is a lot slower.

3) Scrap the text files, scrap the ini files, use a hash table or online database. I can't give you an honest opinion as to which of those would be your best bet, as I don't use any online databases for storing information (accessing, yes, but not storing)

4) /run is usually used to run a program that's on your computer. Using /run with your web browser would just open up a new running of your web browser (minimized or not is irrelevant at this point). If there is a way of doing this via mIRC, then I'm not aware of it.

5) No idea, so I'm not even going to try to answer this one

6) Yes, you'll need to read up on sockets

7) since this is a temporary condition, I'm suspecting that the second client is connecting to a different server on the same network, and that there's a lag and/or (at times) a network split (which is when two servers stop being able to communicate with each other). If this is the case, one way to reduce the problem (you can't eliminate it completely) is to ensure that both your client and the secondary client are connected to the same server.

I hope I was able to answer some of your questions in sufficient detail, and the one's that I wasn't able to answer, someone else will be able to.

Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
Thanks heaps smile

With question #7... The problem with that is it wont respond at all for me until I change my nick, at which point it works immediately and perfectly with no lag. I have basically the same script set up to write to a txt file instead, when I have both script loaded, the one that works with the text file responds, and the one that writes to an online database doesnt, then I change my nick and they both work.

Its about the nick, and its only that script, and nowhere in there does it have anything about not responding to particular people.

hehe
I know it makes no sense but its true :P
At this point I cant seem to get my head around hash tables, and I know nothing about php or mysql, so I guess I have work to do.

anyway much appreciated, yes you helped smile


Warning: noob on the loose
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There are a number of tutorials available on hash tables I suggest checking mIRC.net

Additionally once you've gotten started, if you run into a problem, several of the helpers here are very familiar with hash tables and are more than willing to assist you in getting yours working.

As a closing note to this post, I don't think this can be said enough, but use the help file, read it, re-read it, then read it again before you try anything, and (if possible) have a copy open for you to reference on the run.

Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
Thankyou smile
I will and I do and all that.
This place rox!
You rox!


Warning: noob on the loose
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Quote:
5. Some websites track where traffic came from right? So when you follow a link from irc what can they see?

The exact same thing as when you type the link in the URL editbox of your browser, i.e. that you did not get there by clicking a link on another webpage.


Saturn, QuakeNet staff
Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
sweet thanks smile


Warning: noob on the loose

Link Copied to Clipboard