Jump to content

Search the Community

Showing results for tags 'runtime'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. Hey, I'd like to create a gui wich records the total runtime of the script. It should tell the hours,minutes and seconds (like this: Running since 00:00:00) This is what I have right now: Local $iTimer, $hGUI, $cLabel $iTimer = TimerInit() $hGUI = GUICreate("") $cLabel = GUICtrlCreateLabel("",300,380,100,20) GUISetState() AdlibRegister("_UpdateLabel",1000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch Wend Func _UpdateLabel() $iTimerDiff = TimerDiff($iTimer) GUICtrlSetData($cLabel,"Running Since " & Round($iTimerDiff/1000,0) & " sec.") EndFunc Thanks in advance
  2. Hey guys, lately I was working on a script... Good thing: the script works well. Bad thing: I would like to create a nice GUI which consists of various elements (1. Start Button, 2. Stop Button, 3. Input [to define the time which the script should work], 4. Timer [which counts the total runtime of the script]). Problem: I know how to create the GUI but I don't know how to create the timers and stuff. I visited some forum sites but I just don't understand how the whole timer stuff works . Maybe someone could help me... Thanks in advance Jannik Rendl
  3. I have a text field in my scripts gui which displays the current runtime. I usually update it using a function, in the script, but i was wondering if there is any other way to keep the Runtime running without having to call the runtime function again and again and while my script is carrying out something else and running other functions. I mean autoit does'nt support multithreading does it?
  4. I am using the code given below to calculate the runtime but, the run time returned is sometimes, slightly lesser (the runtime field on my gui runs is slightly faster than the normal clock) How is this possible? #include <Date.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> Global $iFirst_Run=0 Global $iS_Time=0, $iS_TimeDisp=0 ;test Calc_Runtime(0) Sleep(5000) $test=Calc_Runtime(0) MsgBox("","",$test) $test=Calc_Runtime(1) MsgBox("","",$test) Func Calc_Runtime($choice) If $iFirst_Run=0 Then $iS_TimeDisp = _NowTime(5) $iS_Time = Number(_StringStripChars($iS_TimeDisp, ':')) $iFirst_Run=1 EndIf Local $iTime_Now=Number(_StringStripChars(_NowTime(5), ':')) Local $iR_Time= $iTime_Now - $iS_Time Switch $choice ;1 is for returning in Integer; 0 is for proper display time Case 0 Return $iR_Time Case 1 Return Sec2Time($iR_Time) EndSwitch EndFunc Func _StringStripChars($sString, $sChars) If $sChars == '' Then Return SetError(1, 0, $sString) If $sString == '' Then Return SetError(2, 0, $sString) $sChars = StringRegExpReplace($sChars, '\\([eEqQ])', '\1\\') Return StringRegExpReplace($sString, '[\Q' & $sChars & '\E]', '') EndFunc Func Sec2Time($nr_sec) $nr_sec=$nr_sec $sec2time_hour = Int($nr_sec / 3600) $sec2time_min = Int(($nr_sec - $sec2time_hour * 3600) / 60) $sec2time_sec = $nr_sec - $sec2time_hour * 3600 - $sec2time_min * 60 Return StringFormat('%02d:%02d:%02d', $sec2time_hour, $sec2time_min, $sec2time_sec) EndFunc ;==>Sec2Time
×
×
  • Create New...