script for url to set ina message

19 views
Skip to first unread message

Wim Jongman

unread,
Oct 11, 2021, 9:23:54 AM10/11/21
to BBEdit Talk
I have a question

I have a script

tell application "Safari"
activate
set myURL to URL of document 1
set myName to name of document 1
end tell
set the clipboard to "<br />Voor meer zie <a href="" & myURL & "" target='_blank'>" & myName & "</a></p>

<p>"
activate me
display dialog "In the clipboard: " & return & return & (the clipboard) buttons "OK" default button "OK" with icon 1

But when I wanted it for an other application as Brave Browser it don’t work.
Why not? Is it only in for Safari?

jj

unread,
Oct 11, 2021, 10:36:21 AM10/11/21
to BBEdit Talk
Hi Wim,

Not all applications respond to the same set of commands, elements, properties, enumerations, etc.

To view an application's Terminology use Script Editor > File > Open Dictionary... or drop the icon of the application upon the Script Editor icon.

Check this link on how to get the frontmost tab’s url and title of various browsers:


HTH

Jean Jourdain
Reply all
Reply to author
Forward
0 new messages