0
votes

I want to have a sound repeat periodically when there is a new message in the Google Voice Inbox. So far what I've come up with is to have the GV Inbox always open in chrome, and have the following script running:

100:
IfWinExist, Google Voice - Inbox (
    SoundPlay, C:\Users\Terry's\Desktop\chimes.wav, wait
Sleep, 1000
Goto 100

If there is a new message, the title of the GV tab is "Google Voice - Inbox (1) - Google Chrome" and if there are no new messages, the "(1)" is missing, so that's why the search string for IfWinExist includes one a "(".

This only works, however, when the GV tab has the attention within chrome (it will work when chrome is minimized or another window is active, as long as GV is the selected tab within chrome). But if another tab within chrome has the attention, then it won't work, and I can't figure out how to make it work. I've tried Adjusting SetTitleMatchMode, but that's all I could come up with to mess with. Any ideas would be greatly appreciated.

1

1 Answers

0
votes

Have you tried the AutoHotKey Windows Spy to see how the GV is identified? This is what you will need (and it will most probably be the string you already have) Then set SetTitleMatchMode to 2 (find string anywhere in title). You could try to experiment with "escaping" the "open bracket".

Please don't use Sleep but launch a timer. I temporarily changed the sound back to something I know works. Once this works, you can make a change back to SoundPlay and remove the MsgBox.

Pseudo Code

#SingleInstance Force
#installKeybdHook
#Persistent
SetTitleMatchMode, 2
SetTimer, CheckWin, 10000 ; Run CheckWin every 10 seconds.

CheckWin:
IfWinExist, Google Voice - Inbox (
{
    MsgBox, Alert
    SoundBeep, 700, 700
}
Return