Dynamic Hotstrings

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Menixator
Posts: 69
Joined: 30 Sep 2013, 04:10

Re: Dynamic Hotstrings

06 Feb 2017, 04:06

Added a little status update to the thread. If anyone is interested, please pm me.
teerees

Re: Dynamic Hotstrings

21 Apr 2017, 01:01

Code: Select all

#include Hotstring.ahk

Hotstring("x(\d+)x", "comment", 3)
Return

comment:
id = % $1
FormatTime, TimeString,, LongDate
Send <Author> Teerees {End} `n<Date> %TimeString% {End} `n<Id> %id%
Return
Its not working how can i print id?
User avatar
noname
Posts: 515
Joined: 19 Nov 2013, 09:15

Re: Dynamic Hotstrings

21 Apr 2017, 09:39

Code: Select all

#include Hotstring.ahk

Hotstring("x(\d+)x", "comment", 3)
Return

comment:
id := $.value(1)
FormatTime, TimeString,, LongDate
Send <Author> Teerees {End} `n<Date> %TimeString% {End} `n<Id> %id%
Return
User avatar
Menixator
Posts: 69
Joined: 30 Sep 2013, 04:10

Re: Dynamic Hotstrings

28 Apr 2017, 14:53

This library is seriously in need of a rewrite with all it's limitations. I think there are a couple of ideas flying around in this thread. If anyone is thinking of it, knock yourselves out.

As I'm a faithful Linux user now, you probably won't see me updating it anymore . . . :(
User avatar
JnLlnd
Posts: 487
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Re: Dynamic Hotstrings

04 Jan 2018, 19:15

Guest wrote:The output of example Hotstring("i)colou?rs","$0 $0 everywhere!",3) ; Regex, Case insensitive is exactly that, $0 $0 everywhere! while it should be colours colours everywhere! - The other examples do work.
Found why... In original code, the following lines (near the end of Hotstring.ahk, lines 138-139)

Loop, % local$.Count()
StringReplace, toSend,toSend,% "$" . A_Index,% local$.Value(A_index),All


should be:

Loop, % local$.Count() + 1 ; to include $0, not only $1, $2, etc.
StringReplace, toSend,toSend,% "$" . A_Index - 1,% local$.Value(A_index - 1),All
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Dynamic Hotstrings

04 Sep 2018, 11:20

i've submitted some pull requests which fix some of the bugs mentioned, but they haven't been accepted. users might want to review them and make the appropriate changes:

https://github.com/menixator/hotstring/pulls

mINXZKA
Posts: 13
Joined: 16 Mar 2016, 03:47

Re: Dynamic Hotstrings

22 Aug 2022, 06:19

Is there a v2 rewrite somewhere?

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Google [Bot] and 145 guests