Why does a hotstring stop working?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Why does a hotstring stop working?

28 Apr 2023, 10:58

I know this is a strange question.

I am running several scripts (as executables) in which hotstrings are defined. The scripts are constantly active on my computer, for many days, with the computer occasionally going into power saving mode, of course. But now I observe that after some time the hotstrings do not work anymore, so that I have to terminate and restart the scripts.

Why is this? Can this behavior be prevented somehow?
User avatar
mikeyww
Posts: 26991
Joined: 09 Sep 2014, 18:38

Re: Why does a hotstring stop working?

28 Apr 2023, 11:17

1. Script stopped running
2. Other software captured the same hotkeys
3. Bug in the script
cat dog fox war
Posts: 38
Joined: 15 Mar 2023, 10:18

Re: Why does a hotstring stop working?

28 Apr 2023, 21:47

Code: Select all

unit_time := 10 * 60 * 1000 ; 10 min = 10 * 60 sec = 10 * 60 * 1000 ms
SetTimer, fn_Reload_script, % unit_time * -1 ; just run 1 time

fn_Reload_script() {
    ms := check_some_thing() ; return 0 == is OK
    if (ms == 0)
        Reload

    ; esle case
    SetTimer, fn_Reload_script, % ms * -1 ; just run 1 time
}
Can this behavior be prevented somehow?
before finding the bug , this has not smart, but easy way, SetTimer to Reload.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 87 guests