mIRC Homepage
Posted By: Turbo_boy menu @window - 27/09/04 12:44 PM
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 smirk
Posted By: Sigh Re: menu @window - 27/09/04 01:21 PM
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
Posted By: Turbo_boy Re: menu @window - 27/09/04 04:35 PM
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
}
Posted By: tidy_trax Re: menu @window - 27/09/04 05:16 PM
Seems like you can't:

Code:
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
}


Code:
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.
Posted By: Turbo_boy Re: menu @window - 27/09/04 05:41 PM
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
Posted By: tidy_trax Re: menu @window - 27/09/04 05:49 PM
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 smile
Posted By: Turbo_boy Re: menu @window - 27/09/04 06:21 PM
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)
Posted By: Turbo_boy Re: menu @window - 27/09/04 06:40 PM
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 laugh

thnx any why for the help
Posted By: clutz1572 Re: menu @window - 28/09/04 05:53 AM
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??...
Posted By: Coolkill Re: menu @window - 28/09/04 07:48 AM

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.
Posted By: clutz1572 Re: menu @window - 28/09/04 03:40 PM
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..


Posted By: Coolkill Re: menu @window - 28/09/04 03:52 PM
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.
© mIRC Discussion Forums