mobamoba Posted June 16, 2005 Posted June 16, 2005 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?
Valuater Posted June 16, 2005 Posted June 16, 2005 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)EndifI this shold do it8)
mobamoba Posted June 16, 2005 Author Posted June 16, 2005 If Not WinActive("Untitled -") Then WinSetState("Untitled -", "", @SW_SHOW)EndifI this shold do it8)<{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
Valuater Posted June 16, 2005 Posted June 16, 2005 *** 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)
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