mIRC Home    About    Download    Register    News    Help

Print Thread
#120078 13/05/05 09:51 AM
Joined: Jul 2003
Posts: 19
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 19
i don' t know if this has been mentioned before (maybe it has)... anyway, i got a dcc last day and when i tried to change the active window to view the dcc window i tried /window -a "Get RD Armin_van_Buuren_presents_-_A_State_of_Trance_Episode_194_(www.uktrancealliance.com)"
but the only thing i got was a /window: invalid parameters... i know it works ok with short filenames. maybe its the () in filename that create a prob or just the large filename, i don' t know... is there anything i can do to activate such windows?


"Three words of destruction: Shun-Goku-Satsu"
#120079 13/05/05 10:38 AM
Joined: Nov 2003
Posts: 157
Vogon poet
Offline
Vogon poet
Joined: Nov 2003
Posts: 157
I have the same problem with my script. I think that this is a limitation of the /window command.

My solution for the script is:

ctcp &*:DCC:*:{ if ($1 == SEND) && ($len($nopath($filename)) > 79) { haltdef | .notice $nick File name too long. It was 79 character max. } | }

Someone know a solution to solve problem with Long filename? frown

#120080 13/05/05 11:31 PM
Joined: Jul 2003
Posts: 19
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 19
and what about if you send files with long names? i wanna know, cause i' m making a custom switchbar... i have a dcc alias checking for the filename but what if you use mIRC' s menus to dcc someone...?


"Three words of destruction: Shun-Goku-Satsu"
#120081 13/05/05 11:33 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You could rename sent file to make it a short filename, maybe after creating the original long filename and getting its shortfilename match to use as the short filename.

#120082 14/05/05 07:20 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I cheked something and was right about what i thought the problem might be. Custom window names can be only 89 characters long, 90 including the @, and when decideding what window to go to looks like the /WINDOW command truncates whats between the " " to a max of 90 characters, if that 90 character window name doesnt exist then it errors. So if there is a file with a longfilename that makes the window over 90 charcters (note the SEND takes 5 characters S E N D SPACE or GET 4 and the nick also takes its number of characters + 1) then you cant access it, using /WINDOW -a " ".

An oddity occurs if for instance
you do
/write -c 12345678901234567890123456789012345678901234567890123456789012345678901234567890 tempfile
/write -c 123456789012345678901234567890123456789012345678901234567890123456789012345678901 tempfile
/dcc SEND BLAH 12345678901234567890123456789012345678901234567890123456789012345678901234567890
/dcc SEND BLAH 123456789012345678901234567890123456789012345678901234567890123456789012345678901

you get two windows as follows

SEND BLAH 12345678901234567890123456789012345678901234567890123456789012345678901234567890
SEND BLAH 123456789012345678901234567890123456789012345678901234567890123456789012345678901

if you go /window -a "SEND BLAH 123456789012345678901234567890123456789012345678901234567890123456789012345678901"

it focuses to "SEND BLAH 12345678901234567890123456789012345678901234567890123456789012345678901234567890" becuase thats the above truncated at 90 characters and the window also exists.

Now since this can cause an incorrect focus to occur not just a invalid window becuase its too long, I would say it can be called a real bug.

#120083 14/05/05 11:47 AM
Joined: Jul 2003
Posts: 19
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 19
yeah... maybe mirc could use another method to retrieve dcc windows or name them...


"Three words of destruction: Shun-Goku-Satsu"
#120084 14/05/05 12:48 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
#120085 15/05/05 01:36 PM
Joined: Jul 2003
Posts: 19
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 19
There is another window focus issue... dcc chat sessions with the same nick. if i open 2 or more dcc chat sessions with the same nick i cannot focus on any other chat window with that nick, except the 1st one because all of those windows have the same name (the user' s name...)
any way to do this?


"Three words of destruction: Shun-Goku-Satsu"
#120086 15/05/05 05:23 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I'm not sure that this is possible. I've tried various methods of /window and $window to get this to work and they all bring up the first one. I'd guess you'd have to use the $wid or .hwnd to pull up the correct one, but I can't manage to make those work. Maybe someone else has a better idea.


Invision Support
#Invision on irc.irchighway.net
#120087 15/05/05 09:29 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Then you can have it cycle through all DCC windows and search for $1 and $2 and something like $mid($3,1,50).


I still didnt get how you select the window after you have found the one you wanted? Is there an alternative to using /WINDOW to set focus ?

#120088 16/05/05 01:03 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, as long as you do not have the same first 89 letters the same, you can use:

//window -a $window(beginning letters*,N)

Example:

I have 4 windows open with the names:

This is a test to see if it works
This is a test to see if it doesn't work
This is a test to see if it works2
This is a test to see if it doesn't work2

Let's say I want the third one on that list:

I can look up $window(This is a test to see if*,N). I cycle through N to find the one I want. Then I use //window -a $window(This is a test to see if*,3).

This doesn't solve the problem of two DCC windows with the same name.


Invision Support
#Invision on irc.irchighway.net
#120089 17/05/05 03:33 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
//window -a $window(beginning letters*,N)


This well still run into exactly the same problem when the window name is to long tho, since $window(beginning letters*,N) is evaluated first to the 90+ character window name then passed to the /window command.

#120090 17/05/05 04:01 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Which is why I said that it will not work if the window name is the exact same thing for the first 90 letters. However, this is very rare. It will work for any length of window name as long as the window name has at least one character different within the first 90 letters.


Invision Support
#Invision on irc.irchighway.net
#120091 17/05/05 04:41 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Quote:
It will work for any length of window name as long as the window name has at least one character different within the first 90 letters.


No, it won't. The reason is still what DaveC said before: $window() is evaluated to the 90+ window name, which is passed to /window. This is exactly the same as typing that long window name directly in /window.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#120092 17/05/05 04:49 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I've tested it and it appears to work just fine:

/query 21903784902837490217834092817340912837409281734092178347092183740921837401928374029837410293875

/query 21903784902838490217834092817340912837409281734092178347092183740921837401928374029837410293875

//window -a $window(2190378490283*,1)
//window -a $window(2190378490283*,2)

Brings up each window that I ask for.

Those window names are 95 characters in length.


Invision Support
#Invision on irc.irchighway.net
#120093 17/05/05 05:13 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The query names you mentioned work anyway with /window, try for example:
/window -a "219037849028374902178340928173409128374092817340921783470921837409218374019283740298374102"
or
/window -a 219037849028374902178340928173409128374092817340921783470921837409218374019283740298374102
Magic, it works.

In reality, it's not $window() that solves the problem, it's that in your examples there is no problem at all. That's because /query will not create a window longer than 90 chars anyway, it'll just chop it to 90 chars (try //echo -a $len($query(1)) if you want to verify that).

The point is, whenever //window -a some name doesn't work (for whatever reason), //window -a $window(some*,1) isn't going to either, so it offers nothing.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#120094 18/02/06 06:57 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
bug is still present in 6.17. Assuming *.exe is a blocked dcc send filetype, the stalled send window remains open after the get window is rejected:

//var %x = $str(x,75) $+ .exe | write %x test | dcc send $me %x | window -n "send $me %x $+ "

* /window: invalid parameters

74 is the largest value i can use in 6.17 without the error, while my 6.16 correctly handles values up to 73.

Both mIRC foldernames are 4 characters in length.


Link Copied to Clipboard