Move mouse to taskbar to use AeroPeek Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Posts: 4
Joined: 20 Jan 2017, 22:12

Move mouse to taskbar to use AeroPeek

20 Jan 2017, 22:27

I have a script to automate starting a number of apps, and one part I'd like to do but have no idea how to achieve it.

What I want is to start multiple copies of an app (they are VM's and I've got that bit), wait for them to finish loading (I've figured out Winwait, so tha's ok) and then move the mouse to the taskbar, over the icon for the first VM, so I can use Aeropeek to watch all the VMs in parallel to wait for them all to finish an action, before I initiate the next one.

So: Is there any way to launch an app, and then find the screen coordinates of the taskbar button associated with app?

Ideally I want to Start VM1, find the location of the taskbar button for that app and save it, do a bunch more mousemoves/mouseclicks to launch more Vms, then move the mouse back over the button and let Aeropeek do it's thing so I can tell when they are all waiting for further input.

Re: Move mouse to taskbar to use AeroPeek

21 Jan 2017, 03:09

I found this: ... on-on.html which gives a method of doing it, but I don't know how to translate that to Autohotkey.

Though a comment there suggests "Better is to use the Microsoft MSAA API. Use AccChecker_v2.0_x86 ->AccCheckUI.exe to display this object tree. This object tree contains the taskbar buttons, their position and their title."
User avatar
Posts: 5942
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Move mouse to taskbar to use AeroPeek  Topic is solved

21 Jan 2017, 05:24

Hopefully this should do it to get the taskbar button coordinates.

Code: Select all

q:: ;taskbar get item names + coords (tested on Windows 7)
DetectHiddenWindows, On
ControlGet, hWnd, Hwnd, , MSTaskListWClass1, ahk_class Shell_TrayWnd
oAcc := Acc_Get("Object", "tool bar", 0, "ahk_id " hWnd)

vOutput := ""
Loop, % oAcc.accChildCount
oRect := Acc_Location(oAcc, A_Index), vOutput .= oRect.x " " oRect.y " " oRect.w " " oRect.h "`t" oAcc.accName(A_Index) "`r`n"
Clipboard := vOutput
MsgBox % "done"
[this code was based on:]
Windows Update: detect if important updates available - AutoHotkey Community
- JEE_ExpGetSystrayItems
- JEE_ExpUpdatesAvailable
- JEE_ExpGetTaskbarItems

[AccViewer is a very good window spy, and in order to run the Acc functions above:]
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Posts: 4
Joined: 20 Jan 2017, 22:12

Re: Move mouse to taskbar to use AeroPeek

21 Jan 2017, 16:03

Thank you.

That seems to work fine, and will be almost directly usable for what I want.

Return to “Ask For Help”

Who is online

Users browsing this forum: electrone77, Google [Bot], MannyKSoSo, scriptor2016, sinkfaze, SOTE and 181 guests