Call JavaScript from AppleScript
Call JavaScript from AppleScript
- Subject: Call JavaScript from AppleScript
- From: Rich Sweeny <email@hidden>
- Date: Thu, 22 Feb 2007 10:26:36 -0500
Hi,
I am having problems
calling and passing arguments from a AppleScript file to a _javascript_ file.
Would anyone know the proper way of doing this?
Thanks
Rich
**** The applescript file ******
using terms from
application "Adobe Photoshop CS2"
set
scriptFile to
a reference
to
file "Users:Shared:bin:AdobeAutomate:ProcessPhotoshopFiles.jsx"
do _javascript_ scriptFile with arguments {custName, jobNo,
linkArtPath}
end
using terms from
**** The _javascript_ file called
ProcessPhotoshopFiles.jsx *****
var custName;
var jobNo;
var linkArtPath;
// used for testing the script
checkPhotoshopFiles( custName, jobNo,
linkArtPath );
// a folder to move files which are
out of spec
var outOfSpecFolder = linkArtPath +
"/OutOfSpec-Images/";
var vectorArtFolder = linkArtPath +
"/VectorArt";
function checkPhotoshopFiles( custName,
jobNo, sourcePath ) {
....
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden