I've been tinkering with AppleScript and Automator to try to accomplish this but I'm not really bothered how its done as long as it works.
I am using an extension in Chrome to connect to my VOIP phone system on my Mac(s). What I am trying to accomplish is that when I am on a call, if I open a particular website the call recording is automatically paused. There is a manual button that appears in the phone 'app' window while the call is live to toggle recording on and off but I forget to press it when I should so I need to automate it when I open a particular webpage.
I started with the button press part and tried the following simple script to create a command to press the button:
to clickID(btnRecord)
tell application "Chrome"
do JavaScript "document.getElementById('" & btnRecord & "').click();" in document 1
end tell
end clickID
It doesn't seem to work though which leaves me a bit stuck.
I'd appreciate any help anyone can give me.