windows - Save and restore applications and layout -


i'm looking ways reduce wasted time spent open applications needed, position windows, open urls/files/change directories/etc. before actual coding starts.

in perfect world there 2 buttons marked 'save state' , 'restore state' per 'project'. kind of feature find in games.

i'm on mac , spent afew hours banging head 'automator' (which reason has problems open firefox dock) , applescript (which gives me feeling i'm in long ride).

searching on net led me 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 list of windows want save/restore property affectedprocesses : {"chrome", "adium", "eclipse", "terminal"} property windowrecord : {}  on run argv  if (count of argv) equal 0   log "please specify 1 of --save or --restore."   return  end if   tell application "system events"   if (item 1 of argv equal "--save")    set windowrecord {}    repeat 1 count affectedprocesses     set end of windowrecord {0, {}, {}}    end repeat    repeat p 1 count affectedprocesses     set processname (item p of affectedprocesses)     if exists process processname      log "process '" & processname & "' exists"      tell process processname       set numwindows count windows       set item 1 of item p of windowrecord numwindows       repeat 1 numwindows        set end of item 2 of item p of windowrecord position of window        set end of item 3 of item p of windowrecord size of window       end repeat      end tell     end if    end repeat   else    repeat p 1 count affectedprocesses     set processname (item p of affectedprocesses)     if exists process processname      log "process '" & processname & "' exists"      tell process processname       set numwindows item 1 of item p of windowrecord       repeat 1 numwindows        set position of window (item of item 2 of item p of windowrecord)        set size of window (item of item 3 of item p of windowrecord)       end repeat      end tell     end if    end repeat   end if  end tell end run 

it half job (resize , position current windows) falls apart on multi-monitor multi-desktops setup. there no contact info original author ask or feedback.

can shed light on saving , restoring applications , layout? feels such common task ought have helper utilities. best have 'sleep mode' seems have to full restart every other day , have different applications , layout different projects.

this feature of lion (mac os x 10.7) ... wouldn't kill on feature apple has seen need , has implemented rather seamlessly...

apple feature page describing feature


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -