mIRC Home    About    Download    Register    News    Help

Print Thread
/scon #13777 02/03/03 12:30 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Is it possible to some how use the scon to run commands on windows servers which are conneted or connecting:

for example:
/scon -at(1 && 4) echo -a hello

I know that the way I wrote it doesn't work.

Will " /scon -at!2 echo -a hello " do the trick ??


please help me.

Re: /scon #13778 02/03/03 12:56 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
From the help file:
The -tM switch limits the command to being performed only on servers with a certain connection status, where M is an or'd value of 1 = server connected, 2 = not connected, 4 = connecting, 8 = not connecting.The command is only performed if M matches the connect status of the connection id.

Although Khaled tried to hide it well, you can notice the "or'd" in there. It means that you have to apply the OR operator between the numbers you want. If you don't know what OR is, you can just add these numbers together. For example, to make /scon act on "connected" or "connecting" sessions, use 5. (1+4):

/scon -at5 /command


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: /scon #13779 02/03/03 02:18 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Thanks, I will try that.
Usualy in mirc, OR is & or &&, but I think that your suggestion will do the trick, cause this could explain why it is 1 2 4 8 (power of 2).

Re: /scon #13780 02/03/03 02:49 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Actually, & and && are AND. & does a bitwise AND check:
if (%a & %b)
is equivalent to
if ($and(%a,%b))


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: /scon #13781 02/03/03 10:15 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Opps, sorry, I meant to write || as OR