How can I get a URL from a selected hyperlink using Applescript? -
come ??? In an attempt to create an Apple script that will grab the URL from a selected hyperlink.
For some background story: the system that is in my company place ???? If T does not play well with generating the report, then I created a script which I can paste a list of URLs, and at this point the Safari will go through each page and select all the data, copy it, And parse what I want.
However, each page that IA ??? MM Parsing has a link on it that says, for example, "edit" if I post it, say, page, hyperlink is protected. It would greatly accelerate my flow if I somehow URL might be rooted in that hyperlink.
Any thoughts?
After
Attract, I suspect you did not get a response because it is difficult to understand what you want . But, here's a script that will capture the raw text of a web page, and then look for the first ARH link, the first hyperlink called "edit", and then return the target URL that is linking to it. Uses the curl to pull and offset the material to pull. "Here": You may have to adjust the name of the surrounding link that you are looking for tag identifier
property baseurl. Set raw HTML to "curl" to "http: //www.mycoolsite.index.html" property linkName shell script & amp; Besrule & amp; To set offOffset ("\" & gt; "& amp; linkName & amp;" & lt; / a & gt; ") rawHTML text in 1 through rawHTML set (theOffset - 1 ) RawHTML of AppleScript set otid to item delimiter AppleScript's text item set delimiters to targetUrl (text item -1) of text HTML (rawHTML text items set to "http: //") returned targetUrl otid to
Comments
Post a Comment