Auto Refresh Safari Page In All Tabs

Previously I had made a script that reloads the front Safari window every so many seconds.
Well now I have a script that will reload all tabs in Safari, the catch is that it only works with the new Safari 3 beta. The reason it only works with Safari 3 is that Apple added some AppleScript functionality for manipulating tabs, thank you Apple!

right click here and save to disk

Update: Auto Refresh Safari Page

It has come to my attention that the previous version of this script does not work with Mac OS X 10.4.x, so here is an updated version that should work correctly.

right click here to save to disk

Copy All Tabs Between Safari

Have you ever wanted to copy a bunch of tabs from one Safari window to another (without using copy and paste), if you have hopefully you will enjoy this script. One would think a little task
like this would be easy with AppleScript and Safari (being Apple’s own web browser and all), but it is not.

The scripting abilities of Safari are pathetic, I was only able to write this script
because of the generic GUI scripting ability of OS X which is not very fun or easy. If
you care about interacting with Safari via AppleScript write Apple and ask them
to flesh out the AppleScript Dictionary of Safari.

right click here to save to disk

updated on 02/03/2006

- Thanks to Rob Griffiths over at Mac OSX Hints for pointing out that the script did not work. At one spot in the script I had ‘group’ instead of ‘groups’.

Adding Ruby to Run Shell Script

If you want to interact with Ruby from within Automator you can do the following:

Add this XML:

<key>/usr/bin/ruby</key>
<dict>
    <key>args</key>
    <array>
        <string>-e</string>
        <string>%</string>
        <string>--</string>
    </array>
    <key>script</key>
    <array>
        <string>$stdin.each { |arg| puts arg }</string>
        <string>ARGV.each { |arg| puts arg }</string>
    </array>
</dict>

to the file:

/System/Library/Automator/Run Shell Script.action/Contents/Resources/Shells.plist

Now when Automator is restarted /usr/bin/ruby will show up in the Shells: list of action Run Shell Script.

I got the idea from this Apple Discussion post telling how to add PHP.

Address Book To CSV

This script outputs the people in the Address Book.app to a CSV file which is designed to be imported by the Mozilla Thunderbird email program.

right click here to save to disk

updated on 11/09/2008

- Steve McMillen has contributed a modified version of this script that will allow the user to specify what groups to export. right click here to save the Groups version. Thanks Steve!

updated on 06/15/2007

- When transferring to new site and blogging software the posting date of the first 5 comments below got lost, sorry.

Next Page »