mIRC Home    About    Download    Register    News    Help

Print Thread
Rather annoying. #181315 21/07/07 01:39 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Code:
on *:appactive: {
  /.timerappactive 1 1 /appstate $appstate
}

alias appstate {
  if ($1 == minimized) { /set %AwayStatus Yes | echo -s %AwayStatus $appstate }
  if ($1 == maximized) { /set %AwayStatus No | echo -s %AwayStatus $appstate }
}


Minimize mIRC, then maximize it. Check the status window..

Yes minimized
Yes maximized

Re: Rather annoying. [Re: LostShadow] #181323 21/07/07 02:14 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
This is a common mistake when using /timer in a script. When you start a timer inside a script, any identifiers in the /timer command are evaluated inside that script and not when the timer fires. Try
/.timerappactive 1 1 /appstate $!appstate


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com