Copy link to clipboard
Copied
Using applescript I have this run
tell application id "com.adobe.Photoshop" to activate
do something
'Something' never happens as the splash screen remains stuck on the screen, click on the grey and it goes, the scripts always worked fine before this update.
Copy link to clipboard
Copied
Not good. Are you launching this script via double click or command line or other? I see the same problem if I do a /fullpathtoapp RunThis.jsx. at the command line. If I add an activate osascript call after that all is well. For the time being I would go to preferences and turn off the 'start' screen and restart Photoshop.
Copy link to clipboard
Copied
I get this when running an Automator action containing an embedded AppleScript via a Service from the Finder.
Turning off the "start" workspace doesn't seem to have any effect for me.
Copy link to clipboard
Copied
I have an applescript that is saved as a droplet. The behaviour appears to have changed a little from the last post so I assume I am on a newer version of Photoshop 2017.0.0 Release 20161012.r.53 x 64 Now when the applescript runs it processes X number of files and the first file loads but is not processed but all others are fine. The start screen doesn't help me either. Can you turn off the splash screen?
Matt
Copy link to clipboard
Copied
This is definitely a Photoshop bug, where it's returning an error if you ask it to open a file too early in the launch process.
Until it gets fixed by Adobe, the best solution is to insert a delay of a few seconds on first launch, to get past the buggy start-up state.
Depending on how fancy you want to get, you can check System Events to see if Photoshop is already running, and then only insert the delay if it wasn't running when the script ran.
tell application "System Events"
if application process "Adobe Photoshop CC 2017" exists then
set photoshopLaunched to true
else
set photoshopLaunched to false
end if
end tell
....
if photoshopLaunched is false then
delay 4
end if
Copy link to clipboard
Copied
Yes I tried a delay, I added 10 seconds then 30 and it stalls on that first image.
I just tried adopting your version of the code and again first one doesn't process and the rest do.
Copy link to clipboard
Copied
so it works for me (be sure the launch workspace is off in preferences BTW) only if I do this:
1. start of script: check if Photoshop is launched, store as a variable
2. next line of script: tell application "Photoshop CC 2017" to activate
then I do some other processing of the files I'm passing to it, and then:
if photoshopLaunched is false then
delay 4
end if
tell application "Photoshop CC 2017"....
I think by kicking off the launch earlier with an activation, i'm buying more time and bringing the UI to the front. I don't know if it works 100% of the time at 4 seconds but it definitely worked for me with a delay of 10.
Copy link to clipboard
Copied
Buttoning this up for those people searching for the solution to this problem and ending up here...
I solved this error by anticipating in using a try statement. On error, wait 5 seconds and try again. It works!
tell application "Adobe Photoshop CC 2017"
try
open file (POSIX path of fileAlias)
on error
tell me to delay 5
activate
open file (POSIX path of fileAlias)
end try
Find more inspiration, events, and resources on the new Adobe Community
Explore Now