[v2-beta-1] Hotstring * option override Topic is solved

Report problems with documented functionality
User avatar
joedf
Posts: 8951
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

[v2-beta-1] Hotstring * option override

28 Jul 2021, 11:27

Hi there, I received this email from a fellow user and I am forwarding it in here. I will act as a "relay" by email. :thumbup:
Adrian Kurz (adkurz [@] bltech [dot] de) wrote:Hello,

I'm blind and not able to use the forum, sorry for that.

I have a bug in AutoHotkey V2, Beta 1.

If I deactivate a hotstring with the * option, disable it and enable a
hotstring with the same content but with other options, the * option is
enabled again.

Example:

My Code:

Hotstring(':*:tst', 'hallo')
Hotstring(':*:tst',, false)
Hotstring('::tst', 'hallo', true)
The result should be, that I have to enter tst and an ending char to
execute the replacement. But the ending char isn't necessary.

Could you please fix this?

Thanks for this great scripting language!

MfG Adrian Kurz
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]
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [v2-beta-1] Hotstring * option override  Topic is solved

28 Jul 2021, 13:20

was that ever an advertised feature for it to now be considered a bug? im saying this because it doesnt work that way in v1 either(and i cant recall it ever having)
If the hotstring already exists, any options specified in String are put into effect, while all other options are left as is.
yes, the irony that is my use of primarily visual aids to explain something to a blind man is not lost on me. sorry, guy
according to that the * was never disabled to begin with. u arent specifying any new options, and any old ones "are left as is"
if u wanted to disable it, do what other parts of the docs suggest:
* (asterisk): An ending character (e.g. Space, ., or Enter) is not required to trigger the hotstring. For example: The example above would send its replacement the moment you type the @ character. When using the #Hotstring directive, use *0 to turn this option back off.
User avatar
joedf
Posts: 8951
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: [v2-beta-1] Hotstring * option override

28 Jul 2021, 13:45

I see what you mean. I havent used Hotstring() much. So the solution is to instead use

Code: Select all

Hotstring(':*0:tst', 'hallo', true)
Thanks! :+1:
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 27 guests