The script below is not working, any idea what am I missing?
Code: Select all
SetTitleMatchMode, RegEx
#IfWinNotActive i)notepad|ahk_class Chrome_WidgetWin_1
::br::best regards
#IfWinActive
Code: Select all
SetTitleMatchMode, RegEx
#IfWinNotActive i)notepad|ahk_class Chrome_WidgetWin_1
::br::best regards
#IfWinActive
No RegEx needed here:RegEx [v1.0.45+]: Changes WinTitle, WinText, ExcludeTitle, and ExcludeText to accept regular expressions, e.g. WinActivate Untitled.*Notepad. RegEx also applies to ahk_class and ahk_exe, e.g. ahk_class IEFrame searches for any window whose class name contains IEFrame anywhere (this is because by default, regular expressions find a match anywhere in the target string). For WinTitle, each component is separate, e.g. in i)^untitled ahk_class i)^notepad$ ahk_pid %mypid%, i)^untitled and i)^notepad$ are separate regex patterns and %mypid% is always compared numerically (it is not a regex pattern). For WinText, each text element (i.e. each control's text) is matched against the RegEx separately, so it is not possible to have a match span more than one text element.
Code: Select all
#If !WinActive("ahk_exe notepad.exe") && !WinActive("ahk_class Chrome_WidgetWin_1")