mIRC Home    About    Download    Register    News    Help

Print Thread
#21192 27/04/03 03:48 PM
Joined: Apr 2003
Posts: 1
L
loader Offline OP
Mostly harmless
OP Offline
Mostly harmless
L
Joined: Apr 2003
Posts: 1
there seems to be a bug when you want to /run or /splay files that have a double-space in their path, for example: "C:\Files\here are 2 spaces.end"
i tried to figure out where this bug is, but i still have no good idea.
When i read filenames in variables, mirc doesn't even safe the double-spaces in the variables. look at this example:
var %filename "C:\Files\here are 2 spaces.end"
becomes
var %filename "C:\Files\here are 2 spaces.end" // only single space

here the same problem:
/run C:\Files\here are 2 spaces.end // 2 spaces
AND
/run "C:\Files\here are 2 spaces.end" // 2 spaces
become
/run "C:\Files\here are 2 spaces.end" // 1 space

hope this helps a bit finding the error.. good luck!

&greets;
P.S. Everything after // is just a comment and does NOT belong to the example commands.

#21193 28/04/03 04:54 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
mIRC has a long standing bug that it can't handle anything (not just filenames) with multiple spaces like that, as far as I know, there is no way around it.

#21194 28/04/03 03:30 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Not quite so. mirc can handle consecutive spaces, as long as the string isn't passed directly to a mirc /command. This means that identifiers and variables can handle those strings fine.

Take, for example, filenames. You think mirc can't play mp3s with double spaces, but this isn't true, unless you hardcode the filename in the script. This would be a very rare occasion; in most cases, to play mp3s, you'd have to use $sfile(), $findfile() or $read() (or another way to read from a playlist). In all these cases, you can use $shortfn($sfile()) or $findfile(dir,*.mp3,1).shortfn or $shortfn($read(file,n,N). If $sfile() or $read() returns a filename with double spaces, $shortfn() can process it fine. The script could even display the long filename with $longfn() but the handling of the file would be done with the short filename. Variables can store strings with multiple spaces as well. So even if you wanted to hardcode a long filename with multiple spaces in the script, you could put it in a variable (by typing it in Variables list) and use $shortfn(%variable) in the script.

My point, this lack of multiple spaces support in mirc might be annoying sometimes (the biggest annoyance is $1- in irc messages, just because you can't get around it in any simple way) but it's nowhere as bad as you think.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#21195 29/04/03 03:07 AM
Joined: Apr 2003
Posts: 10
S
Pikka bird
Offline
Pikka bird
S
Joined: Apr 2003
Posts: 10
Mirc uses SPACE as literal delimit of it's script language. So consecutive spaces are treated as only one SPACE.


Link Copied to Clipboard