mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

Is there any way to use $input identifier on some events?

e.g:

Code:
ON *:CONNECT: { var %ok = $input(Connected,oid,Info) }


- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Use a timer to bypass this

Code:
ON *:CONNECT: { .timer -ho 1 0 var % $+ ok = $!input(Connected,oid,Info) }


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I've try this but has some issue with %ok results, Somewhere i saw one identifier like $safe or something like this that used on some events with $input, on your example the %ok variable results disappeared and i cannot grap the %ok variable is there any other way to take the %ok results?

e.g: //timer -ho 1 0 var % $+ ok = $!input(Connected. Do you want to disconnect,qyid,Question) | echo -s %ok

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
I think using /set (or /var -g) instead of /var would solve this.


Nothing...
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Does not working the /var -g or /set

example:

Code:
alias test {
  timer -ho 1 0 var -g % $+ ok = $!input(Connected $!+ $!chr(44) Do you want to disconnect,qyid,Question) 
  echo -s IS: %ok
  unset %ok
}


results:

* Timer 1 activated
-
IS:
-
* Timer 1 halted


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Of course not, the timer takes place after the current alias is completed.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
$safe inside a timer is meant to prevent /timer to 'double evaluate' the content passed to that command, this is only required when passing unknown content to /timer, which is not the case in your example.

If you want to do something else than that (which is not clear in your example), you need to either call an alias or keep chaining command in the parameter of /timer, which is ugly, but don't require an alias..

Code:
ON *:CONNECT:.timer -ho 1 0 myalias
alias myalias {
  var %ok = $input(Connected,oid,Info)
 echo -a ok
}

; OR

ON *:CONNECT: { .timer -ho 1 0 var % $+ ok = $!input(Connected,oid,Info) $(|) echo -a % $+ ok }

Last edited by Wims; 27/07/14 04:46 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard