• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Don't waste disk space, use URL redirection services to distribute your scripts...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Don't waste disk space, use URL redirection services to distribute your scripts...


  • Subject: Re: Don't waste disk space, use URL redirection services to distribute your scripts...
  • From: Walter Ian Kaye <email@hidden>
  • Date: Thu, 1 Jul 2004 12:18:48 -0700

At 02:53p +0100 07/01/2004, Martin Orpen didst inscribe upon an electronic papyrus:

BTW if you adapt Apple's "encode_script.scpt" to get rid of the <a href>
rubbish, you can automate the link making process using this:


tell application "Safari"
activate
set tinyDoc to make new document
set URL of tinyDoc to "http://tinyurl.com/create.php";
delay 12
end tell

tell application "System Events"
tell process "Safari"
tell window 1
key code 48
delay 1
keystroke "v" using {command down}
delay 1
key code 36
end tell
end tell
end tell

Umm, their home page indicates an easier way to create a link.
If you're doing it for a currently viewed Web page, try this:

tell app "Safari"
tell document 1
set URL to "http://tinyurl.com/create.php?url="; & URL
end tell
end tell

If your URL is on the clipboard, then this should do:

tell app "Safari"
tell document 1
set URL to "http://tinyurl.com/create.php?url="; & (the clipboard)
end tell
end tell


-boo
PS. What are keycodes 48 and 36? I can't seem to find 'em.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Don't waste disk space, use URL redirection services to distribute your scripts...
      • From: Martin Orpen <email@hidden>
References: 
 >Re: Don't waste disk space, use URL redirection services to distribute your scripts... (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Sorry
  • Next by Date: Re: (FWIW) A Few Additional Notes On Missing Link...
  • Previous by thread: Re: Don't waste disk space, use URL redirection services to distribute your scripts...
  • Next by thread: Re: Don't waste disk space, use URL redirection services to distribute your scripts...
  • Index(es):
    • Date
    • Thread