Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Scripting Chrome

Scripting Chrome
Thread Tools
Waragainstsleep
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Dec 9, 2020, 03:55 PM
 
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.
I have plenty of more important things to do, if only I could bring myself to do them....
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:58 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,