C1628 Posted November 1, 2005 Share Posted November 1, 2005 Dear All,Can any expert teach me how to write a script to run a Program.exe in any arbitrary time within a certain period everyday?For example, I want to run a program (C:\Program.exe) in any time between 13:00-14:00 everyday. Today at 13:01, tomorrow at 13:33, day after tomorrow at 13:25, .Please help!! Thanks in advance. Link to comment Share on other sites More sharing options...
themax90 Posted November 1, 2005 Share Posted November 1, 2005 (edited) This is simple. While 1 If _Time = "13:" & Random(00, 60, 1) & ":" & Random(00, 60, 1) And $Run <> -1 Then Run("Program.exe") $Run = -1 ElseIf @HOUR <> 13 Then $Run = 0 EndIf Sleep(10) WEnd Func _Time() $Time = @HOUR & ":" & @MIN & ":" & @SEC Return $Time Endfunc If it is 1pm (or 13) at a Random Minute and Second then it will run Easy Edited November 1, 2005 by AutoIt Smith Link to comment Share on other sites More sharing options...
Kardus Posted November 1, 2005 Share Posted November 1, 2005 This should be moved to the help forum, but I guess it can now be closed since the question is answered... Link to comment Share on other sites More sharing options...
themax90 Posted November 1, 2005 Share Posted November 1, 2005 Yes.... indeed Link to comment Share on other sites More sharing options...
C1628 Posted November 1, 2005 Author Share Posted November 1, 2005 AutoIt Smith, you are of great help! Thank you so much. 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