Skip to main content
zeRafio
Inspiring
April 11, 2009
Question

[cs3] Run Applescript from action palelette

  • April 11, 2009
  • 2 replies
  • 3671 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.

Paul Riggott
Inspiring
April 12, 2009

I have just had a play and managed to get it to work.

Compile and saveas an app run only  then.....

var myAppleScript = new File ("~/Desktop/Test.app");

myAppleScript.execute();

Update, it does not need to be "run only" just make sure "Startup Screen" and "Stay Open" are unticked.

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?