Jump to content

How to Right Click Icon in Taskbar and use Menu?


AllenP
 Share

Recommended Posts

I'm trying to automate closing a program that has no other option than to right click on the systray icon, and click on "Shutdown". Currently, I am using the following code, but it requires that the desktop be unlocked which is a problem because of the screensaver locking for security purposes.

#include "SysTray_UDF.au3"

$process="AmicusServer.exe"
$pos=_SysTrayIconPos(_SysTrayIconIndex($process))
MouseMove($pos[0], $pos[1])
MouseClick("Right")
Send("{DOWN}")
Send(@crlf)

Is there anyway to automate this so that it can happen without the mouse movements and keyboard strokes?

Also, is there anyway to get a list of actions from the menus that appear when you right click on the systray icons?

Edited by AlPo
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...