Sign in to follow this  
Followers 0
Mehboob

Scheduled Task every 2 Seconds

5 posts in this topic

Hello Guys,

I am very new into scripting so I have no clue how to get this done. I have been looking for the solution over the internet for the last two days but have not been able to come up with any solutions.

So here is what I need :

I need a script that will run on the background every two seconds to check if a software is running or not. If it is running then it will do nothing. But if the software has been shoutdown it will start the software using the command "start.exe 2"

I need it to be running the the backgroup, should not popup or something.. Can some one help me out with a script. I would really appreciate it.

Waiting for a reply. Thank You.

Share this post


Link to post
Share on other sites



You could make another script using a while loop. Example:

While 1

If not processexists(process.exe) then

run('command "start.exe 2"')

endif

sleep(25)

WEnd

You can also incorporate this idea into your main script to make sure this program isn't closed. That way, neither of the scripts can be closed.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

You could make another script using a while loop. Example:

While 1

If not processexists(process.exe) then

run('command "start.exe 2"')

endif

sleep(25)

WEnd

You can also incorporate this idea into your main script to make sure this program isn't closed. That way, neither of the scripts can be closed.

Alright let me try this out.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What is this for... exactly?

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

What is this for... exactly?

8)

I got it working. Its for a software that I want my computer to run all the time.

Now I have another thing that I need to concentrate at. What I want is that my computer will check if my computer is online, if it is online then it will connect to the internet. I will be using PPPOE.

Here is the quote that I am refering man :

$var = Ping("www.AutoItScript.com")
If Not $var  Then; also possible:  If @error = 0 Then ...
[What command to I use to connect to the interet "PPPOE"]
Else
    Msgbox(0,"Status","Online, roundtrip was:" & $var)
EndIf

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