Sign in to follow this  
Followers 0
vmguy

HowTo detect windows in the system tray

7 posts in this topic

#1 ·  Posted (edited)

Bye.

Edited by vmguy

Share this post


Link to post
Share on other sites



I have some applications that like to hide in the system tray,

and I'd like to detect that they are running and manipulate them.

The one in question has a context menu (R-click) that provides lots of options.

And ... it appears that these options might all be running as individual hidden windows,

ALL with the same title.

WinList() will get me a list of all these, and I can detect if some of those windows

are visible ... but, I'd like to be able to manipulate each of these detected

windows with a HANDLE ... the one that is returned by WinList().

I haven't found any way to do this ... all the interesting functions use the "title", "text"

method of addressing windows.

Looked thru the FAQ and every function in the Help, but came up empty.

You must set an option in your script to use Handles.

Opt("WinTitleMatchMode", 4) ;Look up Mode 4 in the Helpfile

I hope this helps,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

You must set an option in your script to use Handles.

Opt("WinTitleMatchMode", 4) ;Look up Mode 4 in the HelpfileoÝ÷ Øh¥ëaÈ^    Kú®¢×¡.víbj{¬yh§ëGjwezìjeÊëj|«zÛ«çajwey©Ý¥«,¶©j¶¦z׫¶§Éh§~éܶ*'*ÞrÙr~º&¶¡zZ_W°Øg¡h§N+exÆ­r(uæÞ~Þjëh×6$handle = WinGetHandle("Untitled - Notepad", "")
WinClose($handle)

Who else would I be?

Share this post


Link to post
Share on other sites

No. You dont. You can use WinGetHandle or simply use any returned handle and pass the parameter to any Win* function.

Directly from the helpfile (with no WinTitleMatchMode before):

$handle = WinGetHandle("Untitled - Notepad", "")
WinClose($handle)
Oh, I was just going by what the helpfile states under that option. Mode 4. We may need that to be re-worded as it states Mode 4 is for classnames and HWND's.

I do thank you for the clarification.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Oh, I was just going by what the helpfile states under that option. Mode 4. We may need that to be re-worded as it states Mode 4 is for classnames and HWND's.

I do thank you for the clarification.

JS

Jon was intending to do that, but he hates rewriting documentation. (I have no idea why, it comes pretty easy to me if I actually feel like it.)

Who else would I be?

Share this post


Link to post
Share on other sites

Jon was intending to do that, but he hates rewriting documentation. (I have no idea why, it comes pretty easy to me if I actually feel like it.)

I hate it unless I am explicitly in the mood for it.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I like handles.

Unless you know some text on the windows, you will not be able to get the correct handles.

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  
Followers 0