• 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: AppleScript-Users Digest, Vol 9, Issue 337
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 9, Issue 337


  • Subject: Re: AppleScript-Users Digest, Vol 9, Issue 337
  • From: Walt Sterdan <email@hidden>
  • Date: Fri, 31 Aug 2012 17:12:05 -0500

On my way!

Sent from my iPad

On 2012-08-31, at 2:00 PM, email@hidden wrote:

> Send AppleScript-Users mailing list submissions to
>    email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>    https://lists.apple.com/mailman/listinfo/applescript-users
> or, via email, send a message with subject or body 'help' to
>    email@hidden
>
> You can reach the person managing the list at
>    email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AppleScript-Users digest..."
> Today's Topics:
>
>   1. Re: Previous APOD Page (Deivy Petrescu)
>
> On Aug 27, 2012, at 21:06 , Christopher Stone <email@hidden> wrote:
>
>> Hey Folks,
>>
>> Like many people I enjoy the APOD, and also like many people I often forget to visit it daily.
>>
>> Enter Applescript.
>>
>> This script will jump backwards one day from the currently viewed APOD page, so you can quickly review what you missed.
>>
>> I run mine via a keyboard shortcut with FastScripts.
>>
>> --
>> Best Regards,
>> Chris
>>
>> ------------------------------------------------------------------------------------------------
>> # Safari
>> # Go to previous APOD page
>> # APOD: http://apod.nasa.gov/apod/
>> ------------------------------------------------------------------------------------------------
>> try
>>
>> tell application "Safari"
>>   tell front document
>>     set pageURL to quoted form of (get URL)
>>     set urlPath to do shell script "sed -E 's|[^/]+$||' <<< " & pageURL
>>     set src to quoted form of (do shell script "tr '\\r' '\\n' <<< " & (quoted form of (get source)) without altering line endings)
>>     set previousApodURL to urlPath & (do shell script "echo " & src & " | sed -n '/>&lt/p' | sed -E 's/[^\"]+\"([^\"]+).+/\\1/'")
>>     set URL to previousApodURL
>>   end tell
>> end tell
>>
>> on error eMsg number eNum
>> set {c, s} to {return, "------------------------------------------"}
>> set e to s & c & "Error: " & eMsg & c & s & c & "Error Number: " & eNum & c & s
>> beep
>> set dDlg to display dialog e buttons {"Cancel", "Copy", "OK"} default button "OK"
>> if button returned of dDlg = "Copy" then
>>   set the clipboard to e
>> end if
>> end try
>> ------------------------------------------------------------------------------------------------
>
>
>
> To anyone who might be interested.
> I like the APOD site so I wrote a stay open app to everyday check for the picture (might be a movie) and download it to my computer and set it as my desktop picture.
> If you have Growl, it will also display the explanation from the web site.
> I believe that if you don't have growl it will display the text as a dialog.
>
> The app I have is for the English version of APOD (it has versions I many languages).
> I do have a Dutch version, and was going to write to other languages that I have some understanding.
> It has been a while but I believe I can implement this very fast.
>
> If anyone is interested…. http://www.dicas.com/Miscellaneous.html
> The name is APODdesktop.
>
>
> Deivy Petrescu
> email@hidden
>
>
>
>
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden
> https://lists.apple.com/mailman/listinfo/applescript-users

 _______________________________________________
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: Re: Previous APOD Page
  • Previous by thread: Re: Apache-Apple Event Bridge
  • Index(es):
    • Date
    • Thread