Tente isto:
XButton1:: Send {XButton1} ; If you remove this line, XButton1 loses its native function
XButton1 & LButton:: ; XButton1 becomes a prefix key
If WinActive("ahk_exe chrome.exe") ; open a link in a new tab:
Send, {Shift Down}{Ctrl Down}{LButton Down}{LButton Up}{Ctrl Up}{Shift Up}
; If WinActive("ahk_exe notepad.exe")
; do sth
; If WinActive...
; do sth else
return