Saveas Scripting help request

I am trying to piece together a maro that will initially resize an image and save it with a different suffix at different size increments. I found within the cs5 scripts folder the macro 'Fit Image.jsx' that would allow me to resize correctly but am lost on how to add in the subsequent save steps and additional resize and saves. I would like to have it save the image with 5 different file sizes and suffixes (400x400 '-2' suffix, 250x250 '-2T', 150x150 '-1', 100x100 '-0', and 50x50 '-2S'). I found some information on the saveas http://forums.adobe.com/message/2652204 but have no experience with javascript. I have some understanding of VBA and believe a loop could be used but haven't the slightest idea how to set this up. Is there anyone out there that could help walk me through this and lend me a hand?
---Below contains the 'Fit Image.jsx' file that I found---
// c2008 Adobe Systems, Inc. All rights reserved.
// Written by Ed Rose
// based on the ADM Fit Image by Charles A. McBrian from 1997
// edited by Mike Hale added option to avoid resize on images already smaller than target size
@@@BUILDINFO@@@ Fit Image.jsx 1.0.0.21
/* Special properties for a JavaScript to enable it to behave like an automation plug-in, the variable name must be exactly
   as the following example and the variables must be defined in the top 1000 characters of the file
// BEGIN__HARVEST_EXCEPTION_ZSTRING
<javascriptresource>
<name>$$$/JavaScripts/FitImage/Name=Fit Image...</name>
<menu>automate</menu>
<enableinfo>true</enableinfo>
<eventid>3caa3434-cb67-11d1-bc43-0060b0a13dc4</eventid>
<terminology><![CDATA[<< /Version 1
                         /Events <<
                          /3caa3434-cb67-11d1-bc43-0060b0a13dc4 [($$$/AdobePlugin/FitImage/Name=Fit Image) /imageReference <<
                           /width [($$$/AdobePlugin/FitImage/Width=width) /pixelsUnit]
                           /height [($$$/AdobePlugin/FitImage/Height=height) /pixelsUnit]
                           /limit [($$$/AdobePlugin/FitImage/limit=Don't Enlarge) /boolean]
                          >>]
                         >>
                      >> ]]></terminology>
</javascriptresource>
// END__HARVEST_EXCEPTION_ZSTRING
// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop
// debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning)
// $.level = 2;
// debugger; // launch debugger on next line
// on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
$.localize = true;
var isCancelled = true; // assume cancelled until actual resize occurs
// the main routine
// the FitImage object does most of the work
try {
    // create our default params
    var sizeInfo = new SizeInfo();
    GlobalVariables();
    CheckVersion();
    var gIP = new FitImage();
    if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
        gIP.CreateDialog();
        gIP.RunDialog();
    else {
        gIP.InitVariables();
        ResizeTheImage(sizeInfo.width.value, sizeInfo.height.value);
    if (!isCancelled) {
        SaveOffParameters(sizeInfo);
// Lot's of things can go wrong
// Give a generic alert and see if they want the details
catch( e ) {
    if ( DialogModes.NO != app.playbackDisplayDialogs ) {
        alert( e + " : " + e.line );
// restore the dialog modes
app.displayDialogs = gSaveDialogMode;
isCancelled ? 'cancel' : undefined;
function ResizeTheImage(width, height) {
    var oldPref = app.preferences.rulerUnits;
    var docWidth;
    var docHeight;
    var docRatio;
    var newWidth;
    var newHeight;
    var resolution = app.activeDocument.resolution;
    var limit = sizeInfo.limit;
    app.preferences.rulerUnits = Units.PIXELS; // save old preferences
    // original width, height
    docWidth = (1.0 * app.activeDocument.width * resolution) / 72.0; // decimal inches assuming 72 dpi (used in docRatio)
    docHeight = (1.0 * app.activeDocument.height * resolution) / 72.0; // ditto
    if (docWidth < 1.0 || docHeight < 1.0)
        return true; // error
    if (width < 1 || height < 1)
        return true; // error
    if ( limit && ( docWidth <= width && docHeight <= height ) ){
        app.preferences.rulerUnits = oldPref; // restore old prefs
        isCancelled = false; // if get here, definitely executed
        return false; // no error
    docRatio = docWidth / docHeight; // decimal ratio of original width/height
    newWidth = width;
    newHeight = ((1.0 * width) / docRatio); // decimal calc
    if (newHeight > height) {
        newWidth = docRatio * height; // decimal calc
        newHeight = height;
    // resize the image using a good conversion method while keeping the pixel resolution
    // and the aspect ratio the same
    app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC);
    app.preferences.rulerUnits = oldPref; // restore old prefs
    isCancelled = false; // if get here, definitely executed
    return false; // no error
// created in
function SaveOffParameters(sizeInfo) {
    // save off our last run parameters
    var d = objectToDescriptor(sizeInfo, strMessage);
    app.putCustomOptions("3caa3434-cb67-11d1-bc43-0060b0a13dc4", d);
    app.playbackDisplayDialogs = DialogModes.ALL;
    // save off another copy so Photoshop can track them corectly
    var dd = objectToDescriptor(sizeInfo, strMessage);
    app.playbackParameters = dd;
function GlobalVariables() {
    // a version for possible expansion issues
    gVersion = 1.1;
    gMaxResize = 300000;
    // remember the dialog modes
    gSaveDialogMode = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    gInAlert = false;
    // all the strings that need to be localized
    strTitle = localize( "$$$/JavaScript/FitImage/Title=Fit Image" );
    strConstrainWithin = localize( "$$$/JavaScript/FitImage/ConstrainWithin=Constrain Within" );
    strTextWidth = localize("$$$/JavaScripts/FitImage/Width=&Width:");
    strTextHeight = localize("$$$/JavaScripts/FitImage/Height=&Height:");
    strTextPixels = localize("$$$/JavaScripts/FitImage/Pixels=pixels");
    strButtonOK = localize("$$$/JavaScripts/FitImage/OK=OK");
    strButtonCancel = localize("$$$/JavaScripts/FitImage/Cancel=Cancel");
    strTextSorry = localize("$$$/JavaScripts/FitImage/Sorry=Sorry, Dialog failed");
    strTextInvalidType = localize("$$$/JavaScripts/FitImage/InvalidType=Invalid numeric value");
    strTextInvalidNum = localize("$$$/JavaScripts/FitImage/InvalidNum=A number between 1 and 300000 is required. Closest value inserted.");
    strTextNeedFile = localize("$$$/JavaScripts/FitImage/NeedFile=You must have a file selected before using Fit Image");
    strMessage = localize("$$$/JavaScripts/FitImage/Message=Fit Image action settings");
    strMustUse = localize( "$$$/JavaScripts/ImageProcessor/MustUse=You must use Photoshop CS 2 or later to run this script!" );
    strLimitResize = localize("$$$/JavaScripts/FitImage/Limit=Don^}t Enlarge");
// the main class
function FitImage() {
    this.CreateDialog = function() {
        // I will keep most of the important dialog items at the same level
        // and use auto layout
        // use overriding group so OK/Cancel buttons placed to right of panel
        var res =
            "dialog { \
                pAndB: Group { orientation: 'row', \
                    info: Panel { orientation: 'column', borderStyle: 'sunken', \
                        text: '" + strConstrainWithin +"', \
                        w: Group { orientation: 'row', alignment: 'right',\
                            s: StaticText { text:'" + strTextWidth +"' }, \
                            e: EditText { preferredSize: [70, 20] }, \
                            p: StaticText { text:'" + strTextPixels + "'} \
                        h: Group { orientation: 'row', alignment: 'right', \
                            s: StaticText { text:'" + strTextHeight + "' }, \
                            e: EditText { preferredSize: [70, 20] }, \
                            p: StaticText { text:'" + strTextPixels + "'} \
                        l: Group { orientation: 'row', alignment: 'left', \
                                c:Checkbox { text: '" + strLimitResize + "', value: false }, \
                    buttons: Group { orientation: 'column', alignment: 'top',  \
                        okBtn: Button { text:'" + strButtonOK +"', properties:{name:'ok'} }, \
                        cancelBtn: Button { text:'" + strButtonCancel + "', properties:{name:'cancel'} } \
        // the following, when placed after e: in w and h doesn't show up
        // this seems to be OK since px is put inside the dialog box
        //p: StaticText { text:'" + strTextPixels + "'}
        // create the main dialog window, this holds all our data
        this.dlgMain = new Window(res,strTitle);
        // create a shortcut for easier typing
        var d = this.dlgMain;
        // match our dialog background color to the host application
        d.graphics.backgroundColor = d.graphics.newBrush (d.graphics.BrushType.THEME_COLOR, "appDialogBackground");
        d.defaultElement = d.pAndB.buttons.okBtn;
        d.cancelElement = d.pAndB.buttons.cancelBtn;
    } // end of CreateDialog
    // initialize variables of dialog
    this.InitVariables = function() {
        var oldPref = app.preferences.rulerUnits;
        app.preferences.rulerUnits = Units.PIXELS;
        // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
        try {
            var desc = app.getCustomOptions("3caa3434-cb67-11d1-bc43-0060b0a13dc4");
            descriptorToObject(sizeInfo, desc, strMessage);
        catch(e) {
            // it's ok if we don't have any options, continue with defaults
        // see if I am getting descriptor parameters
        var fromAction = !!app.playbackParameters.count;
        if( fromAction ){
            // reset sizeInfo to defaults
            SizeInfo = new SizeInfo();
            // set the playback options to sizeInfo
            descriptorToObject(sizeInfo, app.playbackParameters, strMessage);
        // make sure got parameters before this
        if (app.documents.length <= 0) // count of documents viewed
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert(strTextNeedFile); // only put up dialog if permitted
            app.preferences.rulerUnits = oldPref;
            return false; // if no docs, always return
        var w = app.activeDocument.width;
        var h = app.activeDocument.height;
        var l = true;
        if (sizeInfo.width.value == 0) {
            sizeInfo.width = w;
        else {
            w = sizeInfo.width;
        if (sizeInfo.height.value == 0) {
            sizeInfo.height = h;
        else {
            h = sizeInfo.height;
        app.preferences.rulerUnits = oldPref;
        if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
            var d = this.dlgMain;
            d.ip = this;
            d.pAndB.info.w.e.text = Number(w);
            d.pAndB.info.h.e.text = Number(h);
            d.pAndB.info.l.c.value = sizeInfo.limit;
        return true;
    // routine for running the dialog and it's interactions
    this.RunDialog = function () {
        var d = this.dlgMain;
        // in case hit cancel button, don't close
        d.pAndB.buttons.cancelBtn.onClick = function() {
            var dToCancel = FindDialog( this );
            dToCancel.close( false );
        // nothing for now
        d.onShow = function() {
        // do not allow anything except for numbers 0-9
        d.pAndB.info.w.e.addEventListener ('keydown', NumericEditKeyboardHandler);
        // do not allow anything except for numbers 0-9
        d.pAndB.info.h.e.addEventListener ('keydown', NumericEditKeyboardHandler);
        // hit OK, do resize
        d.pAndB.buttons.okBtn.onClick = function () {
            if (gInAlert == true) {
                gInAlert = false;
                return;
            var wText = d.pAndB.info.w.e.text;
            var hText = d.pAndB.info.h.e.text;
            var lValue = d.pAndB.info.l.c.value;
            var w = Number(wText);
            var h = Number(hText);
            sizeInfo.limit = Boolean(lValue);
            var inputErr = false;
            if ( isNaN( w ) || isNaN( h ) ) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strTextInvalidType );
                if (isNaN( w )) {
                    sizeInfo.width = new UnitValue( 1, "px" );
                    d.pAndB.info.w.e.text = 1;
                } else {
                    sizeInfo.height = new UnitValue( 1, "px" );
                    d.pAndB.info.h.e.text = 1;
                    return false;
            else if (w < 1 || w > gMaxResize || h < 1 || h > gMaxResize) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    gInAlert = true;
                    alert( strTextInvalidNum );
            if ( w < 1) {
                inputErr = true;
                sizeInfo.width = new UnitValue( 1, "px" );
                d.pAndB.info.w.e.text = 1;
            if ( w > gMaxResize) {
                inputErr = true;
                sizeInfo.width = new UnitValue( gMaxResize, "px" );
                d.pAndB.info.w.e.text = gMaxResize;
            if ( h < 1) {
                inputErr = true;
                sizeInfo.height = new UnitValue( 1, "px" );
                d.pAndB.info.h.e.text = 1;
            if ( h > gMaxResize) {
                inputErr = true;
                sizeInfo.height = new UnitValue( gMaxResize, "px" );
                d.pAndB.info.h.e.text = gMaxResize;
            if (inputErr == false)  {
                sizeInfo.width = new UnitValue( w, "px" );
                sizeInfo.height = new UnitValue( h, "px" );
                if (ResizeTheImage(w, h)) { // the whole point
                    // error, input or output size too small
                d.close(true);
            return;
        if (!this.InitVariables())
            return true; // handled it
        // give the hosting app the focus before showing the dialog
        app.bringToFront();
        this.dlgMain.center();
        return d.show();
function CheckVersion() {
    var numberArray = version.split(".");
    if ( numberArray[0] < 9 ) {
        if ( DialogModes.NO != app.playbackDisplayDialogs ) {
            alert( strMustUse );
        throw( strMustUse );
function FindDialog( inItem ) {
    var w = inItem;
    while ( 'dialog' != w.type ) {
        if ( undefined == w.parent ) {
            w = null;
            break;
        w = w.parent;
    return w;
// Function: objectToDescriptor
// Usage: create an ActionDescriptor from a JavaScript Object
// Input: JavaScript Object (o)
//        object unique string (s)
//        Pre process converter (f)
// Return: ActionDescriptor
// NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
//       to convert (f) other types to one of these forms.
// REUSE: This routine is used in other scripts. Please update those if you
//        modify. I am not using include or eval statements as I want these
//        scripts self contained.
function objectToDescriptor (o, s, f) {
    if (undefined != f) {
        o = f(o);
    var d = new ActionDescriptor;
    var l = o.reflect.properties.length;
    d.putString( app.charIDToTypeID( 'Msge' ), s );
    for (var i = 0; i < l; i++ ) {
        var k = o.reflect.properties[i].toString();
        if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
            continue;
        var v = o[ k ];
        k = app.stringIDToTypeID(k);
        switch ( typeof(v) ) {
            case "boolean":
                d.putBoolean(k, v);
                break;
            case "string":
                d.putString(k, v);
                break;
            case "number":
                d.putDouble(k, v);
                break;
            default:
                if ( v instanceof UnitValue ) {
                    var uc = new Object;
                    uc["px"] = charIDToTypeID("#Pxl"); // pixelsUnit
                    uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                    d.putUnitDouble(k, uc[v.type], v.value);
                } else {
                    throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
    return d;
// Function: descriptorToObject
// Usage: update a JavaScript Object from an ActionDescriptor
// Input: JavaScript Object (o), current object to update (output)
//        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
//        object unique string (s)
//        JavaScript Function (f), post process converter utility to convert
// Return: Nothing, update is applied to passed in JavaScript Object (o)
// NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
//       to convert (f) other types to one of these forms.
// REUSE: This routine is used in other scripts. Please update those if you
//        modify. I am not using include or eval statements as I want these
//        scripts self contained.
function descriptorToObject (o, d, s, f) {
    var l = d.count;
    if (l) {
        var keyMessage = app.charIDToTypeID( 'Msge' );
        if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
    for (var i = 0; i < l; i++ ) {
        var k = d.getKey(i); // i + 1 ?
        var t = d.getType(k);
        strk = app.typeIDToStringID(k);
        switch (t) {
            case DescValueType.BOOLEANTYPE:
                o[strk] = d.getBoolean(k);
                break;
            case DescValueType.STRINGTYPE:
                o[strk] = d.getString(k);
                break;
            case DescValueType.DOUBLETYPE:
                o[strk] = d.getDouble(k);
                break;
            case DescValueType.UNITDOUBLE:
                var uc = new Object;
                uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                var ut = d.getUnitDoubleType(k);
                var uv = d.getUnitDoubleValue(k);
                o[strk] = new UnitValue( uv, uc[ut] );
                break;
            case DescValueType.INTEGERTYPE:
            case DescValueType.ALIASTYPE:
            case DescValueType.CLASSTYPE:
            case DescValueType.ENUMERATEDTYPE:
            case DescValueType.LISTTYPE:
            case DescValueType.OBJECTTYPE:
            case DescValueType.RAWTYPE:
            case DescValueType.REFERENCETYPE:
            default:
                throw( new Error("Unsupported type in descriptorToObject " + t ) );
    if (undefined != f) {
        o = f(o);
// Function: SizeInfo
// Usage: object for holding the dialog parameters
// Input: <none>
// Return: object holding the size info
function SizeInfo() {
    this.height = new UnitValue( 0, "px" );
    this.width = new UnitValue( 0, "px" );
    this.limit = false;
// Function: NumericEditKeyboardHandler
// Usage: Do not allow anything except for numbers 0-9
// Input: ScriptUI keydown event
// Return: <nothing> key is rejected and beep is sounded if invalid
function NumericEditKeyboardHandler (event) {
    try {
        var keyIsOK = KeyIsNumeric (event) ||
                      KeyIsDelete (event) ||
                      KeyIsLRArrow (event) ||
                      KeyIsTabEnterEscape (event);
        if (! keyIsOK) {
            //    Bad input: tell ScriptUI not to accept the keydown event
            event.preventDefault();
            /*    Notify user of invalid input: make sure NOT
                   to put up an alert dialog or do anything which
                         requires user interaction, because that
                         interferes with preventing the 'default'
                         action for the keydown event */
            app.beep();
    catch (e) {
        ; // alert ("Ack! bug in NumericEditKeyboardHandler: " + e);
//    key identifier functions
function KeyHasModifier (event) {
    return event.shiftKey || event.ctrlKey || event.altKey || event.metaKey;
function KeyIsNumeric (event) {
    return  (event.keyName >= '0') && (event.keyName <= '9') && ! KeyHasModifier (event);
function KeyIsDelete (event) {
    //    Shift-delete is ok
    return ((event.keyName == 'Backspace') || (event.keyName == 'Delete')) && ! (event.ctrlKey);
function KeyIsLRArrow (event) {
    return ((event.keyName == 'Left') || (event.keyName == 'Right')) && ! (event.altKey || event.metaKey);
function KeyIsTabEnterEscape (event) {
    return event.keyName == 'Tab' || event.keyName == 'Enter' || event.keyName == 'Escape';
// End Fit Image.jsx

With Photoshop CS5 you can use Image Processor Pro and this should do what you require...
http://blogs.adobe.com/jnack/2011/05/new-image-processor-pro-script-for-cs5.html

Similar Messages

  • Simple Address Book script help request

    I want an AppleScript to enter a single value in the 'Note' field for each record/contact in a certain group.
    I wrote this:
    tell application "Address Book"
    repeat with allcontacts in group "Health"
    set NewNote to "doctor"
    set value of note to NewNote
    end repeat
    end tell
    It compiles and seems to run OK. But nothing happens. What am I doing wrong?
    (I wish I knew AS better Thanks!)
    G5 DP 2 GHz   Mac OS X (10.4.10)   No Haxies; permissions frequently repaired etc

    Hi Mark you have the right idea, but you are slightly off..
    The biggest problem is in your loop. Like I said you do have the right idea though. When your looping with x in y "Y" must actually be a list of things, so in your case you need to build a list of all the contacts in group "Health" first.
    =================================================
    tell application "Address Book"
    set allContacts to every person in group "Health"
    repeat with singleContact in allContacts
    set singleContact's note to ((get singleContact's note) & return & "doctor" as string)
    end repeat
    end tell
    =================================================
    So as you can hopefully see first we build a list of the person entries contained in group "Health" then we step through that list.
    Also in my example we are preserving the contents of what may already exist in the note field rather then overwriting it.
    Hope that helps!

  • Save As scripting help

    I have a script placed in a Print button that validates certain fields  to make sure they are filled in before the pdf is submitted. So it basically  says if these fields are empty then generate an error message else print PDF.  Well, I'm needing to change the button from a Print button to a Save button. Is  there any script that will allow me to do this?
    I read that in order for the saveAs script to work you have to create a  custom function to get around security rights. But is there a more simple way to  do this if I don't need it saved to a specific path? I just need it to operate  just like File>Save As does, they can choose where to save it to. Just simply  adding the default SaveAs action in the button isn't working, it's bypassing the  code that is supposed to stop the form from being saved if certain fields are  empty. Is there a simple code that will let them choose where to save the pdf  without having security issues? Thanks for your help!

    There's no workaround. This method must run from a trusted context.
    Another option is to exec the SaveAs menu item, but that too requires the
    same trusted context.

  • AT selection-screen on ON HELP-REQUEST

    Hi
    What is normally done in the Selection Screen event :
    AT selection-screen on ON HELP-REQUEST.
    Normally pressing F1 helps gives Documentation present in Data Element assoicated with the field. Exactly in what cases would we be needing to use this event.

    Hi,
    That event is used for search.
    at selection-screen on value-request for p_file.
      call function 'F4_FILENAME'
           exporting
                field_name = 'p_file'
           importing
                file_name  = p_file.
    If you code in the same manner in the selection screen you will able to search and select a file from your work station, so that it will be uploaded in SAP.
    I hope this will help you, if not plzzz be back.
    CHEERS
    If your problem is solved award points and close the thread.

  • PROCESS ON HELP-REQUEST

    Hi
    wat is importance of POH. what If there is no PROCESS ON HELP-REQUEST ?
    Thanks and regards
    - Puneet Sharma.

    To display data element supplement documentation, you must code the following screen flow logic in the POH event:
    PROCESS ON HELP-REQUEST.
      FIELD <f> [MODULE <mod>] WITH <num>.
    After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
    If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
    You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.

  • Process on Help request and Process on value request events examples

    HI All,
               Can anybody please give me some examples of Process on Help request and Process on value request events.
    Thanks in advance

    HI,
    Check programs
    <b>demo_selection_screen_f1</b>.
    <b>demo_selection_screen_f4.</b>
    Regards,
    Sesh

  • Gallery script help, please

    Gallery script help, please
    Hello,
    I'm new to actionscript in general, I do know a little...
    I foung a gallery script, modified many things, the images
    open fine, everything is working, but here's the thing:
    the gallery is in 3 sections, red, blue and yellow.
    I would like to know how, what, and where to put a script so
    that if a "the small red image #1" is clicked, I can load any sort
    of a movie on top of the "the BIG red image #1" or #2 or 3 and so
    on...same goes for the blue and yellow...
    If I figured things correctly on my own...the small thumbnail
    images of the gallery are not buttons, that's why I can't attach a
    movie (let's say) to them...but it is all written in script, using
    the horizontal and vertical position of the mouse to open the large
    images of the gallery...
    So, I don't know how to figure things out, to attach a
    specific movie to a specific thumbnail...
    p.s.: I think the script that controls the gallery is in
    symbol 120
    I really would appreciate the help
    Merry Christmas in advance to everyone
    Sandra
    here are all the files...
    http://www.gentro.ca/sandra_test.zip

    There's a great tutorial on kirupa...
    click
    here for link

  • Firefox not responding, freezes, sometimes responds after a few minutes, other times a pop-up appears asking if I want to stop script - help please

    firefox not responding, freezes, sometimes responds after a few minutes, other times a pop-up appears asking if I want to stop script - help please

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • WARNING! A script has requested to print an Acrobat file

    When i print all pdf file i get a warning script message that i have to click on
    OK each time this method is called, even if i checked the check box, it would reset next time i print again. I couldn't find iWarnScriptPrintAll  registry that used to be in Adobe 7.0 to disable this message, unless it has different name now. Any Idea???
    The Warning Message is: "WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?"

    HOW are you executing this print?
    Leonard

  • Need help with Replace Metadata then multiple Save script

    I am attempting to create a javascript to run on a folder of PSDs. I need it to:
    1. Replace image Metadata with an existing Metadata Template called "UsageTerms".
    2. Play an existing Action "Prep_PrintRes". (The action sharpens and converts to 8-bit)
    3. Append "_PrintRes" to the filename. (ie OriginalPSDName_PrintRes.jpg)
    4. Save the file as a 12 Quality JPEG to specific folder on my hard drive, "D:/Transfer".
    5. Play an existing Action "Prep_Magazine" (The action resizes, sharpens, and converts to CMYK)
    6. Append "_Magazine" to the filename. (ie OriginalPSDName_Magazine.jpg)
    7. Save the file as a 10 Quality JPEG WITH NO EMBEDDED PROFILE to "D:/Transfer".
    8. Play an existing Action "Prep_Screen". (The action sizes, sharpens, and converts to sRGB)
    9. Append "_ScreenRes" to the filename (ie OriginalPSDName_ScreenRes.jpg)
    10. Save the file as an 8 Quality JPEG to "D:/Transfer"
    If anyone is available to help me get started with this I would greatly appreciate it. I can do a minimal amount of Visual Basic but Javascript is alien to me. Thanks so much!

    Try the following as the custom calculate script:
    // Sum the field values, as numbers
    var sum = +getField("LaborCost").value;
    sum += +getField("MaterialCost").value;
    sum += +getField("EquipmentCost").value;
    // Set this field value
    event.value = sum > 0 ? sum : 0;
    For the other one, change the last line to:
    event.value = sum < 0 ? sum : 0;

  • Script Help please. Need to save as different filetype.

    I have a script that is currently saving files as jpgs.  I need it to save as a png.  Would someone be able to help me with this?
    var doc = app.activeDocument;
    var Path = doc.path; 
    var Name = doc.name.replace(/\.[^\.]+$/, ''); var Suffix = "_full_l"; var saveFile = File(Path + "/" + "full_l" + ".jpg"); SaveJPEG(saveFile, 8); 
    function SaveJPEG(saveFile, jpegQuality){ jpgSaveOptions = new JPEGSaveOptions(); jpgSaveOptions.embedColorProfile = true; jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE; jpgSaveOptions.matte = MatteType.NONE; jpgSaveOptions.quality = jpegQuality; activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE); }

    Here you are...
    var doc = app.activeDocument;
    var Path = doc.path;
    var Name = doc.name.replace(/\.[^\.]+$/, '');
    var Suffix = "_full_l";
    var saveFile = File(Path + "/" + "full_l" + ".png");
    SavePNG(saveFile);
    function SavePNG(saveFile){
        pngSaveOptions = new PNGSaveOptions();
        pngSaveOptions.embedColorProfile = true;
        pngSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
        pngSaveOptions.matte = MatteType.NONE;
        pngSaveOptions.quality = 1;
    pngSaveOptions.PNG8 = false;
        pngSaveOptions.transparency = true;
    activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);

  • Scripted Gateway Resource Adapter - Help requested

    Hello all,
    Sun IDM 8.1.0.9 running on JBOSS 4.2 running on Redhat 5.0
    Gateway server is Windows Server 2008 R2 (x64)
    I'm trying to use the Scripted Gateway Resource Adapter. I can get it to execute Windows CMD files just fine but as soon as I ask the cmd file to run either powershell or even vbscript, it craps out. Return code is -65536 and Error text is just the letter 'W'.
    Enter: reply
    Enter: sendBuffer
    Sending buffer:
    <?xml version='1.0' encoding='UTF-16'?>
    <Response>
    <Result status='ok'>
    <ResultItem type='ACTION_RC'>
    <object class='String'>-65536</object>
    </ResultItem>
    <ResultItem type='ACTION_STDOUT'>
    <object class='String'></object>
    </ResultItem>
    <ResultItem type='ACTION_STDERR'>
    <object class='String'>W</object>
    </ResultItem>
    </Result>
    </Response>
    I know the Gateway.exe program is a 32-bit program and is quite particular about that and I have tried to take that into account when calling PoSH or VBScript.
    If anyone has had any experience with this adapter, any help or guidance would be greatly appreciated.
    Tim.
    Edited by: tmunro55 on Nov 14, 2011 10:28 AM

    OK so here's the scoop. Rather than upgrading the IDM to OW 8.1.1 (which will happen eventually, just not fast enough), I downgraded the Gateway server to Windows Server 2003 (x86). It all works. The answer that it required OW 8.1.1 for Server 2008 R2 was indirectly spot on.
    Marking this as answered.
    Thanks.
    Edited by: tmunro55 on Nov 16, 2011 6:56 PM

  • QuickTime - Save Export Settings -  script help needed

    Currently I am using Panther 10.3.9 - with QT PRO 7.02 - ( I do not want to
    upgrade to Tiger at this time unfortunately)...
    * MY GOAL: to be able to save export preferences in QuickTime pro.
    Since QuickTime does not seem to be able to save export presets... I
    downloaded the the script collection from
    From: Scriptable Applications: Quicktime Player
    Location: http://www.apple.com/applescript/quicktime/
    and created export settings and tried ....
    Save Export Settings.scpt
    ... but the file that got saved will not open in QT PRO - OSX and wants to
    open something from old os9....
    what do I do?

    = = = (see scripts below)
    * here is my basic workflow ...
    - load a QuickTime movie
    - adjust the QuickTime movie export settings
    - save a test copy ( validating the settings)
    - run the "save export settings.scpt" with name "set1test"
    Then
    - open and run the "Export QuickTime movie.scpt" with the name " test movie"
    - run the new test movie - and when I check info - it does NOT reflect the desired settings...
    = = =
    One issue is - this line...
    export movie 1 to new_file as QuickTime movie using settings "set1test"
    ... It doesn't seem to care what the settings file name is - and if I change that name to a nonexistent name - it still exports the movie without an error.... Therefore it leads me to believe that it's not using it to begin with....
    - another issue is that the settings file "set1test" says it is the kind = "QuickTime settings document" - however it has a blank icon in the Finder - and there does not seem to be any way to open the file with QuickTime 7.02 - and it can to open something classic mode when I double click on it.
    = = = the Save settings script...
    tell application "QuickTime Player"
    activate
    try
    if not (exists movie 1) then error "No movies are open."
    stop every movie
    set the target_file to choose file name with prompt "name & location for the QT settings file:"
    save export settings movie 1 for QuickTime movie to target_file with replacing
    end try
    end tell
    === the Export QuickTime movie.scpt
    tell application "QuickTime Player"
    activate
    try
    if not (exists movie 1) then error "No movies are open."
    stop every movie
    set the movie_name to "mytest.mov"
    if (can export movie 1 as QuickTime movie) is true then
    set the new_file to ¬
    choose file name with prompt "Enter a name:" default name movie_name
    export movie 1 to new_file as QuickTime movie using settings "set1test"
    end if
    end try
    end tell

  • Need scripting help to open and save 250 MSWord files

    I'm clueless about programming and I have 250 Word files that need to be saved down as Word 5.1. I briefly tried to learn Word Macros, AppleScript, Automator, with no luck so far.
    What's the best software to use for this and how do I do it? Is there already a script somewhere that I can download?
    Thanks!

    I'm clueless about programming and I have 250 Word files that need to be saved down as Word 5.1. I briefly tried to learn Word Macros, AppleScript, Automator, with no luck so far.
    What's the best software to use for this and how do I do it? Is there already a script somewhere that I can download?
    Thanks!

  • Help Requested - Form closes when Save is clicked..

    Hi,
    We are facing a unique problem. On a transaction window, when the number of records are high, and when the user saves the transactions, the form window closes down.
    Any pointers what could be causing the form to close on save. this happens once in a while and is NOT reproduciable. Also, there is a basic form personilization on the form whcih calls a .pll.
    Thanks in advance.
    -bs

    Hi,
    Obtain the FRD file and see if more details about the error are reported in the logs.
    Note: 150168.1 - Obtaining Forms Runtime Diagnostics (FRD) In Oracle Applications 11i
    Note: 438652.1 - R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications
    Also, please verify that you have no invalid objects in the database.
    Regards,
    Hussein

Maybe you are looking for