mIRC Home    About    Download    Register    News    Help

Print Thread
menu @window #98853 27/09/04 12:44 PM
Joined: Sep 2003
Posts: 84
T
Turbo_boy Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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

Re: menu @window #98854 27/09/04 01:21 PM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
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

Re: menu @window #98855 27/09/04 04:35 PM
Joined: Sep 2003
Posts: 84
T
Turbo_boy Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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
}

Re: menu @window #98856 27/09/04 05:16 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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.


New username: hixxy
Re: menu @window #98857 27/09/04 05:41 PM
Joined: Sep 2003
Posts: 84
T
Turbo_boy Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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

Re: menu @window #98858 27/09/04 05:49 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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


New username: hixxy
Re: menu @window #98859 27/09/04 06:21 PM
Joined: Sep 2003
Posts: 84
T
Turbo_boy Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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)

Re: menu @window #98860 27/09/04 06:40 PM
Joined: Sep 2003
Posts: 84
T
Turbo_boy Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 84
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

Re: menu @window #98861 28/09/04 05:53 AM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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??...

Re: menu @window #98862 28/09/04 07:48 AM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788

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.

Re: menu @window #98863 28/09/04 03:40 PM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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..



Re: menu @window #98864 28/09/04 03:52 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.