mIRC Home    About    Download    Register    News    Help

Print Thread
#129768 09/09/05 02:33 AM
Joined: Sep 2005
Posts: 1
H
Mostly harmless
OP Offline
Mostly harmless
H
Joined: Sep 2005
Posts: 1
how can i create a menu on a @window to appear only if the right-click was on the window's listbox?

#129769 09/09/05 03:17 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
From the mIRC help file
Quote:
You can also specify popup menus for custom windows by specifying the custom window name.

menu @test {
dclick:/echo double-click!
}

The dclick item allows you to specify a command that will be performed when you double-click in a custom window listbox. You can also refer to $1 which holds the line number of the line that was double-clicked.

You can also specify multiple window names for a menu, eg.:

menu @dogs,@cats,@goats {
dclick: /echo double-click in $active
close: window -c $active
}


#129770 09/09/05 05:04 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Taken from a recent post asking the same thing, search is a great forum feature.
Code:
menu @Window {
  $iif($mouse.lb,List Items): echo -a Hello in the list
  $iif(!$mouse.lb,Main Items): echo -a Hello in the main
}

As stated in the previous thread, the $mouse identifier works in custom @windows, the .lb property returns $true if the event (in this case right click) occured within a listbox.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard