Code: Select all
Loop, ;infinite loop
{
#IfWinActive obs64.exe ;#IfWinActive
{
Sleep, 5000
TrayTip AutoHotKey, Are you recording?
Sleep, 5000
}
}
While I have OBS (obs64.exe) open, it sends a notification saying "Are you recording?"
Code: Select all
Loop, ;infinite loop
{
#IfWinActive obs64.exe ;#IfWinActive
{
Sleep, 5000
TrayTip AutoHotKey, Are you recording?
Sleep, 5000
}
}
Code: Select all
Loop, ;infinite loop
{
If WinActive("ahk_exe obs64.exe")
{
Sleep, 5000
TrayTip AutoHotKey, Are you recording?
Sleep, 5000
}
}
If you really mean whenever it’s simply open, as opposed to its window being the active window, change the above WinActive to WinExist.YousufSSyed wrote: ↑ While I have OBS (obs64.exe) open, it sends a notification saying "Are you recording?"
Code: Select all
{
If WinExist("ahk_exe obs64.exe")
{
TrayTip AutoHotKey, Are you recording?
Sleep, 5000
}
}
Code: Select all
("ahk_exe obs64.exe")
Code: Select all
obs
That exact code (assuming you meant to include the Loop statement inside the code box) works for me when I have OBS running.YousufSSyed wrote: ↑ This is what I got now
Loop, ;infinite loopEven with the script running and with OBS open, the notification doesn't show.Code: Select all
{ If WinExist("ahk_exe obs64.exe") { TrayTip AutoHotKey, Are you recording? Sleep, 5000 } }
It's possible they no longer have the tray notifications, but I doubt it. I don't know, though, since I have not installed Windows 11. It's easy to find out, however. Just run the following script and see if a the tray notification shows up before the MsgBox does:YousufSSyed wrote: ↑ I have a Windows Insider build of Windows 11 installed, would that cause any issues?
Code: Select all
TrayTip, Test, This is a test tray notification
Sleep, 3000
MsgBox, Did you see the tray notification?
No, that's not how it works. But think about it -- even if it did, that wouldn't prevent the notification from showing up. It would be the opposite. It would make it more likely to show up because it could be triggered by more windows. Run the following script when you have OBS running (and when not running) and tell me what it says:YousufSSyed wrote: ↑ Also, is it possible instead of, it could be any string that contains the phraseCode: Select all
("ahk_exe obs64.exe")
? Again I'm not very familiar with AHK.Code: Select all
obs
Code: Select all
MsgBox, % "OBS window was " . (WinExist("ahk_exe obs64.exe") ? "" : "NOT ") . "found."
Users browsing this forum: No registered users and 370 guests