Saving and restoring applications and layouts

I am looking for ways to reduce the time spent on opening all the necessary applications, placing windows, opening urls / files / change directories / etc. before starting the actual coding.

In an ideal world, there would be two buttons labeled "SAVE STATE" and "RESET STATUS" to "project". You will find such a feature in some games.

I am on a mac and just spent a few hours tapping my head with "Automator" (which for some reason has problems even opening firefox from the dock) and then applescript (which makes me feel like I am on a long journey).

A web search led me to this script:

http://snipt.net/Fotinakis/applescript-to-save-and-restore-window-positions/

#!/usr/bin/osascript -- Usage: -- $ osacompile -o windowPositions.compiled.scpt windowPositions.scpt -- $ osascript windowPositions.compiled.scpt --save -- $ osascript windowPositions.compiled.scpt --restore -- Change this to be the list of windows you want to save/restore property affectedProcesses : {"Chrome", "Adium", "Eclipse", "Terminal"} property windowRecord : {} on run argv if (count of argv) is equal to 0 then log "Please specify one of --save or --restore." return end if tell application "System Events" if (item 1 of argv is equal to "--save") then set windowRecord to {} repeat with i from 1 to count affectedProcesses set end of windowRecord to {0, {}, {}} end repeat repeat with p from 1 to count affectedProcesses set processName to (item p of affectedProcesses) if exists process processName then log "Process '" & processName & "' exists" tell process processName set numWindows to count windows set item 1 of item p of windowRecord to numWindows repeat with i from 1 to numWindows set end of item 2 of item p of windowRecord to position of window i set end of item 3 of item p of windowRecord to size of window i end repeat end tell end if end repeat else repeat with p from 1 to count affectedProcesses set processName to (item p of affectedProcesses) if exists process processName then log "Process '" & processName & "' exists" tell process processName set numWindows to item 1 of item p of windowRecord repeat with i from 1 to numWindows set position of window i to (item i of item 2 of item p of windowRecord) set size of window i to (item i of item 3 of item p of windowRecord) end repeat end tell end if end repeat end if end tell end run 

Performs half of the task (resizing and positioning current windows), but falls apart on a multi-monitor with multiple desktops. There is no contact information for the original author to ask for help or feedback.

Can anyone shed light on saving and restoring applications and layouts? This is similar to a general task that some helper utilities should have. The best I have is sleep mode, but it seems to me that I should do a full restart in a day, and I have different applications and layout for different projects.

+7
windows state desktop macos
source share
1 answer

This is the Lion feature (Mac OS X 10.7) ... I wouldn’t kill myself over the fact that Apple saw the need for it and implemented pretty smoothly ...

Apple feature page describing feature

+1
source share

All Articles