Jump to content

WinActiviate resets focus stealing

Recommended Posts

I'm using WinActivate in a script and, every time it runs, it resets my focus-stealing settings and I have to go into TweakUI and click "Prevent applications from stealing focus." The next time the script runs, it somehow unchecks the box. How do I get the script to activate a specific window without resetting my focus stealing properties?

Link to comment
Share on other sites

If Not WinActive("Untitled -") Then

      WinSetState("Untitled -", "", @SW_SHOW)


I this shold do it



Sorry, I'm a total newb. Where in my script would that go? Here's my script:

While 1

$index = 0

While WinExists("Siemens SmartSync")

$index = $index + 1

If $index < 5 Then

ControlClick("Siemens SmartSync", "&Retry",4)


WinActivate ("Simenes SmartSync")

ControlClick("Siemens SmartSync", "Cancel",2)



Sleep(10000); <- depends on the time it take till the next Retry window




Link to comment
Share on other sites

*** remember i cannot test this, so

for testing just ad a ";" without the quotes before winactivate... like this

; WinActivate ("Simenes SmartSync")

then copy this right below that

If Not WinActive("Siemens SmartSync") Then

WinSetState("Siemens SmartSync", "", @SW_SHOW)


should work

good luck



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

  • Recently Browsing   0 members

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