RyGoTypE Posted June 17, 2005 Share Posted June 17, 2005 Hey, I need help here. I am trying to check and see if a certain window exists, if not, run the program so that the window will existif it does, continue with checking if the window is active. Then I want to check if the window is active, if it is, keep running the script. If it isnt, activate the window. Any ideas? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
RyGoTypE Posted June 17, 2005 Author Share Posted June 17, 2005 Nevermind, I figured it out. ; Check if window exists. If NOT WinExists ("DarkWars", "") Then ; BROWSER CHECK: If user doesn't have FireFox, use Internet Explorer. If FileExists(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe") Then Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & $URL ) ElseIf FileExists(@ProgramFilesDir & "\Internet Explorer\iexplore.exe") Then Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $URL ) EndIf ElseIf WinExists ("DarkWars", "") Then ; Check if window is active. If Not WinActive("DarkWars") Then WinSetState("DarkWars", "", @SW_SHOW) Endif ; Continue on with script. ; Continue on with script. ; Continue on with script. ; Continue on with script. EndIf Servant 1 http://www.shizzkabiz.com/ 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