mIRC Home    About    Download    Register    News    Help

Print Thread
#98853 27/09/04 12:44 PM
T
Turbo_boy
Turbo_boy
T
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

#98854 27/09/04 01:21 PM
S
Sigh
Sigh
S
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

#98855 27/09/04 04:35 PM
T
Turbo_boy
Turbo_boy
T
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
}

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

#98857 27/09/04 05:41 PM
T
Turbo_boy
Turbo_boy
T
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

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

#98859 27/09/04 06:21 PM
T
Turbo_boy
Turbo_boy
T
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)

#98860 27/09/04 06:40 PM
T
Turbo_boy
Turbo_boy
T
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

#98861 28/09/04 05:53 AM
C
clutz1572
clutz1572
C
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??...

#98862 28/09/04 07:48 AM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787

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.

#98863 28/09/04 03:40 PM
C
clutz1572
clutz1572
C
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..



#98864 28/09/04 03:52 PM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
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.


Link Copied to Clipboard