|
Joined: Feb 2004
Posts: 119
Vogon poet
|
OP
Vogon poet
Joined: Feb 2004
Posts: 119 |
[code] on *:start: { _start.up_ }
alias _start.up_ { $findfile($windowsdir $+ \media\,*.wav,0,$iif($nopath($1-) !isnum,.copy $_bracket($1-) $_bracket($+($mircdirsystem\sounds\,$nopath($replace($1-,$chr(32),$chr(95))))))) $findfile($windowsdir $+ \Cursors\,*.cur,0,$iif($nopath($1-) !isnum,.copy $_bracket($1-) $_bracket($+($mircdircursors\,$nopath($replace($1-,$chr(32),$chr(95)))))) if ($_istok($os,XP)) _write.snd }
[code]
i get this error. * /98: not connected to server (line 7, mIRC.hrc)
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
Well $findfile is an identifier which returns a result. In your case, you specified N = 0, which will return the total amount of results matching your file criteria.
Since you put $findfile as first part of a string, $findfile evalutes to a number, in your case 98, and then tries to execute the 98 as a command, which is why you get the error, since you don't have a command named /98.
The fix is to use something like:
!.echo -q $findfile(..)
or
var %dummy = $findfile(..)
etc.
Greets
|
|
|
|
k1tkra04
|
k1tkra04
|
The fix is to use something like:
!.echo -q $findfile(..)
Hence -
on *:start: { _start.up_ }
alias _start.up_ {
.echo -q $findfile($windowsdir $+ \media\,*.wav,0,$iif($nopath($1-) !isnum,.copy $_bracket($1-) $_bracket($+($mircdirsystem\sounds\,$nopath($replace($1-,$chr(32),$chr(95)))))))
.echo -q $findfile($windowsdir $+ \Cursors\,*.cur,0,$iif($nopath($1-) !isnum,.copy $_bracket($1-) $_bracket($+($mircdircursors\,$nopath($replace($1-,$chr(32),$chr(95)))))) if ($_istok($os,XP)) _write.snd}
|
|
|
|
Joined: Feb 2004
Posts: 119
Vogon poet
|
OP
Vogon poet
Joined: Feb 2004
Posts: 119 |
bah it still don't work!
alias start {
.echo -q $findfile($windowsdir $+ \media\,*.wav,0,$iif($nopath($1-) !isnum,copy $_bracket($1-) $+($mircdirsystem\sounds\,$nopath($replace($1-,$chr(32),$chr(95))))))
.echo -q $findfile($windowsdir $+ \Cursors\,*.cur,0,$iif($nopath($1-) !isnum,copy $_bracket($1-) $+($mircdircursors\,$nopath($replace($1-,$chr(32),$chr(95))))))
}
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
does $windowsdir return something ? on my comp it dosent..
|
|
|
|
DaveC
|
DaveC
|
Think i might be a private alias identifier, didnt bring anything up here either.
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
It's probably something like this: alias windowsdir {
var %a = a $+ $ticks
.comopen %a WScript.Shell
if !$comerr {
tokenize 32 $com(%a,ExpandEnvironmentStrings,3,bstr,% $+ windir%) $com(%a).result
.comclose %a
return $2-
}
}
|
|
|
|
Joined: Feb 2004
Posts: 119
Vogon poet
|
OP
Vogon poet
Joined: Feb 2004
Posts: 119 |
$windowsdir returns c:windows
$_bracket returns "dir"
|
|
|
|
|