See if this works for you… Just some very basic AppleScript with a call to 'do javascript' in this case the variable 'Solid_Fill' this is a cleaned up piece of scriptlistener output (done very nicely by X's tools you will see a post below to the latest release of this) The scriptlistener output has been turned into a function that javascript can call. Inside of the function call I have put a list arguments passed from AppleScript. So the values 0, 0, 0, 0 in the AppleScript list end up as arguments passed to the functions C, M, Y, K variables. AppleScript objects are 1 based Javascript are 0 based & values the same. set Solid_Fill to "function solidFillCMYK(C, M, Y, K) { function cTID(s) { return app.charIDToTypeID(s); }; function sTID(s) { return app.stringIDToTypeID(s); }; var desc8 = new ActionDescriptor(); var ref4 = new ActionReference(); ref4.putClass( sTID('contentLayer') ); desc8.putReference( cTID('null'), ref4 ); var desc9 = new ActionDescriptor(); var desc10 = new ActionDescriptor(); var desc11 = new ActionDescriptor(); desc11.putDouble( cTID('Cyn '), C ); desc11.putDouble( cTID('Mgnt'), M ); desc11.putDouble( cTID('Ylw '), Y ); desc11.putDouble( cTID('Blck'), K ); desc10.putObject( cTID('Clr '), cTID('CMYC'), desc11 ); desc9.putObject( cTID('Type'), sTID('solidColorLayer'), desc10 ); desc8.putObject( cTID('Usng'), sTID('contentLayer'), desc9 ); executeAction( cTID('Mk '), desc8, DialogModes.NO ); }; solidFillCMYK(arguments[0], arguments[1], arguments[2], arguments[3]);" tell application "Adobe Photoshop CS2" activate set User_Rulers to ruler units of settings set ruler units of settings to pixel units set Doc_Ref to the current document tell Doc_Ref set background layer of last layer to false do javascript Solid_Fill with arguments {0, 0, 0, 0} show debugger on runtime error move first layer to end set Doc_Height to height -- set Doc_Width to width did NOT need this resize canvas height Doc_Height + 200 anchor position top center flatten end tell set ruler units of settings to User_Rulers end tell
... View more