Jump to content

Photoshop Autosave


stoyan
 Share

Recommended Posts

This is a simple Photoshop Autosaver. It's very far from complete autosave solution, but covers the basics. It's made with English version of Photoshop CS5 in mind. And has the followind limitations:

  • Autosaves only when a Photoshop window or Photoshop undocked document is active
  • Autosaves only the active document
  • Fixed autosave interval (10 minutes)
  • Doesn't keep backups
  • The tray tooltip shows the remaining time in seconds
Here is the source

Opt('TrayMenuMode', 1)
 
Global Const $photoshop = '[CLASS:Photoshop]'
Global Const $document = '[CLASS:OWL.DocumentWindow]'
Global Const $interval = (1000 * (60 * 10))
 
Global $Exit = TrayCreateItem('Exit')
Global $start = 0
 
While True
    Global $Msg = TrayGetMsg()
 
    Switch $Msg
        Case $Exit
            ExitLoop
    EndSwitch
 
    Global $delta = TimerDiff($start)
    Global $remaining = Round(($interval - $delta) / 1000)
    TraySetToolTip('Next autosave in ' & $remaining & ' seconds')
 
    If ($delta > $interval) Then
        Autosave()
        $start = TimerInit()
    EndIf
WEnd
 
 
Func Autosave()
    If WinActive($photoshop) Or WinActive($document) Then
        Send('^s')
    EndIf
EndFunc
Edited by stoyan

; Opt('MustDeclareVars', 1)

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...