on *:Dialog:test:mouse:0:{
//echo -a $mouse.x $mouse.y
}
whats wrong?
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.
you know how to fix mine :tongue: ?
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
i dont see the difference between his and mine but for some reason it works with * but not with 0
thanx anyway
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.
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.
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.
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.
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)