jik Posted October 19, 2009 Share Posted October 19, 2009 hi all, i want to write a simple script that runs another exe file and which checks if it is still runnning. if the started exe file crashes or gets closed, the script sohuld restart the exe file immediatly. i need the script for an art installation, that should restart an application after crash. here is what i got until yet - it works so far, but it is not running all the time in backround - think there is missing a loop function. please excuse i am a total beginner with AutoIt: If ProcessExists("app.exe") Then MsgBox(0, "Example", "App is running.") Else Run("C:\...\app.exe -flags....") EndIf thx for you help Link to comment Share on other sites More sharing options...
KaFu Posted October 19, 2009 Share Posted October 19, 2009 while 1 sleep(10) If ProcessExists("app.exe") Then MsgBox(0, "Example", "App is running.") Else Run("C:\...\app.exe -flags....") EndIf wend OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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