To change the priority of an existing timer without affecting it in any other way, omit Period. Otherwise, specify an integer between -21474836483647 (or an expression) to indicate this timer's thread priority. The absolute value of Period must be no larger than 4294967295 ms (49.7 days). In any case, the timer's previous Period and Priority are not retained. If a thread started by this timer is still running, the timer is deleted after the thread finishes (unless it has been reenabled) otherwise, it is deleted immediately. If Period is 0, the timer is marked for deletion.For example, specifying -100 would call Function 100 ms from now then delete the timer as though SetTimer Function, 0 had been used. If Period is less than 0, the timer will run only once.If Period is greater than 0, the timer will automatically repeat until it is explicitly disabled by the script.It can be set to repeat automatically or run only once: Otherwise, the absolute value of this parameter is used as the approximate number of milliseconds that must pass before the timer is executed. If omitted and the timer already exists, it will be reset at its former period unless Priority is specified. If omitted and the timer does not exist, it will be created with a period of 250. This parameter must be either given a non-empty value or completely omitted. Note: Passing an empty variable or an expression which results in an empty value is considered an error. For example, SetTimer, 0 can be used inside a timer function to mark the timer for deletion, while SetTimer, 1000 would update the current timer's Period. If Function is omitted, SetTimer will operate on the timer which launched the current thread, if any. This occurs automatically for run-once timers, but can also be done by calling SetTimer with a Period of 0. SetTimer Function, Period, Priority Parameters FunctionĪ reference to the function object is kept in the script's list of timers, and is not released unless the timer is deleted. SetTimer - Syntax & Usage | AutoHotkey v2 SetTimerĬauses a function to be called automatically and repeatedly at a specified time interval.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |