mIRC Homepage
Posted By: daGroove background -a - 03/11/07 08:47 AM
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.


Posted By: Khaled Re: background -a - 10/11/07 01:25 PM
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.
Posted By: marco50 Re: background -a - 25/11/07 10:20 AM
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.

Posted By: Rand Re: background -a - 25/11/07 07:40 PM
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.
Posted By: marco50 Re: background -a - 26/11/07 09:31 AM
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 :-)
Posted By: daGroove Re: background -a - 26/11/07 11:27 PM
it works with 6.3 wink

© mIRC Discussion Forums