Best way to do it would probably be to use a find method. If you're trying to use /window -a for a very long filename that starts out with something like:

Send Riamus This_Is_A_Test_Of_The_Emergency_Broadcast_System_And_You_Have_Failed_The_Test_So_Please_Part_This_Channel.mp3

Then you can have it cycle through all DCC windows and search for $1 and $2 and something like $mid($3,1,50).

Then you'll be mostly accurate as it is unlikely that you will have more than one window with GET/SEND correct and the nick correct and the first 50 letters of the filename. Granted, this doesn't work for your example where the first 90 numbers are all the same, but I don't think you can do a lot about that one.

You can make this limit itself by checking the $len of the filename and only use this method on windows that are longer than a certain amount (eg. 89).

You could easily do something such as first seeing if the window name you're trying to use /window on is over 89 letters. If not, then just use the regular /window command. If it is, then use this other method to search.

That said, mIRC should be set up to allow longer text. I wouldn't mind seeing mIRC be able to have longer window names (or at the very least, name the window with something like the first 85 characters of the name and then if there are more than one with the same starting letters, put a (1) or (2) or whatever on the window name).

I also would like to see the ability to read in a longer line of text into a standard variable (mainly for sockets). Yes, you can use binvars for most things, but I'd prefer to just be able to use normal vars for sites rather than having to change to binvars on certain sites. And I don't really want to use binvars all the time.

As another note, I'd like the ability to tell mIRC in a sockread event that if a line of text matches, to then get the text X lines down and store that in some way. Obviously, this would have to be queued as you have to read the site one line at a time, but it could be very useful for site that have lines that are very similar.

Basic Example of downloaded source code (after stripping html):

Current Temp:
54F

Yesterday's Temp:
63F

Tomorrow's Temp:
61F

As I said, this is a basic example... sometimes you want a few lines down. Anyhow, you can't just use

if (%socktext == Current Temp:) { set %currenttemp _____ }

...because it's on the next line.

Yes, there are ways to do this, but they are tedious. It would simply be nice to have some way to put that command in queue telling it how many lines to wait.

Example:

if (%socktext == Current Temp:) { set %currenttemp $sockline(1) }

Where 1 is the number of lines to go down before setting the variable.

Just a thought.


Invision Support
#Invision on irc.irchighway.net