Thank you It's working! (Here is my code, I still have a small issue with it, but it's for another question)
Code: Select all
SetTitleMatchMode, Regex
toggle := 0
youtubesetting(toggle){
;|This will only go off if toggle is true/1
If (toggle==1){
#If WinActive("YouTube")
TrayTip, On, Youtube mode activated,,1
Hotkey,WheelUp,WheelUp,On
Hotkey,WheelDown,WheelDown,On
WheelUp:
IfWinActive, YouTube
Send, {Right}
return
WheelDown:
IfWinActive, YouTube
Send, {Left}
return
; #If
}
If (toggle==0){
TrayTip, Off, Youtube mode Deactivated,,1
Hotkey,WheelUp,WheelUpa,On
Hotkey,WheelDown,WheelDowna,On
WheelUpa:
Send, {WheelUp}
return
WheelDowna:
Send, {WheelDown}
return
}
}
; because LButton and RButton where remap, they function is lost, so we need to remap them
LButton:: LButton
RButton::RButton
LButton & RButton::
;|This will change the toggle var to the inverse of what it's original value is (0 = 1 and 1 = 0 || true = false and false = true)
toggle := !toggle
youtubesetting(toggle)
return