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.
Move mouse to taskbar to use AeroPeek Topic is solved
Re: Move mouse to taskbar to use AeroPeek
I found this: http://blog.strixcode.com/2011/01/how-t ... 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."
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."
Re: Move mouse to taskbar to use AeroPeek Topic is solved
Hopefully this should do it to get the taskbar button coordinates.
[this code was based on:]
Windows Update: detect if important updates available - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26727
- 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
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
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"
Return
Windows Update: detect if important updates available - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26727
- 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
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Move mouse to taskbar to use AeroPeek
Thank you.
That seems to work fine, and will be almost directly usable for what I want.
That seems to work fine, and will be almost directly usable for what I want.
Re: Move mouse to taskbar to use AeroPeek
I am new to AHK programming. My test of the script posted above was conducted with the Windows 7 Professional 64 bit operating system and AHK version 1.0.48.05. When I run the script I get the following error:
-------------------------------------------
Error at Line 7.
The following variable name contains an illegal character:
"oAcc.accChildCount".
The program will exit.
-------------------------------------------
Is there any workaround which would allow me to fix the error without updating to a newer version of AHK? Can anyone explain what might be the cause of this particular error?
Thank you in advance for your time and consideration.
-------------------------------------------
Error at Line 7.
The following variable name contains an illegal character:
"oAcc.accChildCount".
The program will exit.
-------------------------------------------
Is there any workaround which would allow me to fix the error without updating to a newer version of AHK? Can anyone explain what might be the cause of this particular error?
Thank you in advance for your time and consideration.
Re: Move mouse to taskbar to use AeroPeek
After searching this forum I may have found something relevant:
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=69003&p=297182&hilit=illegal+variable+name#p297182
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=69003&p=297182&hilit=illegal+variable+name#p297182
Who is online
Users browsing this forum: morkovka18 and 176 guests