Aug 24

Thanks Justin for this tip:

One of the main reasons I used Firefox over Safari was the ability for FF to remember my tabs and windows once I quit the application. Since the release of Safari 4 however, I am finding it to be much smoother and faster than FF and have moved to it exclusively.

The problem still remains that users are not able to have the browser launch directly into the previous sessions so I decided to stop complaining and write an AppleScript to solve the problem.

The first thing you need to do is “Enable access for assistive devices” which is located in the System Preferences under Universal Access.

Then just run this application anytime you want Safari to open your last sessions (prior to quitting the application).

If you would prefer to create the script yourself simply open Script Editor and enter the following text:

tell application "Safari" activate end tell tell application "System Events" tell process "Safari" tell menu bar 1 tell menu bar item "History" tell menu "History" click menu item "Reopen All Windows from Last Session" end tell end tell end tell end tell end tell

Then save the script as an application and your good to go.

If you want to change the icon so it looks like Safari simply “Get Info” for the application and drag the Safari (or any other) image to the icon preview (top left) in the inspector window.

*Reposted from here.

written by Justin Wah Kan \\ tags: , ,