Modify

#3962 assigned Bug

Not able to interrupt script with hotkey on latest version v3.3.16.1

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: 3.3.16.1 Severity: None
Keywords: interrupt hotkey Cc:

Description

On v3.3.16.1 on a code like this you're unable to interrupt a script with a hotkey:

HotKeySet("{ESC}", "Stop")

MouseClick("left", 300, 300)
MouseClick("left", 600, 300)
MouseClick("left", 600, 600)
MouseClick("left", 300, 600)
MouseClick("left", 300, 300)
MouseClick("left", 600, 300)
MouseClick("left", 600, 600)
MouseClick("left", 300, 600)


Func Stop()
    Exit
EndFunc

On the other hand a script like this will allow the script to be interrupted during the sleeps:

HotKeySet("{ESC}", "Stop")

MouseClick("left", 300, 300)
Sleep(100)
MouseClick("left", 600, 300)
Sleep(100)
MouseClick("left", 600, 600)
Sleep(100)
MouseClick("left", 300, 600)
Sleep(100)
MouseClick("left", 300, 300)
Sleep(100)
MouseClick("left", 600, 300)
Sleep(100)
MouseClick("left", 600, 600)
Sleep(100)
MouseClick("left", 300, 600)


Func Stop()
    Exit
EndFunc

By rolling back to version v3.3.14.5 I'm able to once again interrupt the first script with a hotkey.

Here's the original thread where the matter was discussed:
https://www.autoitscript.com/forum/topic/210479-cant-interrupt-script-on-win11/

Attachments (0)

Change History (2)

comment:1 by Jpm, on Aug 29, 2023 at 6:59:29 AM

Owner: set to Jpm
Status: newassigned

Fix sent to Jon

comment:2 by Jpm, on Feb 20, 2024 at 3:42:51 PM

Owner: changed from Jpm to Jon

Modify Ticket

Action
as assigned The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.