Phil W Posted August 4, 2007 Share Posted August 4, 2007 OK so I run a CSS server (Counter strike source) on my box atm, it has a habit of memory leaking or crashing, So I've had to create two scripts to stop the various crashes that happen. These are $var1=1 While $var1=1 WinWait ("Engine Error") WinActivate("Engine Error") ControlClick("Engine Error","","Button1") send("{ENTER}") WEnd and $var1=1 While $var1=1 WinWait ("srcds.exe - Application Error") WinActivate("srcds.exe - Application Error") ControlClick("srcds.exe - Application Error","","Button1") send("{ENTER}") WEnd Is there a way to do an OR statement in Autoit on the WinWaitActive so I can combine these two into one program? Many thanks Link to comment Share on other sites More sharing options...
martin Posted August 4, 2007 Share Posted August 4, 2007 OK so I run a CSS server (Counter strike source) on my box atm, it has a habit of memory leaking or crashing, So I've had to create two scripts to stop the various crashes that happen. These are $var1=1 While $var1=1 WinWait ("Engine Error") WinActivate("Engine Error") ControlClick("Engine Error","","Button1") send("{ENTER}") WEnd and $var1=1 While $var1=1 WinWait ("srcds.exe - Application Error") WinActivate("srcds.exe - Application Error") ControlClick("srcds.exe - Application Error","","Button1") send("{ENTER}") WEnd Is there a way to do an OR statement in Autoit on the WinWaitActive so I can combine these two into one program? Many thanks Maybe this will work $var1 = 1 While $var1 = 1 If WinExists("Engine Error") Then WinActivate("Engine Error") ControlClick("Engine Error", "", "Button1") Send("{ENTER}") EndIf If WinExists("srcds.exe - Application Error") Then WinActivate("srcds.exe - Application Error") ControlClick("srcds.exe - Application Error", "", "Button1") Send("{ENTER}") EndIf WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
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