Dxnny Posted April 10, 2021 Posted April 10, 2021 I'm trying to figure out a way to perform a 60 minute +10ms countdown timer and once it hits 0, then it will execute a command. I'm just not sure how I would do the timer.
Nine Posted April 10, 2021 Posted April 10, 2021 (edited) Look in help file for those topics, you should be able to perform what your are intending to do with those functions. Edited April 14 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Reveal hidden contents Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Dxnny Posted April 10, 2021 Author Posted April 10, 2021 On 4/10/2021 at 3:14 PM, Nine said: Look in help file for those topics, you should be able to perform what your are intending to do with those functions. Expand I cant find a way to make it display a timer though so I can visually see it counting down before it executes the command
Moderators Melba23 Posted April 10, 2021 Moderators Posted April 10, 2021 Dxnny, Quote I cant find a way to make it display a timer though so I can visually see it counting down Expand There is a logical contradiction in those 2 statements - how can you see it if you cannot make it display? Why not post the code you are using - see here how to do it - then we can perhaps offer you some sensible advice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
major_lee Posted April 10, 2021 Posted April 10, 2021 (edited) Here is a way I use time, it would be more effective to use the clock on pc if you need accuracy. Hotkeys - ESC quits, PAUSE will pause. HotKeySet("{ESC}", "quit") HotKeySet("{PAUSE}", "pause") $clock = 0 $minutes = 0 $seconds = 0 $pause = True Func quit() Exit EndFunc ;==>quit Func pause() If ($pause) Then $pause = False Else $pause = True EndIf EndFunc ;==>pause While $minutes < 60 If ($pause) Then If ($clock == 1000) Then $clock = 0 $seconds = $seconds + 1 EndIf If ($seconds == 60) Then $seconds = 0 $minutes = $minutes + 1 EndIf $clock = $clock + 1 ToolTip($minutes & "." & $seconds) EndIf WEnd ToolTip("timeUp") Sleep(10000) Edited April 10, 2021 by major_lee argumentum 1
argumentum Posted April 11, 2021 Posted April 11, 2021 Skysnake, major_lee and Musashi 3 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
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