Nick3399 Posted September 16, 2022 Posted September 16, 2022 (edited) My code is below. I am trying to move my HD window using the below code however it only does it occasionally. The app always goes active but only sometimes moves the window to the right position I never get a popup that the window is not open either so I know it is able to find it by the title... does anyone know what could be going on? Quote If ProcessExists("HD.exe") Then _WriteLineToLog("Only one HD process can run at a time.") WinActivate("HD App") $oBlah = WinGetHandle("HD App") If WinExists($oBlah) Then WinActivate($oBlah) WinMove($oBlah, "", 0, 0, 10, 10) Else MsgBox("0", "No HD window", "Please open HD") EndIf Edited September 16, 2022 by Nick3399
Werty Posted September 16, 2022 Posted September 16, 2022 Try with a WinWaitActive() before the winmove. Some guy's script + some other guy's script = my script!
Nick3399 Posted September 16, 2022 Author Posted September 16, 2022 8 minutes ago, Werty said: Try with a WinWaitActive() before the winmove. Tried that as well 😕 the script definitely finds the window because it doesn’t send a message and makes it active
Werty Posted September 16, 2022 Posted September 16, 2022 Try this If ProcessExists("HD.exe") Then _WriteLineToLog("Only one HD process can run at a time.") $oBlah = WinGetHandle("HD App") WinActivate($oBlah) WinWaitActive($oBlah) WinMove($oBlah, "", 0, 0, 10, 10) Else MsgBox("0", "No HD window", "Please open HD") EndIf Some guy's script + some other guy's script = my script!
Nick3399 Posted September 17, 2022 Author Posted September 17, 2022 21 hours ago, Werty said: Try this If ProcessExists("HD.exe") Then _WriteLineToLog("Only one HD process can run at a time.") $oBlah = WinGetHandle("HD App") WinActivate($oBlah) WinWaitActive($oBlah) WinMove($oBlah, "", 0, 0, 10, 10) Else MsgBox("0", "No HD window", "Please open HD") EndIf Same thing unfortunately. It only moves sometimes. I cannot figure out what it causing it
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now