Sign in to follow this  
Followers 0
mobamoba

WinActiviate resets focus stealing

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



How do I get the script to activate a specific window without resetting my focus stealing properties?

<{POST_SNAPBACK}>

If Not WinActive("Untitled -") Then

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

Endif

I this shold do it

8)


NEWHeader1.png

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0