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)

Endif

I this shold do it

8)

<{POST_SNAPBACK}>

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)

Else

WinActivate ("Simenes SmartSync")

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

ExitLoop

EndIf

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

WEnd

Sleep(1000)

WEnd

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)

Endif

should work

good luck

8)

NEWHeader1.png

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...