Bug Report: F5 hotkey for Reload not working (sometimes)

The popular SciTE-based AutoHotkey Script Editor
Posts: 7
Joined: 05 Jun 2017, 16:19

Bug Report: F5 hotkey for Reload not working (sometimes)

30 Jun 2017, 13:12


In SciTE4AutoHotkey, I added the following line to my script:

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance Force  ; When reloading the script, skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.

As a result, when I click the Run script button or press the F5 hotkey in SciTE4AutoHotkey, the old instance of my script is replaced with a new instance without prompting me. Nice.

The problem: While clicking on the Run script button always does the job, pressing the F5 hotkey only sometimes works. In other words, pressing the F5 hotkey doesn't reload the script about 40% of the time.
It is worth mentioning that this problem only occurs when the directive is added to the script. When not, pressing the F5 hotkey always works (prompts me if I want to have the new instance replace the old one).

Any comments?
User avatar
Posts: 495
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: Bug Report: F5 hotkey for Reload not working (sometimes)

01 Jul 2017, 10:54

Hey I've had the same problem. I use force SingleInstance, but didn't know if this was a global bug, or a problem with my computer. Does anyone know why it does this?
try it and see
Posts: 6132
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Bug Report: F5 hotkey for Reload not working (sometimes)

30 Dec 2017, 02:35

That's no bug, just a big limitation. SciTE can only run one thing (on the subsystem that allows catching output) at a time. You can't even do a find-in-files while running a script.

You can use Ctrl+Shift+F5 instead, or you can add this line to your SciTE user properties:

Code: [Select all] [Download] GeSHi © Codebox Plus


If you add /R or /restart to the command line SciTE uses to launch scripts, new instances of the script will terminate an old instance even without #SingleInstance Force (or even with #SingleInstance Off).

Code: [Select all] [Download] GeSHi © Codebox Plus

command.go.$(file.patterns.ahk)="$(AutoHotkey)" /ErrorStdOut /R "$(FilePath)" $(1) $(2) $(3) $(4)

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 3 guests