Hotstrings not expanding properly in AHK Studio

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
automater
Posts: 20
Joined: 01 Jul 2022, 08:51

Hotstrings not expanding properly in AHK Studio

Post by automater » 02 Nov 2022, 20:31

I'm trying to create hotstrings with parameters notes for various AHK commands so I can deploy them as I code in my workflow.

Example of such a hotstring:
::run..::;Target: URL, exe, bat, lnk, Verbs (right-click options): properties, 'find, 'explore, edit, 'open, 'print`n;Options: Min, Max, Hide

Example of the output:
;Target: URL, exe, bat, lnk, Verbs (right-click options): properties, 'find, 'explore, edit, 'open, 'print
;Options: Min, Max, Hide

This shows me the possible parameters for both fields.

The problem is that the expansion in AHK studio is incorrect and different every time.
Example 1:
;Target: URL, exe, bat, lnk, Verbs (right-click options): rties, 'find, 'explore, edit, 'open, 'print
;Options: Min, Max, Hide
;Error handling:
;try
;Run "NonExistingFile"
;catch
;MsgBox "Fil"

Example 2:
;Target: URL, exe, bat, lnk, Verbs (right-click optiond, 'explore, edit, 'open, 'print
;Options: Min, Max, Hide
;Error handling:
;try
;Run "NonExistingFilFile does not exist."

Any idea why the text isn't hotstring expansion isn't working properly and how I can fix it? This would really help me learn faster.

Thanks!

User avatar
boiler
Posts: 17390
Joined: 21 Dec 2014, 02:44

Re: Hotstrings not expanding properly in AHK Studio

Post by boiler » 02 Nov 2022, 20:55

If an editor has auto-complete enabled, that can cause hotstrings to produce undesired output because the editor tries inserting characters itself. Try turning that feature off and see if that’s the issue.

Post Reply

Return to “Ask for Help (v1)”