URL Grabber...

Ric

Joined
May 14, 2004
Messages
4,245
Reaction score
5
If you post a bit in Apple Discussions this is a handy little script that I've just written.

When posting in AD you can either post full URL's like https://www.mac-help.com or mac-help

Unfortunately in AD there is no easy way of doing this...so here's a little script to help.

Please modify for your own needs.

Code:
set theKeyword to ""
set theUrl to ""
set theResult to ""

tell application "Safari"
	set theUrl to the URL of the front document
end tell

set theKeyword to the text returned of (display dialog "Please enter the key word !" buttons {"OK"} default button 1 default answer "")

set theResult to "<a href=\"" & theUrl & "\">" & theKeyword & "</a>"

set the clipboard to theResult

-----Ric @ www.mac-help.com

Basically it grabs the current URL from Safari, asks you for your "keyword" (in the example above we used mac-help), then it wraps it up with the correct code and places it on your clipboard...just point your cursor at a text box and paste !

If you add it into your Scripts menu then its instantly accessable.

Cory might like this one !

regards

Ric
 

Attachments

  • Apple Discussions Url grab.zip
    2.2 KB · Views: 343
  • grabber.jpg
    grabber.jpg
    111.4 KB · Views: 497

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top