mIRC Home    About    Download    Register    News    Help

Print Thread
#189056 03/11/07 08:47 AM
Joined: Aug 2006
Posts: 11
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Aug 2006
Posts: 11
hello,

if i start this timer:

Code:
/timer 0 1 test

alias test background -a blubb.bmp


background triggers the channel that was active at starting the timer.

Code:
alias test background $active blubb.bmp


triggers the right one.



Last edited by daGroove; 03/11/07 08:47 AM.

sorry for my english smile
daGroove #189652 10/11/07 01:25 PM
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
The -a switch for all commands uses the window active at the time the command is issued. In this case, /timer is associated with a specific window for the life of the timer. I could change it so that -a works the same way as $active, however I think -a has always worked this way.

Khaled #190731 25/11/07 10:20 AM
Joined: Aug 2007
Posts: 21
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Aug 2007
Posts: 21
Originally Posted By: Khaled
The -a switch for all commands uses the window active at the time the command is issued.


umm... I still do not completely understand the -a switch. consider this code (clean install with mirc.ini in the mirc-dir, mirc 6.31, vista):

Code:
on *:ACTIVE:*: {
  echo -a Active: $active
  background -a image.gif
}


now I create two custom windows and... nothing happens. whenever I click into the windows, the echo would show me the correct active window where I klicked into, but the background wuld not change.
with "background $active image.gif" it works.


marco50 #190759 25/11/07 07:40 PM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
I'm able to reproduce this result.

Code:
on *:active:*:{
  echo -as Active Window: $active
  background -a $qt(C:\Path\to\Picture.jpg)
}


Doesn't appear to function correctly on @windows.

Rand #190790 26/11/07 09:31 AM
Joined: Aug 2007
Posts: 21
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Aug 2007
Posts: 21
it does not affect custom windows only. same behavior in status, channel, and query windows.
I'd suggest to make the -a switch consistent with $active because currenty it's not obvious what "-a" refers to, at least within a script. I cannot imagine a case where it would make sense to distinguish between "-a-activity" and "$active-activity".
Maybe there is such a case. Then it should be explained in the help file :-)

marco50 #190814 26/11/07 11:27 PM
Joined: Aug 2006
Posts: 11
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Aug 2006
Posts: 11
it works with 6.3 wink



sorry for my english smile

Link Copied to Clipboard