Sign in to follow this  
Followers 0
Othersounds

script to Check if app is Active

3 posts in this topic

Hi, Im completely new to Autoit and I need to make two specific scripts.

First Script:

1. When windows boot open the script

2. The script should check if an application is active (open) every 10 seconds

3. If the application is not active, open it

4. Keep checking

Second Script:

When the Autoit script is open - reboot the computer

(the computer in this case login directly, no password etc needed)

Can anyone point me to examples who illustrates this two app?.

Has anyone seen or done any of this script in the forum?

In the mean while Ill start reading the help/tutorials etc. Im not a programmer, so it will take me a while.

Any help is much appreciated

Many thanks,

Felix

Share this post


Link to post
Share on other sites



Hi,

Many thanks; Ill try your script

I did this one, it works ok for me:

CODE

RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CheckApp.exe", "REG_SZ", @ScriptFullPath)

run ("the.exe ")

For $i = 1 to 100

ProcessWaitClose("the.exe")

Run("the.exe ")

Next

Shutdown (2)

for the second script that i need a simple Shutdown (2) works find

Other suggestions?

Thanks again,

Felix

First Script (not sure if you want WinActive or WinExists):

FileCopy(@ScriptFullPath, @StartupDir, 1)

While 1
    If Not WinActive("application", "text") Then Run/ShellExecute("application path")
    Sleep(10000)
WEnd

I don't understand the second.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0