hotkey bindiong

Ask for help, how to use AHK_H, etc.
JlexaCeKC
Posts: 1
Joined: 22 Apr 2023, 05:14

hotkey bindiong

22 Apr 2023, 05:24

Code: Select all

loop_flag1 := false
loop_flag2 := false

Tab::
    loop_flag1 := true
    loop_flag2 := false
    while loop_flag1
    {
        send, {NumpadDot}
        sleep 500
        send, {NumpadDot}
        sleep 500
        send, {NumpadDot}
        sleep 500
        send, {NumpadDot}
        sleep 500
        send, {NumpadDot}
        sleep 500
    }
    return

Space::
    loop_flag2 := true
    loop_flag1 := false
    while loop_flag2
    {
        send, {Space}
        sleep 500
        send, {Space}
        sleep 500
        send, {Space}
        sleep 500
        send, {Space}
        sleep 500
        send, {Space}
        sleep 500
    }
    return

Tab up::
    loop_flag1 := false
    return

Space up::
    loop_flag2 := false
    return

I want to make it so that one code can interrupt the second code if it is active. For example, by pressing tab I will wait only a second and after that I want to break the loop and start another, space. That is, 2 dots will be written, after that I want to write the number three 5 times and so that after this number three more 3 dots from the problog loop are not added


[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 11 guests