Transactions and Photoshop
Transactions and Photoshop
- Subject: Transactions and Photoshop
- From: Richard Allaway <email@hidden>
- Date: Wed, 12 Oct 2005 12:17:44 -0400
As the ASLG (<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/AppleScript.cb.html>), and the Neuburg book make clear, only "some" applications support transactions. Unfortunately for me, Adobe Photoshop isn't one of them. So how do I make sure my Photoshop scripts take it turns?
I've tried three approaches:
1. Launching a dummy application every time a script activates Photoshop and quitting it when the script is done. Any script wanting to send an event to Photoshop needs to check for the app in the System Events process list before proceeding.
2. Repeatedly making this call to the shell:
do shell script "ps -ucxww | awk '/" & appName & "/{print $8}'"
until it doesn't return "R" (obviously appName would be "Photoshop" in this case) of course, this only tells you that the application is busy _at that moment_ which isn't quite what I want to know.
3. Asking Photoshop to "count documents" and only proceed if 0 is returned.
None of them seem particularly reliable to me. Can anyone suggest a better way?
thanks,
Richard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden