Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Applescript Splash screen prevents scripts running (cc 2017)

Contributor ,
Nov 21, 2016 Nov 21, 2016

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.

Screen Shot 2016-11-21 at 14.30.11.png

TOPICS
Actions and scripting
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Dec 08, 2016 Dec 08, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 08, 2016 Dec 08, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 09, 2016 Dec 09, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 09, 2016 Dec 09, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 09, 2016 Dec 09, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 09, 2016 Dec 09, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 15, 2016 Dec 15, 2016
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines