sebsabul Posted April 3, 2005 Share Posted April 3, 2005 Hey guys, I need some help. I don´t know how my script don´t work. Can you verfier it, please? Here is my source: Sleep(20000) $var = IniRead("C:\Windows\System\status.ini", "section2", "key", "NotFound") If $var = "enabled" Then Run("C:\Windows\System\disabled.exe") EndIf Ping("192.168.0.3",40000) If @error = 0 Then Msgbox(0,"Status","Online") Do Ping("192.168.0.3",40000) Until @error <> 0 Run("C:\Windows\System\enabled.exe") While 1 = 1 Do Ping("192.168.0.3",40000) Until @error = 0 Run("C:\Windows\System\disabled.exe") Do Ping("192.168.0.3",40000) Until @error <> 0 Run("C:\Windows\System\enabled.exe") Wend Else Run("C:\Windows\System\enabled.exe") Do Ping("192.168.0.3",40000) Until @error = 0 Run("C:\Windows\System\disabled.exe") While 1 = 1 Do Ping("192.168.0.3",40000) Until @error <> 0 Run("C:\Windows\System\enabled.exe") Do Ping("192.168.0.3",40000) Until @error = 0 Run("C:\Windows\System\disabled.exe") Wend EndIf The Problem: The script don´t wait of another Status. He change from disabled to enabled every (ca.) 20 seconds(So he execute ca. every 20 seconds a Run) When the user is online the script should WAIT until the user is offline and the execute. Can you help. Thank you for answers. Link to comment Share on other sites More sharing options...
sebsabul Posted April 3, 2005 Author Share Posted April 3, 2005 PLEASE HELP! Link to comment Share on other sites More sharing options...
sebsabul Posted April 3, 2005 Author Share Posted April 3, 2005 Can nobody help? Link to comment Share on other sites More sharing options...
sylvanie Posted April 3, 2005 Share Posted April 3, 2005 hello, humm, maybe it's a problem of timing between the end of Run("....") and Ping(..). Try to replace run(...) by runwait(....) I hope it'll help you... Link to comment Share on other sites More sharing options...
sebsabul Posted April 3, 2005 Author Share Posted April 3, 2005 THANK YOU! I WILL TRY IT! 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