mIRC Home    About    Download    Register    News    Help

Print Thread
#157742 28/08/06 06:06 AM
Joined: Dec 2002
Posts: 252
T
Talon Offline OP
Fjord artisan
OP Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 252
I realized I posted to the wrong forum a lil late.. so oh well, here is my request in the proper forum....

ON *:OPEN:*: { but ended up having to duplicate the same code a few times for each type... my problem is, theres no way to tell what is triggering that open, $target returns $me basically... so how do you know if its a dcc chat/fserve or query? well if $0 is > 0 then its a query, but still now how do you know if its a chat or an fserve? what if both are open, do you take a wild guess? I would like a $trigger that works in OPEN/CLOSE that returns the type of window that triggers the event, it should return @,!,=,? that way I can combine those into one remote rather than duplicating code....

Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
I think i made a comment or suggestion about an 'event location' identifier at one point also, i would find this quite useful too.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Oct 2003
Posts: 25
Z
Ameglian cow
Offline
Ameglian cow
Z
Joined: Oct 2003
Posts: 25
i'm not completely awake right now, but can $window().type help you ?

Last edited by Zerg; 28/08/06 10:46 PM.
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
unless I mistake what you want:

on *:open:? <--- query
on *:open:! <-- fserve
on *:open:= <-- DCC Chat

Does that help?


Those who fail history are doomed to repeat it
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
quite right, and simple to use....

on *:open:?:on.open.a query $1-
on *:open:!:on.open.a fserve $1-
on *:open:=:on.open.a Chat $1-
alias on.open.a { var %type = $1 | tokenize 32 $2-
... remaining code here
}

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Indeed. That'd be the easiest way to do it. There's several ways to do it.

You could even make a: "first.open.mrc" file, and have that the first loaded file in your mIRC. With the contents of:

on *:open:?:{ set %_open query }
on *:open:=:{ set %_open chat }
...etc...

Then in another script:

on *:open:*:{ if (%_open == chat) { stuff } | unset %_open }


Personally, I prefer just using :#: :?: :=: in the on events, instead of a *, there's really no point of processing extra stuff (not that there's a noticeable difference, but still.)

Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
I still agree that the $trigger event should work for the on OPEN/CLOSE events. Returning the appropriate information.


Live to Dream & Dream for Life
Joined: Sep 2004
Posts: 14
I
Pikka bird
Offline
Pikka bird
I
Joined: Sep 2004
Posts: 14
Am I just being silly by suggesting you use signals and the aforementioned = ? and ! to create your own $trigger signal(s)?


Link Copied to Clipboard