Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use URL redirection services to distribute AppleScripts Apps
You're probably already aware of the applescript:// URL scheme (URL Protocol Support) and how easy it is to use it to get scripts into the Script Editor, without having to cut and paste and repair broken lines. But, rather than mess about saving the data as links on web pages, you can use some URL redirection services to store the scripts on their servers, and get them into Script Editor using a nice short URL. I've adapted Apple's demo script (from the above-linked page so that it will convert a script that you've copied to the clipboard and automatically submit it to TinyURL.

To see how easily this works (and if you use Panther), just click on the URL below, and the script will appear in the Script Editor:

http://tinyurl.com/2ncqg

If you don't have Panther, or you'd rather see a text version of the script, you can see it here. There's also another version of the script that will generate file:/// URLs, which can be used to help people locate hidden or hard-to-find files and folders on their own Macs.
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (2 votes cast)
 
[7,113 views]  

Use URL redirection services to distribute AppleScripts | 3 comments | Create New Account
Click here to return to the 'Use URL redirection services to distribute AppleScripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use URL redirection services to distribute AppleScripts
Authored by: sophistry on Jul 06, '04 11:38:00AM

unless i am mistaken this is only suitable for short scripts. i think this technique can only handle around 250 characters in the script. the GET URL that encodes the script and sends it to tinyurl is limited. could it be improved to use POST instead of get?



[ Reply to This | # ]
Use URL redirection services to distribute AppleScripts
Authored by: orpy on Jul 07, '04 08:57:17AM

There are 37 lines, 252 words, and 1686 characters in the TinyURL example above - so I think you might be mistaken about the 250 character limit :-)

---
--
Martin



[ Reply to This | # ]
Use URL redirection services to distribute AppleScripts
Authored by: Graff on Jul 07, '04 11:56:54PM

The only problem is that many people have tinyurl.com and other redirector sites blocked because they are often used to hide links to nasty sites when people post to Slashdot, blogs, and mailing lists. Redirection services are just not safe to trust and a lot of us take the smart route and block them from working.

If you really want people to visit your web site and see your AppleScript then be sure not to use a redirection service.

Also keep in mind that using the applescript:// URL scheme is akin to those annoying pop-up ads that open up a separate window when you visit a web site. Nothing is more annoying than clicking a link and having Script Editor run and open a window with a script that you didn't expect to see. If you want people to try out your scripts then either put up a plain text listing which appears normally within the current browser window or allow the user to download a file containing the script. You'll get a lot better exposure that way rather than irritating people with the applescript:// URL scheme.

- Graff



[ Reply to This | # ]