Recently Browsing 0 members
No registered users viewing this page.
Hello! I was wondering why there are no UDFs (on this forum) for automating Adobe software. So, I decided to start writing one for Photoshop.
Creating, opening and saving documents Manipulating layer settings Applying effects to layers Now, the UDF is pretty limited, but my goal is to implement the whole Photoshop's VBScript interface.
Adobe Photoshop UDF
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