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.