Jump to content

Recommended Posts

Posted

Hi... i would to create a simple anticrash application that restart an exe if it isn't running.

like "if notepad.exe is not running then run notepad.exe"

i tried this:

while 1
if WinActive("Blocco Note") Then
    $d=1
Else
    Run("notepad.exe")
endif
wend

But this opens Notepad alse if it is open.

Bye

Posted

HI,

try something like

While 1
    Sleep(200)
    _checkForRunningApp("notepad.exe", "notepad.exe")
WEnd

Func _checkForRunningApp($s_App, $AppPath)
    If ProcessExists($s_App) = 0 Then
        Run($AppPath)
    EndIf
EndFunc

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

Thousand Thanks guys. I know this is a very simple script but i don't know every command of autoit :D and i think it is very usefull for many programs :wacko:

Bye. Thanks again.

Hakuji 8)

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...