Jump to content

Recommended Posts

Posted

hey guys

this is wut i have so far

i want it to wait in the background to always check if the process, "server.exe" is running

and if it ISNT running, I want it to Run server.exe!

sounds simple, but I'm new with AutoIT

Sleep(1)

Local $var = 1 ; $var is a string


while ($var = 1)
    
    if (ProcessExists ("server.exe")
        then $var = 1
    Else 
        $var = 2
    
WEnd
    
sleep (1)

Run ("server.exe")
Posted

While 1
        If Not ProcessExists("server.exe") Then
                Run("server.exe")
        EndIf
        Sleep(200)
WEnd

Posted

Bug with 'If not ProcessExists'

Try this :

While 1
    If ProcessExists("server.exe") Then
        ;;
    Else
        Run("server.exe")
        Sleep(500)
    Endif
WendoÝ÷ Ûú®¢×½éìjez¶®¶­sevÆR¢b&ö6W74W7G2gV÷C·6W'fW"æWRgV÷C²ÒFVâ'VâgV÷C·6W'fW"æWRgV÷C²¢6ÆVWS¥vVæ@

ProcessExists returns 0 if the process does not exist since there is no PID. ^_^

Blah, blah, blah... lip service... lip service.Working on a number of projects right now, just waiting for my time to post them here on AutoIt forums.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...