Skip to content

Update ui-newscript.ahk#24

Merged
Lexikos merged 1 commit intoAutoHotkey:mainfrom
iPhilip:patch-1
Apr 16, 2026
Merged

Update ui-newscript.ahk#24
Lexikos merged 1 commit intoAutoHotkey:mainfrom
iPhilip:patch-1

Conversation

@iPhilip
Copy link
Copy Markdown
Contributor

@iPhilip iPhilip commented Jun 16, 2025

Fixed issue of selecting help files using the keyboard.

Fixed issue of selecting help files using the keyboard.
@Lexikos
Copy link
Copy Markdown
Contributor

Lexikos commented Apr 10, 2026

What is this actually supposed to fix? Help files don't seem to have anything to do with ui-newscript.ahk.

@Ragnar-F
Copy link
Copy Markdown
Contributor

iPhilip is most likely referring to the error message that appears when trying to navigate within the context menu of the Dash's "Help files (F1)" item using e.g. the arrow keys.

Error: This value of type "String" has no property named "Gui".

	---- C:\Program Files\AutoHotkey\UX\ui-newscript.ahk
	073: Return
	074: gc := GuiCtrlFromHwnd(hwnd)
▶	075: If gc.Gui is NewScriptGui && gc is Gui.Edit
	075: {
	076: PostMessage(nmsg, wParam, lParam, gc.Gui['LV'])

Call stack:
C:\Program Files\AutoHotkey\UX\ui-newscript.ahk (75) : [KeyDown] If gc.Gui is NewScriptGui && gc is Gui.Edit
> OnMessage
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (196) : [Menu.Prototype.Show] m.Show()
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (196) : [ShowHelpFile] m.Show()
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (117) : [AutoHotkeyDashGui.Prototype.ItemClicked] ShowHelpFile()
> Gui

@iPhilip
Copy link
Copy Markdown
Contributor Author

iPhilip commented Apr 12, 2026

iPhilip is most likely referring to the error message that appears when trying to navigate within the context menu of the Dash's "Help files (F1)" item using e.g. the arrow keys.

Error: This value of type "String" has no property named "Gui".

	---- C:\Program Files\AutoHotkey\UX\ui-newscript.ahk
	073: Return
	074: gc := GuiCtrlFromHwnd(hwnd)
▶	075: If gc.Gui is NewScriptGui && gc is Gui.Edit
	075: {
	076: PostMessage(nmsg, wParam, lParam, gc.Gui['LV'])

Call stack:
C:\Program Files\AutoHotkey\UX\ui-newscript.ahk (75) : [KeyDown] If gc.Gui is NewScriptGui && gc is Gui.Edit
> OnMessage
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (196) : [Menu.Prototype.Show] m.Show()
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (196) : [ShowHelpFile] m.Show()
C:\Program Files\AutoHotkey\UX\ui-dash.ahk (117) : [AutoHotkeyDashGui.Prototype.ItemClicked] ShowHelpFile()
> Gui

That's correct. When using arrow keys GuiCtrlFromHwnd returns an empty string. As is, the code expects an object so it's reasonable to check it.

@Lexikos Lexikos merged commit ad0e3b4 into AutoHotkey:main Apr 16, 2026
@Lexikos
Copy link
Copy Markdown
Contributor

Lexikos commented Apr 16, 2026

Ah, I failed to consider that ui-newscript.ahk monitors messages targeted at the other Dash windows when launched from within the Dash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants