Jump to content
Sign in to follow this  
MisterBates

UDF: Click tray popup menu items

Recommended Posts

MisterBates

I wanted to be able to set Live Messenger (and other IM clients) status to busy then back to online. This grew into a generic possibility to identify a taskbar icon, popup it's menu, click an item on the menu, and if the clicked item had a submenu, to find an item in the submenu and click it.

This work draws heavily on PaulIA's Auto3Lib - his library needs to be installed on your PC to use this UDF.

Apart from that, it turned out to be quite complicated to manage the popup menus in a generic way ...

Here's a small code snippet to demonstrate the UDF:

#include "ScB_TrayIcons.au3"

Opt("WinTitleMatchMode", 4)
opt("TrayIconHide", 1)

$bResult = ClickTaskbarMenuItem("Windows Live Messenger", "status", "online")
$bResult = ClickTaskbarMenuItem("Jabber Messenger", "status", 11, "secondary", 600, 3); Optional parms - last one provides a trace
        ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $bResult = ' & $bResult & @crlf & '>Error code: ' & @error & @crlf);### Debug Console

Would appreciate any and all feedback!

EDIT: so that people can find this example when searching: edit click systray menu

MisterBates

ScB_TrayIcons.au3

Edited by MisterBates

Share this post


Link to post
Share on other sites
autoItrules209

have you ever tried this UDF?

I'm quite a noob regarding autoit, but nevertheless i found 1-2 bugs already and it still doesnt work for me

I'd really like to use this UDF,so I started fixing it - ill post it here when I've worked out a working udf.... or maybe when I've given up fixing it :)

Edited by autoItrules209

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.