• 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
Twitter favs to Safari Read Later through ifttt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Twitter favs to Safari Read Later through ifttt


  • Subject: Twitter favs to Safari Read Later through ifttt
  • From: "L. Lee" <email@hidden>
  • Date: Mon, 26 Aug 2013 14:42:31 -0500
  • Thread-topic: Twitter favs to Safari Read Later through ifttt

IFTTT re-enabled their Twitter recipes, so I combined the script contributed by poster "Eraserhead" at MacRumors (http://forums.macrumors.com/showthread.php?t=185036) with the solution previously created at The Apple Schism (http://blog.no-panic.at/2011/07/25/the-apple-schism/) to re-deploy the routine for adding Tweets marked by you as Favorites to your Read Later list in Safari. It's possible to limit the action to only the first URL located in the automatically generated email, of course. There's an extra line to uncomment so you can run without the "using terms" construct for testing. If you'd like to contribute a more robust version, please do. Thanks.


--AppleScript--

using terms from application "Mail"

on perform mail action with messages theSelectedMessages

tell application "Mail"

--set theSelectedMessages to get selection

repeat with eachMessage in theSelectedMessages

set theurls to content of eachMessage

set thelist to {}

repeat

set startofurl to the offset of "http" in theurls

if startofurl is 0 then exit repeat

set count1 to startofurl --this counts the position in theurls string

set theURL4list to "" --this stores the URL as it is being recovered from the text

repeat

set theitem to item count1 of theurls --gets an individual character from theurls

if theitem is in {" ", ASCII character 10} then

set thelist to thelist & theURL4list --adds the url to the list

exit repeat

else

set theURL4list to theURL4list & theitem

end if

set count1 to count1 + 1

end repeat

set theurls to items count1 thru -1 of theurls as string

end repeat

repeat with aURL in thelist

tell application "Safari"

add reading list item aURL

end tell

end repeat

end repeat

end tell

end perform mail action with messages

end using terms from

--Un-AppleScript--




Laine Lee

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: AUTO: Allyn Martin is out of office.
  • Next by Date: Re: Rich text from an Outlook 2011 email message
  • Previous by thread: AUTO: Allyn Martin is out of office.
  • Next by thread: Changing default alarms in Calendar
  • Index(es):
    • Date
    • Thread