sshrum Posted October 20, 2005 Share Posted October 20, 2005 Using the beta, I was wondering if it was possible to define right mouse click events AND left mouse click events together. I'd like to do: > Right click - envokes program main function > Left click - displays popup menu The left click popup menu I already have, I'm just getting tired of having to open the popup to subsequently launch my program and would love to just right click the icon to get it to launch. TIA Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
BigDod Posted October 20, 2005 Share Posted October 20, 2005 Using the beta, I was wondering if it was possible to define right mouse click events AND left mouse click events together. I'd like to do:> Right click - envokes program main function> Left click - displays popup menuThe left click popup menu I already have, I'm just getting tired of having to open the popup to subsequently launch my program and would love to just right click the icon to get it to launch. TIAYou could use _ispressed, see example#Include <Misc.au3> While 1 if _IsPressed(01) Then MsgBox(4096,"","Left mouse button pressed") ElseIf _IsPressed(02) Then MsgBox(4096,"","Right mouse button pressed") EndIf WEnd Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Danny35d Posted October 20, 2005 Share Posted October 20, 2005 @ sshrum> Right click - envokes program main function> Left click - displays popup menuTo get the right click working with the traymenu you will need:TraySetClick (1) This tell AutoIt what mouseclicks will shown the tray menu in our case left click.Then on your select statement:$msg = TrayGetMsg()SelectCase $msg = $TRAY_EVENT_SECONDARYDOWN This tell AutoIt when the right click is down.MsgBox(0, '', 'Right click press')Hope this will help... AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
sshrum Posted October 20, 2005 Author Share Posted October 20, 2005 Case $msg = $TRAY_EVENT_SECONDARYDOWN This works and fits into my menu'ing select statement...thanx. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now