mIRC Home    About    Download    Register    News    Help

Print Thread
on dialog #37021 18/07/03 01:54 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:Dialog:test:mouse:0:{
//echo -a $mouse.x $mouse.y
}

whats wrong?


new username: tidy_trax
Re: on dialog #37022 18/07/03 02:01 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
afaik $mouse.x/y are only used in conjunction with @windows

edit: black knight (or however he spells it) is right. you can use mouse events in dialogs, but only with the specific "mouse events" and not with a specific control.

Last edited by feud; 18/07/03 03:30 PM.

------
deep down, i'm really superficial.
Re: on dialog #37023 18/07/03 02:41 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
you know how to fix mine :tongue: ?


new username: tidy_trax
Re: on dialog #37024 18/07/03 03:26 PM
Joined: Jul 2003
Posts: 27
I
I3IacK_KnIGIIT Offline
Ameglian cow
Offline
Ameglian cow
I
Joined: Jul 2003
Posts: 27
on *:dialog:name:(mouse,sclick,uclick,dclick,rclick,drop):*: {
echo -s $mouse.x $mouse.y
}
check out the help file....under On Dialog and $mouse should help ya out

Re: on dialog #37025 18/07/03 04:02 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i dont see the difference between his and mine but for some reason it works with * but not with 0 confused
thanx anyway grin


new username: tidy_trax
Re: on dialog #37026 18/07/03 04:31 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
thats because mouse events in dialogs are not associated with controls. therefore, * works, 0 doesn't. instead of explaining this to death, look in the help file yourself.


------
deep down, i'm really superficial.
Re: on dialog #37027 18/07/03 04:56 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i looked in the help file and didnt understand it so i asked here..., i presumed 0 would work because of:
on *:Dialog:name:init:0:{
on *:dialog:name:close:0:{
they work and are not assosciated with a specific control.


new username: tidy_trax
Re: on dialog #37028 18/07/03 05:18 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
It would seem to me that 0 would make more sense. The mouse events only trigger for mouse events within the dialog, and since based on init/close 0 represents the dialog, it seems logical to assume that 0 is the value you want.

Re: on dialog #37029 18/07/03 06:08 PM
Joined: Dec 2002
Posts: 127
F
feud Offline
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
i agree it makes more sense on the surface. however, in the help file:

on 1:dialog:name:event:id: {
echo $dname $devent $did
}

Where name identifies the dialog, id is the id number of the control triggering the event, and event can be: ...

it seems to me that using 0 as an id is more of a kluge, to allow init events, since they're isn't a control to reference.


------
deep down, i'm really superficial.
Re: on dialog #37030 19/07/03 04:19 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
the id is 0 when u are using the close dialog event,init AND when the event is triggered on the background of the dialog (so there is no any control there)