Hotkeys don't work in "Open" window of a paused script

Report problems with documented functionality
kidbit
Posts: 168
Joined: 02 Oct 2013, 16:05

Hotkeys don't work in "Open" window of a paused script

26 Oct 2013, 11:44

When you run a script that has a tray icon - you can right click that icon and select "Open" menuitem from the context menu (or just doubleclick the tray icon).
That will open a window which by default shows the recently executed lines in that script.
In that window if you hit the "View" menuitem in the menu bar you're going to see this:
Image
As you can see - each menuitem has a hotkey, but they won't work if your script is paused or, say, stopped on a msgbox.
But you still can click that menuitem and that will work.
I don't know that's possible to fix (since ahk is a 1-threaded thing), I'm just reporting it.
Last edited by kidbit on 30 Oct 2013, 19:39, edited 1 time in total.
question := (2b) || !(2b) © Shakespeare.
kidbit
Posts: 168
Joined: 02 Oct 2013, 16:05

Re: Hotkeys doesn't work in "Open" window of a paused script

26 Oct 2013, 11:54

Also, it would be nice to have CTRL+A hotkey work as "Select all" there too (currently it doesn't, even when the script is not paused).
question := (2b) || !(2b) © Shakespeare.
RijulAhuja
Posts: 44
Joined: 30 Sep 2013, 07:29

Re: Hotkeys doesn't work in "Open" window of a paused script

26 Oct 2013, 13:19

It seems to work fine, are you sure some other script is not interfering ?
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Hotkeys doesn't work in "Open" window of a paused script

29 Oct 2013, 22:04

1. When the script is paused, the code interpreter is also paused and therefore AutoHotkey is paused.
Clicking the menu item only launches a separate "thread" that is "not affected" by the current state of AutoHotkey.
Note: Labels can still be launched even if AutoHotkey is paused. This is where A_IsPaused comes in.
The Docs wrote:A script is always halted (though not officially paused) while it is displaying any kind of menu (tray menu, menu bar, GUI context menu, etc.)
see http://ahkscript.org/docs/commands/Pause.htm and http://ahkscript.org/docs/misc/Threads.htm for more info on that.

2. basically it is like an edit control with the following tags "+ReadOnly -WantCtrlA"
see http://ahkscript.org/docs/commands/GuiControls.htm#Edit

Regards, no bugs ;)
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
kidbit
Posts: 168
Joined: 02 Oct 2013, 16:05

Re: Hotkeys doesn't work in "Open" window of a paused script

30 Oct 2013, 19:42

joedf wrote:Regards, no bugs ;)
No, it's a bug. You just explained the reasons why it exists.

I think AHK should always assign an additional thread just to serve that built-in menu, that could be open for every AHK script.
However, I don't have any hopes that Lexikos will ever fix this bug.
question := (2b) || !(2b) © Shakespeare.
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Hotkeys don't work in "Open" window of a paused script

30 Oct 2013, 20:43

it's a Microsoft Windows quirk, not an AutoHotkey bug... ;)
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
lexikos
Posts: 9589
Joined: 30 Sep 2013, 04:07
Contact:

Re: Hotkeys don't work in "Open" window of a paused script

31 Oct 2013, 04:44

joedf's explanation of the cause is totally wrong. The problem is that the menu shortcut keys are implemented by the program's main message loop, which isn't running while a MsgBox is visible. It's been a known issue for nearly ten years, and yet there are very few complaints.
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Hotkeys don't work in "Open" window of a paused script

31 Oct 2013, 10:27

Oh right! Whoops, I'm sorry for the confusion here :P
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Hotkeys don't work in "Open" window of a paused script

24 Jan 2014, 19:27

lexikos wrote:The problem is that the menu shortcut keys are implemented by the program's main message loop, which isn't running while a MsgBox is visible.
Does that same reason apply to this effect:
A script is always halted (though not officially paused) while it is displaying any kind of menu (tray menu, menu bar, GUI context menu, etc.)
Because that is somewhat annoying too.
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Hotkeys don't work in "Open" window of a paused script

25 Jan 2014, 13:42

Well it must be difficult for one person to use 2 brains at the same time ;)
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 7 guests