Hi, noob here.
Could someone just quickly write me a #HotIf WinActive()
for the RegEx "\d\d\d" ?
(i.e. only activate if the active window title contains three numbers in a row)
Can't seem to remember/think how to do it.
Thanks!
RegEx WinActive() quick help
Re: RegEx WinActive() quick help
Not tested.
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
#HotIf HotIfCond.F2
F2:: {
}
#HotIf
class HotIfCond
{
static F2 {
get {
prevTMM := setTitleMatchMode("RegEx")
result := winExist("\d{3}"), setTitleMatchMode(prevTMM)
return result
}
}
}
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
#HotIf format("{2}", prevTMM:=setTitleMatchMode("RegEx"), winExist("\d{3}"), setTitleMatchMode(prevTMM))
F2:: {
}
#HofIf
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
setTitleMatchMode("RegEx")
#HotIf winExist("\d{3}")
F2:: {
}
#HotIf
- English is not my native language. Please forgive any awkward expressions.
- 영어는 제 모국어가 아닙니다. 어색한 표현이 있어도 양해해 주세요.
Who is online
Users browsing this forum: Google [Bot], just me and 30 guests