I open an window named @picture with this command: /window -p @picture picture.txt
But I opened it with the file picture.txt but if I do that the remote will not response on any mouse click or drop or any thing:
menu @picture {
sclick:/echo -a testing...
}
he will not echo or do any thing if I click in the window @picture
^^ putted a few day's ago to but didn't get answer on it
Seems like you can't specify a popup file and your own menu definitions simultaneously, why not include the popups in the file in a menu event
how to do that if only this is working for the menu:
menu @test {
mouse:/echo mouse moved at $mouse.x $mouse.y in $active $1
sclick:/echo single click at $mouse.x $mouse.y
dclick:/echo double click at $mouse.x $mouse.y
uclick:/echo mouse released at $mouse.x $mouse.y
rclick:/echo single right-click at $mouse.x $mouse.y in $active $1
lbclick:/echo mouse selected $active $1
leave:/echo mouse left $leftwin
drop:/echo drag and drop at $mouse.x $mouse.y
}
Seems like you can't:
menu @test {
mouse:/echo mouse moved at $mouse.x $mouse.y in $active $1
sclick:/echo single click at $mouse.x $mouse.y
dclick:/echo double click at $mouse.x $mouse.y
uclick:/echo mouse released at $mouse.x $mouse.y
rclick:/echo single right-click at $mouse.x $mouse.y in $active $1
lbclick:/echo mouse selected $active $1
leave:/echo mouse left $leftwin
drop:/echo drag and drop at $mouse.x $mouse.y
}
menu @test {
test: /echo test
}
menu @test {
mouse:/echo mouse moved at $mouse.x $mouse.y in $active $1
sclick:/echo single click at $mouse.x $mouse.y
dclick:/echo double click at $mouse.x $mouse.y
uclick:/echo mouse released at $mouse.x $mouse.y
rclick:/echo single right-click at $mouse.x $mouse.y in $active $1
lbclick:/echo mouse selected $active $1
leave:/echo mouse left $leftwin
drop:/echo drag and drop at $mouse.x $mouse.y
test: /echo test
}
None of the above will work.
but the help file say's it need to work, but if I open /window -p @picture then the menu @picture { ... } will work but I don't get the popup working there :S
Yes, it doesn't seem like you can use mouse events and popups in the same picture window.
Use
picture window popups by voice of power if you really need both
there most be an easlyer why to make an popup in an window? becuse I don't understand that ;-) (I'm just an dutch boy :P)
I got it working @ all :P
menu @picture {
sclick: {
.if (%draw == on) { %draw = off | halt }
%sclick = $mouse.x $mouse.y | %draw = on
}
mouse: {
.if (%draw == on) {
/drawline -i @picture 4 3 $mouse.x $mouse.y $mouse.x $mouse.y
}
}
.testing
}
the .testing will show if I do right click in the window
thnx any why for the help
VERY NICE!
but i would have one question....
would you have to have sep code for each window you want use this for or is there a way to set it globaly like??
i'm assuming for each??...
menu [color:red]@picture,@picture2,@ect {
sclick: {
if ($window($active).type == picture) {
if (%draw == on) { %draw = off | halt }
%sclick = $mouse.x $mouse.y | %draw = on
}
}
mouse: {
if ($window($active).type == picture) {
.if (%draw == on) {
/drawline -i $active 4 3 $mouse.x $mouse.y $mouse.x $mouse.y
}
}
}
.testing
}[/color]
Changing, @picture, in the /drawline to $active will allow you to use it in all the windows you want by simply editing the first line;
menu [color:red]@picture,@picture2,@ect {[/color]
adding on the @windows, seperated by a comma as you wish, using just @ will make it work for every window, but you probably wont want that if your script uses windows at all..
Also, adding if ($window($active).type == picture) { will prevent you getting errors by checking first the window is actually a picture window, not a custom one.[/color]
Eamonn.
ok,
now what is the difference between a picture window and a custom?? i looked thru the .hlp file and it looks to me like there both pretty much the same... having a hard time trying to tell the diff from the help file..
They are completely different a custom window is ment to hold text, a picture window is used for drawing commands/ect.
If you want to look at it this way, /help /window is all to do with custom windows, and /help Picture windows is all the commands you can use with picture windows.
If you read the helpfile throughly you will begin to understand.
Eamonn.