You are not logged in.
Hello,
I can't seem to succeed getting the URL of a current Safari page. I want to build a shortcut that would open the page open on iPhone on the Mac by executing SSH script. No matter how I set shortcut's global input ("Accepts Safari pages", "Accepts URL") or locally through the usage of variables (as "Url", as "Text") or with the action "Get Details of Safari page" (with its output set to "Page URL"), no output is produced.
Is there a way to get the URL of a current page like that in Automator or in AppleScript?
Model: MacBook Pro
AppleScript: 2.3.2
Browser: Safari 9537.86.7
Operating System: macOS 10.9
Last edited by scrutinizer82 (2019-11-28 08:13:50 am)
Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6
Offline
This works on my system. Mac OS 10.13.3
Applescript:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Safari"
URL of document 1
end tell
Offline
This forum section is about Siri Shortcuts.
Scripting in Mac OS X 10.7.5, OS X 10.9.5, macOS 10.14.6
Offline
scrutinizer82,
If
This forum section is about Siri Shortcuts.
is directed at me I apologize. I must not have understood the scope of your question
Is there a way to get the URL of a current page like that in Automator or in AppleScript?
I guess you were asking
Is there a way to get the URL of a current page like that in Automator or in AppleScript using Siri Shortcuts?
I saw that your post had gone unanswered for quite a while and thought the reply I provided might help you proceed with your project. Sorry for the misunderstanding. Good luck with your shortcut.
Dana
Offline
I suspect this didn't help make the nature of the question any less ambiguous:
Model: MacBook Pro
AppleScript: 2.3.2
Browser: Safari 9537.86.7
Operating System: macOS 10.9
Offline