Dynamic Hotstrings
Re: Dynamic Hotstrings
Added a little status update to the thread. If anyone is interested, please pm me.
Re: Dynamic Hotstrings
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
Re: Dynamic Hotstrings
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
Re: Dynamic Hotstrings
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 . . .![Sad :(](./images/smilies/icon_e_sad.gif)
As I'm a faithful Linux user now, you probably won't see me updating it anymore . . .
![Sad :(](./images/smilies/icon_e_sad.gif)
Re: Dynamic Hotstrings
Found why... In original code, the following lines (near the end of Hotstring.ahk, lines 138-139)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.
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 :thumbup:](./images/smilies/icon_thumbup.gif)
![Razz :P](./images/smilies/icon_razz.gif)
![Uber Geek :ugeek:](./images/smilies/icon_e_ugeek.gif)
Re: Dynamic Hotstrings
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
https://github.com/menixator/hotstring/pulls
Re: Dynamic Hotstrings
Is there a v2 rewrite somewhere?
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: trouble003 and 257 guests