Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say that I am working using several spaces. In one of them I have 20 applications opened with their respective files. My computer crashes and I have to open everything again.
Instead I want to save this configuration so I can later reopen this configuration, and immediately open all these 20 applications with those files, and even better, reopen them in the same positions and sizes they had before.

I wonder if it could be done using AppleScript or something like that. If you give me hints, I can dig deeper and learn it.

share|improve this question

You could try using Stay, but I think it's not designed for this task.

Alternatively, with AppleScript:

tell application "System Events" to key code 124 using control down # press control-right to navigate to space 2 if you're on 1

tell application "Safari"
    activate # bring to foreground, open window
    set bounds of window 1 to {50, 50, 500, 500} # window position and size
end tell

Using this code, you can navigate around your spaces, open applications and resize their windows. I think some applications that aren't AppleScriptable might not work though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.