Code: Select all
SetTitleMatchMode 2
SetTimer tCheck,3000
GroupAdd Volume,NCS ahk_exe Firefox.exe
GroupAdd Volume,Pixabay ahk_exe Firefox.exe
GroupAdd RunAIMP,Anilist ahk_exe Firefox.exe
GroupAdd RunAIMP,Adobe Premiere Pro.exe
tCheck:
If WinExist("ahk_group Volume") && !fVol{
SoundGet vVol
SoundSet 14
fVol:=1
}Else If !WinExist("ahk_group Volume") && fVol{
SoundSet % vVol
fVol:=0
}
DetectHiddenWindows 1 ;Turn this on for this only
If (A_Hour>=17 && A_Hour<4) && WinExist("ahk_group RunAIMP") && !WinExist("ahk_exe AIMP.exe")
Run % "C:\Program Files (x86)\AIMP\AIMP.exe"
DetectHiddenWindows 0 ;Turn this off again
Return
The code works however if I set the time to something like 1700 to 2300. Any reason for this disparity?