i am trying to launch a dialer application from safari, the way i have it so far is by using a protocol “phone://9,904-555-5555”
now i have a scriptable dialer application as well
i need to put the two together, i know how to assign an application as the handler for the “phone://” protocol, but how can i make it get the value of what was in the URL (phone number)?
yes, that is exactly it- the phone number is in the address field like phone://1112223344, i need the number to be a variable in the applescript application that handles that protocol.
tell application "Safari" to set PhoneUrl to (URL of document 1) as string
Safari uses “document” to get the URL property. “window” has no URL property. “document 1” is the frontmost Safari window; Take note of that when getting the URL.
ie The last Safari window to open will be the frontmost unless you bring another Safari window to the front.