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: , ,

6 Responses to “Auto-enable Safari’s “Reopen Last Session””

  1. mrsir2009 Says:

    I’ve always wondered how you could do that! Thanks for the app!

  2. S Bloomfield Says:

    You do it through Bookmarks…!

  3. granfio Says:

    I’m using safaristand, it having many tricks very useful.

  4. bb Says:

    There is a easy way not only to open the last session, but save groups of pages that you don’t what to book mark permanently from prior sessions. Though bookmarking into a temporary bookmark folder is probably easiest and then delete the bookmarks when they are no long useful. However here is way to manage opening prior sessions manually…

    Make sure the windows and tabs you are not interested in are closed. Then just go to the Activity log in Safari highlight all the entires and copy. What gets copied is the urls. Then you can paste into Text Edit, save with some meaningful name and when you want to view that collection of pages again they are available. You can even annotate the list with a title to remind you what’s there in case you can’t tell from the url names.

    Once you’ve opened your file containing the list you can highlight them all and right click to Open URL and each will open in a separate window. I know. I know. Bummer.

    But this is easy to fix. Go to Safari Preferences and set open links from Applications in new tabs in the current window. And voila. You can not only open links from your last session, but any session from any date you saved a url list for. A useful thing for researchers who don’t want to clutter up their bookmarks, but might need the url citations for a date they accessed info. Just put the date in your file name.

    Cheers…

  5. Elnino Says:

    My OS is window, not is Mac OS. How can i do that? Thanks!

  6. Maria M Says:

    Please please repost the application! It is no longer available!
    thank you so mutch for the tips!

Leave a Reply