mIRC Homepage
Posted By: pheonix on dialog - 18/07/03 01:54 PM
on *:Dialog:test:mouse:0:{
//echo -a $mouse.x $mouse.y
}

whats wrong?
Posted By: feud Re: on dialog - 18/07/03 02:01 PM
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.
Posted By: pheonix Re: on dialog - 18/07/03 02:41 PM
you know how to fix mine :tongue: ?
Posted By: I3IacK_KnIGIIT Re: on dialog - 18/07/03 03:26 PM
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
Posted By: pheonix Re: on dialog - 18/07/03 04:02 PM
i dont see the difference between his and mine but for some reason it works with * but not with 0 confused
thanx anyway grin
Posted By: feud Re: on dialog - 18/07/03 04:31 PM
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.
Posted By: pheonix Re: on dialog - 18/07/03 04:56 PM
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.
Posted By: codemastr Re: on dialog - 18/07/03 05:18 PM
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.
Posted By: feud Re: on dialog - 18/07/03 06:08 PM
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.
Posted By: ScatMan Re: on dialog - 19/07/03 04:19 AM
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)

© mIRC Discussion Forums