Jump to content

Winmove () is only working sometimes?


Nick3399
 Share

Recommended Posts

            
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 by Nick3399
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...