Jump to content

Search the Community

Showing results for tags 'timer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


  • 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


Last Updated

  • Start


Filter by number of...


  • Start






Found 22 results

  1. 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("L
  2. 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 ?
  3. 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
  4. Hey guys, I would like to create a simple Timer which starts counting down if a key is pressed and after running out of time making a sound. Afterwards it should reset and wait again for the same key to be pressed to start again. I am new to autoit and really don't know how to get started... How I would try to do it: while(1) WEnd HotKeySet("{F9}", "_Timer") Func _Timer() ;FUNCTION HERE but I don't know what to do there :& EndFunc Best regards and thanks in advance JR
  5. 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 ) #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 cau
  6. I am trying to allow the GUI to gather info as to when to execute a function. I am having trouble doing this. So far this is what I have. ;Timer Func timer () If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Timer","Please format your answer in 00:00:00:000") Select Case $iMsgBoxAnswer = 6 ;Yes Global $infotime = InputBox ('Time', 'What time to execute?') Do $rawtimer = ToolTip(@Hour & ':' & @Min & ':' & @Sec & ':' & _MSec()) until $ra
  7. Hi, I searched a lot here but didn't find what I want. Most of them were countdown and other stuff and back to 2004. I just want a normal timer that when a button on gui is pressed, it starts from 00:00:00 and goes up.
  8. Hi all. I need execute a function at a certain time for example at 00:00 and 12:00. My initial idea is use a infinite loop that take the time system and compare with the specified time. I do not know if this is the right way to do it. I think this must have occupied the processor for a long time. I would appreciate if comment on whether this is the system that you would use to do this kind of task or if you know any UDF to perform this function. Thanks to all
  9. Hi all, I am looking for a quick tip on why my autoit script crashes when I run a timer. Currently I have this code: ....(more code above this).... Case $button2 function1() Case $butTimer _Timer_setTimer($hGUI, 3200, "_timedout") ...... Func _timedout() Msgbox(0, "Timed out", "Time is up!") Endfunc When the button is pressed, my timer starts, correct? It doesnt seem to matter if I have it on button activation or not, after the
  10. Hello, i havê been reading, and thinking.. Im on my tablet só i WLL try explain what im trying to do.... Will havê an GUI with 8 timer input that havê to set timer, but wen our if 2 our more ends at some time it havê to run 1, then outher , then outher Timer 1, - input 5 minutes, timer 2 - input 10, timer 3 input 15, timer 4 - input 8,...... At some time, timer 1 will end ate some time of timer 2 / then it at some time will end at some time timer 2 and 3 How i said that wen it happpens first is 2 then 1, then outhers and if 1 is done then 1st is 3, will have more than 9 input boxes that can
  11. Hello everyone I am encountering a strange problem with timers... i.e wrong time difference . This is an test script made by me to compare Arrays & Maps in terms of speed, I wanted publish the results in my Maps topic, so I am hiding the question in the spoiler to prevent spoilage If you run the script(s), you can see that sometimes the time difference is >1 but the actual difference is almost instantaneous, I don't know what is causing the problem, I think the problem is in my end this time because I used both native and UDF functions and they return identical results... However I s
  12. Hello, just sharing my good old CPU, RAM, TIME widget. CONTY.rar
  13. 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-c
  14. It's been a long time since I use autoit, and its time to share something and help to someone. Now I just wanna to share something from my work, to contribute to the community. This project is made on request from my friend. Maybe this will help someone to make something else like NewYear countdown #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=blue_shutdown.ico #AutoIt3Wrapper_Outfile=Auto ShutDown.Exe #AutoIt3Wrapper_Res_Description=Auto Shutdown for PC #AutoIt3Wrapper_Res_Fileversion=1.1 #AutoIt3Wrapper_Res_LegalCopyright=Boris Kerkez - boriskerkez
  15. Hi all! I am perplexed by something that should be simple. I am trying to make a small timer which will become part of a larger script, but I'm stuck on comparing the 2 times.. When you run the script, you hit OK on a message box, that's when the current system time and day of the year is saved to a variable.. when you hit OK again, the timer is stopped and the date and time are compared. I'm not using Timerinit() because I want the exact system time the timer started, and the exact system time the timer stopped. Then the time is compared and you get the difference. This is easy as long as
  16. 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 = GUICtrlCreateButt
  17. Hello, I have to ask, how many times TimerInit() can be initialized? Lets think I have a subfunc in a script and the TimerInit() in that subfunc will be caled from time to time. Will that timer be destroyed when subfunc returns to mainfunc? If not how can I destroy it by script? Thanks a lot. Greetings Andrew
  18. Here is my wrapper for SetTimer and KillTimer APIs. AutoIt already has its own, but I tried to make it as simple as I could. #include-once Global $g_avSimpleTimers = [[0, 0]] Func TimerSet($vFunction, $uInterval) Local $hFunction = DllCallbackRegister($vFunction, "none", "HWND;UINT;UINT_PTR;DWORD") If ($hFunction = 0) Then Return 0 Local $uTimerId = DllCall("user32.dll", "UINT_PTR", "SetTimer", _ "HWND", 0, _ "UINT_PTR", 0, _ "UINT", $uInterval, _ "ptr", DllCallbackGetPtr($hFunction))[0] If ($uTimerId = 0) Then DllCallbackFree($hFunction) Return 0 EndIf ReDim $g_a
  19. Hello again. First of all, this is a "version 2.0" of the scipt posted at '?do=embed' frameborder='0' data-embedContent>> if you'd like to get the whole picture of this. What I have is a ListView created with GUICtrlCreateListView with, f.ex, columns "a" and "b". The number of items in the ListView will vary all from "0" to "n", all based on the user. In column "a" there will be a string which will decide what function to be run, and in column "b" there will be a value of at what interval the specific function will be ran. In the original script I've used _Timer_SetTimer as a glo
  20. Hi guys, I have a problem involving measuring the time it takes a program to load. I'm writing a script that launches a program, records the time, and then ends the time when the program is responsive(I.E, you can move the mouse and all the buttons work). Since WinWait wasn't working, I tried using ControlCommand with IsVibible on certain buttons, the problem with this approach is that buttons are visible before they are responsive? What is the best way to go about solving this problem? Should I use getpixelcolor or something? Best, Athos
  21. So I have some timers which I reset periodically, but my problem is that they don't wait for the functions before them to finish and in a strange way reset beforehand. -snip- timerinit doesnt wait the mouseclick and sleep functions to finish
  22. I am trying to write a script that keeps accurate time regardless of how long functions take to preform their actions. I thought this would be pretty straight forward. I use several while loops to keep track of days, hours, mins, and secs. But for some reason it is not working correctly. Global $day, $hour, $min, $sec $time = TimerInit() While 1 ;Main Loop $hour = 0 ;Reset hours While $hour <= 23;Loop while hours is less than 24 hours $min = 0 ;Reset minutes While $min <= 59 ;Loop while minutes is less than 60 minutes $sec = 0 ;Reset seconds While $sec <= 59 ;
  • Create New...