Photoshop 7 and Save for Web
Photoshop 7 and Save for Web
- Subject: Photoshop 7 and Save for Web
- From: Ron Bishop <email@hidden>
- Date: Wed, 31 Jul 2002 12:08:28 -0500
Here's a quick and dirty way to type in the filename and choose a
different folder location. (I'm sure a Javascripter could make this
cleaner.)
-------------------------
display dialog " Please enter a file name..." default answer ""
set theFileName to text returned of result
set theFileDestination to choose folder with prompt "Select a folder to
save into..."
set the FilePath to theFileDestination as string
set theJavascript to "{var id15 = charIDToTypeID( \"Expr\" );
var desc6 = new ActionDescriptor();
var id16 = charIDToTypeID( \"Usng\" );
var desc7 = new ActionDescriptor();
var id17 = charIDToTypeID( \"Op \" );
var id18 = charIDToTypeID( \"SWOp\" );
var id19 = charIDToTypeID( \"OpSa\" );
desc7.putEnumerated( id17, id18, id19 );
var id20 = charIDToTypeID( \"Fmt \" );
var id21 = charIDToTypeID( \"IRFm\" );
var id22 = charIDToTypeID( \"JPEG\" );
desc7.putEnumerated( id20, id21, id22 );
var id23 = charIDToTypeID( \"Intr\" );
desc7.putBoolean( id23, false );
var id24 = charIDToTypeID( \"Qlty\" );
desc7.putInteger( id24, 60 );
var id25 = charIDToTypeID( \"QChS\" );
desc7.putInteger( id25, 0 );
var id26 = charIDToTypeID( \"QCUI\" );
desc7.putInteger( id26, 0 );
var id27 = charIDToTypeID( \"QChT\" );
desc7.putBoolean( id27, false );
var id28 = charIDToTypeID( \"QChV\" );
desc7.putBoolean( id28, false );
var id29 = charIDToTypeID( \"Optm\" );
desc7.putBoolean( id29, true );
var id30 = charIDToTypeID( \"Pass\" );
desc7.putInteger( id30, 1 );
var id31 = charIDToTypeID( \"blur\" );
desc7.putDouble( id31, 0.000000 );
var id32 = charIDToTypeID( \"EICC\" );
desc7.putBoolean( id32, false );
var id33 = charIDToTypeID( \"Mtt \" );
desc7.putBoolean( id33, true );
var id34 = charIDToTypeID( \"MttR\" );
desc7.putInteger( id34, 255 );
var id35 = charIDToTypeID( \"MttG\" );
desc7.putInteger( id35, 255 );
var id36 = charIDToTypeID( \"MttB\" );
desc7.putInteger( id36, 255 );
var id37 = charIDToTypeID( \"SHTM\" );
desc7.putBoolean( id37, false );
var id38 = charIDToTypeID( \"SImg\" );
desc7.putBoolean( id38, true );
var id39 = charIDToTypeID( \"SSSO\" );
desc7.putBoolean( id39, false );
var id40 = charIDToTypeID( \"SSLt\" );
var list1 = new ActionList();
desc7.putList( id40, list1 );
var id41 = charIDToTypeID( \"DIDr\" );
desc7.putBoolean( id41, false );
var id42 = charIDToTypeID( \"In \" );
desc7.putPath( id42, new File( \"" & FilePath & theFileName &
".jpg" & "\" ) );
var id43 = stringIDToTypeID( \"SaveForWeb\" );
desc6.putObject( id16, id43, desc7 );
executeAction( id15, desc6, DialogModes.NO );}"
tell application "Adobe Photoshop 7.0"
activate
do javascript theJavascript
end tell
-------------------------
Hope that helps,
Ron Bishop
www.daddydoodaa.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.