Dynamic hotstrings alternative?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
burton666
Posts: 49
Joined: 09 Dec 2014, 15:26

Dynamic hotstrings alternative?

05 Jul 2016, 01:47

I have been using this: https://autohotkey.com/boards/viewtopic.php?f=6&t=3329 and it is working great, only issue is that it "blocks/disables" all one-button hotkeys. I do not understand how to fix this so is there any other script/command that does not have this limitation?

This is an example of one of my dynamic hotstrings:

Code: Select all

Hotstring("([A-O]{2})(\d)(\d)([012])\s","expand2",3)

Expand2:
{
placeholder2 = % FileTail("c:\test\test.log", 8)
FoundPos := RegExMatch(placeholder2, "^\bQty\s*:\s*\d+")

if(FoundPos != 0){
Send % "^kMAX{ENTER}MAX." $.value(1) "." $.value(2) $.value(3) "." $.value(4)"{ENTER 3}"
}
else{
Send % "^kMAX{ENTER}MAX." $.value(1) "." $.value(2) $.value(3) "." $.value(4)"{ENTER}^kBOX{ENTER}"
}
}
Return
SbAgOoTs

Re: Dynamic hotstrings alternative?

02 Sep 2016, 06:24

Hi,

I was also looking for a way to use RegEx in hotstrings, but any version I found of Dynamic Hotstrings (like https://autohotkey.com/boards/viewtopic.php?f=6&t=3329, https://autohotkey.com/board/topic/1501 ... otstrings/ or https://autohotkey.com/board/topic/1147 ... otstrings/) weren't working because of a " " is not a valid key problem caused by my keyboard setup not being EN.
So, I finally found a very simple solution to my problem with this code:

Code: Select all

loop
{
Input, retrieved, V, {enter}
found := RegExMatch(retrieved, "\d{3,}\s?tons?", match)
if found>0
MsgBox, 48, Wow!,You mentioned a volume of %match%: is it maybe a prospect to be added to your high potential list?
}
A message box pops up every time I write about volumes > 99 ton (or 99 tons, or 99ton, or 99tons... :D ).

I hope this example could help! ;)

:wave:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Draken and 211 guests