Jump to content
argumentum

Timer thing (yep, another one)

Recommended Posts

I wanted a timer, could not find what I wanted and wrote this. Posted for the next lazy one, like me, copy'n'paste kind of ppl.
And added an "Alarm", ( at times I need it to trigger at a time and not, in so many minutes )
Also added an "insist/replay" ( since I'm coding, might as well have the feature )
timerThing.png

#NoTrayIcon
#include <TrayConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("MustDeclareVars", 1) ; removes the chance for misspelled variables causing bugs.
Opt("TrayMenuMode", 3) ; The default tray menu items will not be shown and items are not checked when selected. These are options 1 and 2 for TrayMenuMode.
Opt("TrayOnEventMode", 1) ; Enable TrayOnEventMode.
Opt("GUIOnEventMode", 1) ; OnEvent functions notifications

Global $seconds = 0, $g_sec, $g_min, $g_hr, $started = False, $sec = 99, $aTimeHold[3], $g_IsAlarm = 0, $iAppTitle, $sAppTitle = timerTitle()
$iAppTitle = @extended


#Region ### START Koda GUI section ### Form=\\WDMYCLOUDEX4100\Public\[FMIS]\au3_Shared_projects\timerThing.kxf
Global $Form1 = GUICreate($sAppTitle, 245, 74, @DesktopWidth - 275 - (40 * $iAppTitle), 20 + (40 * $iAppTitle), -1, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
Global $idHour = GUICtrlCreateInput("00", 5, 4, 49, 32, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER))
Global $idMin = GUICtrlCreateInput("00", 58, 4, 49, 32, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER))
Global $idSec = GUICtrlCreateInput("00", 110, 4, 49, 32, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER))
Global $idStart = GUICtrlCreateButton("Start Timer", 163, 6, 75, 61, $BS_MULTILINE)
Global $idTitle = GUICtrlCreateInput("", 4, 40, 129, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_WANTRETURN))
Global $idAlarm = GUICtrlCreateCheckbox("", 137, 53, 17, 19, BitOR($GUI_SS_DEFAULT_CHECKBOX, $BS_RIGHTBUTTON))
Global $idInsist = GUICtrlCreateCheckbox("", 137, 37, 17, 19, BitOR($GUI_SS_DEFAULT_CHECKBOX, $BS_RIGHTBUTTON))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUICtrlSetFont($idHour, 14, 800)
GUICtrlSetFont($idMin, 14, 800)
GUICtrlSetFont($idSec, 14, 800)
GUICtrlSetFont($idStart, 12, 800)
GUICtrlSetFont($idTitle, 12, 800)

GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUICtrlSetOnEvent($idStart, "idStartClick")
GUICtrlSetOnEvent($idTitle, "idTitleChange")
GUICtrlSetOnEvent($idAlarm, "idAlarmEvent")

TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "OnTray_PRIMARYDOUBLE")

GUICtrlSetTip($idStart, 'press ENTER or click' & @CR & @CR & 'once started, on close,' & @CR & 'will move to the tray area.')
GUICtrlSetTip($idHour, 'Hours' & @CR & @CR & 'enter the hours' & @CR & 'and press ENTER')
GUICtrlSetTip($idMin, 'Minutes' & @CR & @CR & 'enter the minutes' & @CR & 'and press ENTER')
GUICtrlSetTip($idSec, 'Seconds' & @CR & @CR & 'enter the seconds' & @CR & 'and press ENTER')
GUICtrlSetTip($idTitle, 'Type a title for this' & @CR & 'timer and press ENTER')
GUICtrlSetTip($idAlarm, 'Swap between' & @CR & 'Timer and Alarm' & @CR & 'functionality')
GUICtrlSetTip($idInsist, 'Replay the alert' & @CR & 'every 10 sec.' & @CR & 'for 10 min.')

;~ If Not FileGetSize("timerThing.wav") Then FileInstall("timerThing.wav", "timerThing.wav") ; if you wanna include your WAV file

Global $hForm1 = WinGetHandle($Form1)
Global $idDummy = GUICtrlCreateDummy()
Global $aAccelKeys[1][2] = [["{Enter}", $idDummy]]
GUISetAccelerators($aAccelKeys)
GUICtrlSetOnEvent($idDummy, "On_idDummy")

While 1
    Sleep(50)
    If Not $started Then ContinueLoop
    If $sec = @SEC Then ContinueLoop
    $sec = @SEC
    Countdown()
WEnd

Func Form1Close()
    If $started Then
        TraySetState(1)
        WinSetState($hForm1, "", @SW_HIDE)
    Else
        GUIDelete()
        Exit
    EndIf
EndFunc   ;==>Form1Close

Func Countdown() ; mod. from https://www.autoitscript.com/forum/topic/135227-simple-counter/?do=findComment&comment=950305
    If $g_IsAlarm Then
        If Int(GUICtrlRead($idHour)) = Int(@HOUR) And Int(GUICtrlRead($idMin)) = Int(@MIN) And Int(GUICtrlRead($idSec)) = Int(@SEC) Then
            $seconds = -1
        Else
            Return
        EndIf
    EndIf
    $g_sec = Mod($seconds, 60)
    $g_min = Mod($seconds / 60, 60)
    $g_hr = Floor($seconds / 60 ^ 2)
    If $seconds < -3 Then Return
    TrayToolTip()
    $seconds -= 1
    If $seconds = -2 Then
        GUICtrlSetState($idInsist, $GUI_DISABLE)
        If GUICtrlRead($idInsist) = 1 Then
            $seconds = -5
            InsistPlayTheWAV()
            AdlibRegister("InsistPlayTheWAV", 10000)
        Else
            playTheWAV()
        EndIf
        Return
    EndIf
    If $seconds < -1 Then Return
    GUICtrlSetData($idHour, StringFormat("%02i", $g_hr))
    GUICtrlSetData($idMin, StringFormat("%02i", $g_min))
    GUICtrlSetData($idSec, StringFormat("%02i", $g_sec))
EndFunc   ;==>Countdown

Func playTheWAV()
    OnTray_PRIMARYDOUBLE()
    WinActivate($hForm1)
    If Not FileGetSize(@ScriptDir & "\timerThing.wav") Then
        SoundSetWaveVolume(25)
        SoundPlay(@WindowsDir & "\media\tada.wav")
    Else
        SoundSetWaveVolume(5)
        SoundPlay(@ScriptDir & "\timerThing.wav")
    EndIf
EndFunc   ;==>playTheWAV

Func InsistPlayTheWAV()
    Local Static $t = 0
    If $t = 0 Then $t = TimerInit()
    playTheWAV()
    If TimerDiff($t) > 600000 Then
        AdlibUnRegister("InsistPlayTheWAV")
        $t = 0
    EndIf
EndFunc   ;==>InsistPlayTheWAV

Func TrayToolTip()
    Local $title = $sAppTitle
    If GUICtrlRead($idTitle) Then $title = GUICtrlRead($idTitle)
    TraySetToolTip('' & _
            $title & @CR & _
            GUICtrlRead($idHour) & ":" & GUICtrlRead($idMin) & ":" & GUICtrlRead($idSec) & @CR & @CR & _
            'Double' & @CR & _
            'Click to' & @CR & _
            'restore' & @CR & @CR & ' ')
EndFunc   ;==>TrayToolTip

Func idStartClick()
    Local $title = $sAppTitle
    If GUICtrlRead($idTitle) Then $title = GUICtrlRead($idTitle)
    WinSetTitle($hForm1, "", $title)
    $sec = 99
    $started = Not $started
    Switch $started
        Case True
            GUICtrlSetData($idStart, StringReplace(GUICtrlRead($idStart), "Start", "STOP"))
            $seconds = (Int(GUICtrlRead($idHour)) * 60 * 60) + (Int(GUICtrlRead($idMin)) * 60) + Int(GUICtrlRead($idSec))
            $aTimeHold[0] = StringFormat("%02i", GUICtrlRead($idHour))
            $aTimeHold[1] = StringFormat("%02i", GUICtrlRead($idMin))
            $aTimeHold[2] = StringFormat("%02i", GUICtrlRead($idSec))
            GUICtrlSetState($idStart, $GUI_FOCUS)
            GUICtrlSetState($idHour, $GUI_DISABLE)
            GUICtrlSetState($idMin, $GUI_DISABLE)
            GUICtrlSetState($idSec, $GUI_DISABLE)
            GUICtrlSetState($idAlarm, $GUI_DISABLE)
        Case Else
            GUICtrlSetData($idStart, StringReplace(GUICtrlRead($idStart), "STOP", "Start"))
            GUICtrlSetData($idHour, $aTimeHold[0])
            GUICtrlSetData($idMin, $aTimeHold[1])
            GUICtrlSetData($idSec, $aTimeHold[2])
            GUICtrlSetState($idHour, $GUI_ENABLE)
            GUICtrlSetState($idMin, $GUI_ENABLE)
            GUICtrlSetState($idSec, $GUI_ENABLE)
            GUICtrlSetState($idAlarm, $GUI_ENABLE)
            GUICtrlSetState($idInsist, $GUI_ENABLE)
            GUICtrlSetState($idStart, $GUI_FOCUS)
    EndSwitch
EndFunc   ;==>idStartClick

Func On_idDummy()
    Local $i, $s = ControlGetFocus($hForm1)
    $i = Int(StringRight($s, 1))
    If $s = "Button1" Then Return ControlClick($hForm1, "", "Button1")
    If StringInStr($s, "Edit") Then
        Switch $i
            Case 1, 2, 3
                Send("{Tab}")
        EndSwitch
    EndIf
EndFunc   ;==>On_idDummy

Func idTitleChange()
    Local $title = $sAppTitle
    If GUICtrlRead($idTitle) Then $title = GUICtrlRead($idTitle)
    WinSetTitle($hForm1, "", $title)
EndFunc   ;==>idTitleChange

Func timerTitle()
    Local $n, $i = 0
    For $n = 1 To 1000
        If Not WinExists(" Timer  thing [" & $n & "]") Then
            AutoItWinSetTitle(" Timer  thing [" & $n & "]")
            $i = $n - 1
            If 40 * $n > @DesktopHeight - 150 Then $i = 1
            Return SetError(0, $i, " Timer " & $n)
        EndIf
    Next
    Return SetError(1, $i, " Timer ???")
EndFunc   ;==>timerTitle

Func OnTray_PRIMARYDOUBLE()
    TraySetState(2)
    WinSetState($hForm1, "", @SW_SHOW)
EndFunc   ;==>OnTray_PRIMARYDOUBLE

Func idAlarmEvent()
    ConsoleWrite('+ Func idAlarmEvent() : ' & GUICtrlRead($idAlarm) & @CRLF)
    If GUICtrlRead($idAlarm) = 1 Then
        $g_IsAlarm = 1
        GUICtrlSetData($idStart, StringReplace(GUICtrlRead($idStart), "Timer", "Alarm"))
        $sAppTitle = StringReplace($sAppTitle, "Timer", "Alarm")
    Else
        $g_IsAlarm = 0
        GUICtrlSetData($idStart, StringReplace(GUICtrlRead($idStart), "Alarm", "Timer"))
        $sAppTitle = StringReplace($sAppTitle, "Alarm", "Timer")
    EndIf
    idTitleChange()
EndFunc   ;==>idAlarmEvent

 

Edited by argumentum
updated the code

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

  • Similar Content

    • By argumentum
      I was looking for something like this, in the forum and my HDD. Bad hair day. Anyway,
      Here is the code
      If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox(262144, @ScriptName, "...please run this example from editor.", 3) #include <Date.au3>; for _EstimatedTime() #include <InetConstants.au3>; for _EstimatedTime_Example_2() ;=============================================================================== ; ; Function Name: _EstimatedTime() ; https://www.autoitscript.com/forum/topic/177371-_estimatedtime-calculate-estimated-time-of-completion/ ; Description: calculate estimated time of completion ; Parameter(s): $a - holds the data ; $iCurrentCount - Current count ; $iTotalCount - Total count ; Requirement(s): #include <Date.au3> ; Return Value(s): false on incomplete data for assessment ; Author(s): argumentum ; Note(s): read the comments ; ;=============================================================================== Func _EstimatedTime(ByRef $a, $iCurrentCount = "", $iTotalCount = "") If $iCurrentCount & $iTotalCount = "" Then ; initialize $a = "" Dim $a[12] $a[5] = TimerInit() ; handle for TimerDiff() $a[0] = "00:00:00" $a[1] = "00:00:00" $a[2] = _NowCalc() ; starting date and time $a[3] = "" $a[4] = "0" Else If $iTotalCount = 0 Then Return False If $iCurrentCount > $iTotalCount Then $iCurrentCount = $iTotalCount _TicksToTime(Int(TimerDiff($a[5])), $a[6], $a[7], $a[8]) _TicksToTime(Int((TimerDiff($a[5]) / $iCurrentCount) * ($iTotalCount - $iCurrentCount)), $a[9], $a[10], $a[11]) $a[0] = StringFormat("%02i:%02i:%02i", $a[6], $a[7], $a[8]) ; elapsed time $a[1] = StringFormat("%02i:%02i:%02i", $a[9], $a[10], $a[11]) ; estimated total time $a[3] = _DateAdd("s", Int((TimerDiff($a[5]) / $iCurrentCount) * ($iTotalCount) / 1000), $a[2]) ; estimated date and time of completion $a[4] = Int($iCurrentCount / $iTotalCount * 100) ; percentage done EndIf Return True EndFunc ;==>_EstimatedTime _EstimatedTime_Example_1() Func _EstimatedTime_Example_1() ConsoleWrite(@CRLF & "+ Example 1" & @CRLF) ConsoleWrite("elapsed " & @TAB & "estimated" & @TAB & "starting date time " & @TAB & "estimated date time" & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) Local $n, $sec = @SEC, $aETTF ; "Estimated Time To Finish" data holder _EstimatedTime($aETTF) ; called with just the data holder to init. it For $n = 1234 To 1 Step -1 Sleep(1) If $sec <> @SEC Then $sec = @SEC _EstimatedTime($aETTF, 1234 - $n, 1234) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) EndIf Next _EstimatedTime($aETTF, 1234 - $n, 1234) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) EndFunc ;==>_EstimatedTime_Example_1 _EstimatedTime_Example_2() Func _EstimatedTime_Example_2() ConsoleWrite(@CRLF & "+ Example 2" & @CRLF) ConsoleWrite("elapsed " & @TAB & "estimated" & @TAB & "starting date time " & @TAB & "estimated date time" & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) Local $aETTF ; "Estimated Time To Finish" data holder _EstimatedTime($aETTF) ; called with just the data holder to init. it ; Save the downloaded file to the temporary folder. Local $sFilePath = @MyDocumentsDir & "\tempFile.bin" Local $sLink = "http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Platform/PortableApps.com_Platform_Setup_12.0.5.paf.exe?r=http%3A%2F%2Fsourceforge.net%2Fdirectory%2Fbusiness-enterprise%2Fos%3Awindows%2Ffreshness%3Arecently-updated%2F&ts=1442615522&use_mirror=iweb" ; Download the file in the background with the selected option of 'force a reload from the remote site.' Local $hDownload = InetGet($sLink, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) ; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True. Do Sleep(1000) If _EstimatedTime($aETTF, InetGetInfo($hDownload, $INET_DOWNLOADREAD), InetGetInfo($hDownload, $INET_DOWNLOADSIZE)) Then ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) Else ConsoleWrite(". ") EndIf Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) ; Retrieve the number of total bytes received and the filesize. Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD) Local $iFileSize = FileGetSize($sFilePath) ; Close the handle returned by InetGet. InetClose($hDownload) _EstimatedTime($aETTF, $iBytesSize, $iFileSize) ConsoleWrite($aETTF[0] & @TAB & $aETTF[1] & @TAB & $aETTF[2] & @TAB & $aETTF[3] & @TAB & $aETTF[4] & @CRLF) ConsoleWrite(" _NowCalc() = " & _NowCalc() & @CRLF) ; Display details about the total number of bytes read and the filesize. ConsoleWrite("The total download size: " & $iBytesSize & " - The total filesize: " & $iFileSize & @CRLF) ; Delete the file. FileDelete($sFilePath) EndFunc ;==>_EstimatedTime_Example_2  
    • By Chimp
      Simple and generalpurpose stopwatch function

      the GUI interface is not a "finished product" but a simple example to show how to use the function.
      ; --- simple example of use --- #include <GUIConstantsEx.au3> $Form1_1 = GUICreate("Stopwatch", 170, 70);, 100, 100) $LapsedTime = GUICtrlCreateLabel(" 00:00:00.0", 10, 10, 200, 25) GUICtrlSetTip(-1, "Lapsed time") GUICtrlSetFont(-1, 18) $Button1 = GUICtrlCreateButton("halt/go", 10, 40, 50, 20) ; go / pause GUICtrlSetTip(-1, "Pause/Unpause counting") $Button2 = GUICtrlCreateButton("clear", 60, 40, 50, 20) ; reset GUICtrlSetTip(-1, "Clears counter and stops") $Button3 = GUICtrlCreateButton("restart", 110, 40, 50, 20) ; restart GUICtrlSetTip(-1, "Clears counter and restarts") GUISetState(@SW_SHOW) Stopwatch(2) ; reset to 0 and stops While 1 $x = Int(Stopwatch() / 100) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ; toggle status (go <-> pause) Stopwatch() ; this reads counter and sets @extended according to actual $paused status Stopwatch(@extended) ; if is paused (@extended = 1) then unpause [Stopwatch(1)] ; if is unpaused (@extended = 0) then pause [Stopwatch(0)] Case $Button2 ; reset to 0 and stop counter Stopwatch(2) Case $Button3 ; reset to 0 and restart counter Stopwatch(3) EndSwitch If $x <> Int(Stopwatch() / 100) Then $totsec = Int(Stopwatch() / 1000) ; ms to sec $hr = Int($totsec / 3600) ; hours $mn = Int(($totsec - ($hr * 3600)) / 60) ; minutes $sc = Int(($totsec - ($hr * 3600) - ($mn * 60))) ; seconds $tn = Int((Int(Stopwatch() / 100) - ($hr * 36000) - ($mn * 600) - ($sc * 10))) ; tenths of a second GUICtrlSetData($LapsedTime, " " & StringFormat("%02s", $hr) & ":" & StringFormat("%02s", $mn) & ":" & StringFormat("%02s", $sc) & "." & StringFormat("%01s", $tn)) EndIf WEnd ; --- end of example --- ; #FUNCTION# (snippet) ========================================================================================================== ; Name...........: Stopwatch ; Description ...: returns the number of milliseconds counted (according to actions requests by caller) ; Syntax.........: Stopwatch([$action]) ; Parameters ....: $action: 0 - pause counting ; 1 - resume counting ; 2 - reset counter to 0 and stops ; 3 - reset counter to 0 and start counting ; 4 - (default) just ruturns actual counting value and status (status in @extended) ; ; Return values .: number of milliseconds in counter ; @extended contains paused status (1 or 0) ; 1 if stopwatch is in pause ; 0 if stopwatch is counting ; ; Author ........: Chimp ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: yes ; =============================================================================================================================== Func Stopwatch($ToggleTo = 4) Static Local $Paused = True Static Local $Stopwatch = 0 Static Local $TotalTime = 0 Switch $ToggleTo Case 0 ; pause counter If $Paused Then SetExtended($Paused) ; $Paused status Return $TotalTime ; already paused, just return current $TotalTime Else $TotalTime += TimerDiff($Stopwatch) $Paused = True SetExtended($Paused) Return $TotalTime EndIf Case 1 ; unpause counter If $Paused Then $Stopwatch = TimerInit() $Paused = False SetExtended($Paused) Return $TotalTime Else SetExtended($Paused) Return $TotalTime + TimerDiff($Stopwatch) EndIf Case 2 ; reset to 0 and pause $Paused = True $TotalTime = 0 SetExtended($Paused) Return $TotalTime Case 3 ; reset to 0 and restart $Paused = False $TotalTime = 0 $Stopwatch = TimerInit() SetExtended($Paused) Return $TotalTime Case 4 ; return status SetExtended($Paused) If $Paused Then Return $TotalTime Else Return $TotalTime + TimerDiff($Stopwatch) EndIf EndSwitch EndFunc ;==>Stopwatch P.S.
      If you need a finished stopwatch with a nice gui and more functions, take a look to this one by AZJIO
    • By dersiniar
      Hihi guys several hours messing and i still cat figure out why timer wont reset in my func.
      Func shold loop untill timer difference and then it shold do other things including to reset timer as well.
      Timer otself works good. after 30seconds it goes to next func. it just dosnt reset timer. 
      Func _Start() While 1 If TimerDiff($hTimer) > 30 * 1000 Then ; Wait for 10 secs $hTimer = 0 $hTimer = TimerInit() Sleep(100) _Image() Sleep(100) _actTimer() Sleep(100) Else MouseClick("Left", $aPos6[0], $aPos6[1], 1) MouseClick("Left", $aPos4[0], $aPos4[1], 1) MouseClick("Left", $aPos5[0], $aPos5[1], 1) MouseClick("Left", $aPos7[0], $aPos7[1], 150,0) Sleep(100) EndIf WEnd EndFunc  
    • By mrtgtr
      I want to do something , after wait 2 min and again do same thing
      But I do do not want with sleep, it must be timer 
      How I do this ?
    • By TotalAuto
      Howdy All
      I've gone around and around in circles wasting hours trying to fix this problem to no avail so I thought I would try posting for help given there are some real smart people in this forum.
      Background
      I have 5 separate .au3 scripts that all do different basic tasks. For example:
      1.au3 = opens Chrome browser to obtain information from a specific website then closes
      2.au3 = opens an Excel workbook to run a macro then saves and closes
      3.au3 = Open two seperate workbooks and transfers data from one to the other then saves and closes
      4.au3 = .......etc
      5.au3 = .......etc
      These 5 separate scripts, doing completely different tasks, need to each run once per day at 5 different designated times within a day and then close. For example:
      1.au3 = 10am
      2.au3 = 12pm
      3.au3 = 2pm
      4.au3 = 4pm
      5.au3 = 5pm
      Problem
      I can not get these different scripts to reliably run at their designated times. When I manually run these scripts individually by using 'Go F5' they work perfectly. If I convert these scripts to an .exe and manually run each one they work about 98% of time.
      How can I schedule these different .au3 files or associated .exe files to reliably run each day at different times?
      Attempts To Fix The Issue
      1. I have tried converting each .au3 script into their own .exe file and use Window's Task Scheduler to run these .exe files at their designated time but the success rate  of running each .exe in full, to completion, without error is very low at about 30%. Things that commonly go wrong include a browser not opening but movement still continues on the desk top. Other times things just do not happen at all.
      2. I have Windows 7 64 bit and have tried creating and running both (x86) and (x64) .exe files but again reliability problems exist;
      3. I have also tried moving each .exe file to the My Documents folder as I read someone that keeping your files on your desktop ties your files to individual Windows user profiles which can cause AutoIt operating errors. Not sure if this is correct but thought I would try it anyway. It did not fix my issue.
      4. I installed a program called AlwaysUp which supposedly always reliably runs in the background and will reliably execute your AutoIt script or .exe files. Still have significant reliability issues.
      Therefore, can someone please provide advice on how I can get my 5 different .au3 files to run at 5 designated times through the day, every day, without fail? Overtime I will be creating more and more different .au3 files to run certain tasks throughout the day and do not want to create one large AutoIt file that continually runs and attempts to do all the different tasks itself.
      Any help is very appreciated.
      Thanks
      Dan
       
       
×
×
  • Create New...