Skip to main content
zeRafio
Inspiring
April 11, 2009
Question

[cs3] Run Applescript from action palelette

  • April 11, 2009
  • 2 replies
  • 3680 views

Everything is in the title.

Any clues?

This topic has been closed for replies.

2 replies

Inspiring
April 11, 2009

I don't use Applescript but I sometimes call VBS from javascript so maybe you can do the same.

Xbytor has a tutorial on File.execute here http://ps-scripts.com/bb/viewtopic.php?t=344 You will find info about OSX near the end of the thread.

Muppet_Mark-QAl63s
Inspiring
April 12, 2009

Michael, I recall taking a look at the posted link once before I was however unable to get it to work with AppleScript. I tried several methods of saving my AppleScript code and non of my efforts worked. If some one does find a working solution do post back as I would like to know where I was going wrong. This is what I had:

var myAppleScript = new File ("/Users/marklarsen/Desktop/Test.scpt");

myAppleScript.execute();

I saved this in Applications/Adobe Photoshop CS2/Presets/Scripts/MarksTest.jsx

I've only just got around to re-reading CoreGuideJS14.pdf to try and get some basic understanding of Javascript.

Muppet_Mark-QAl63s
Inspiring
April 14, 2009

I have some bad news for you Mark..

Just tried the same thing with Photoshop CS2 and it does NOT work, Photoshop CS3 works just fine.

Running the app (CS2) from Finder works, so it might be worth trying to call it via a shell script, and call the shell script from javascript?

I can't test with Photoshop CS4 as I only have that on my Windows machine.

I will do some more tests later.


Paul, thanks for looking at this it's no major problem. At least you have proved that I am not totally stupid!!!

When it gets around to upgrades I may well be able to do some thing.

Muppet_Mark-QAl63s
Inspiring
April 11, 2009

I don't have CS3 only CS2 but you can use the "Inset menu item" from the Actions fly out menu navigate to a loaded script. This works for me with JavaScript.jsx files but I have never been able to get this app to recognise AppleScript files!!!

zeRafio
zeRafioAuthor
Inspiring
April 11, 2009

Thanks, Mark. I know this fonction.

But unfortunately this is only for JavaScripts.

Don't understand why there is this restriction.

Maybe this workaround could make it:

to launch an AppleScript from within a JavaScript.

Some one to give us the code?