Problem with Save as action script PS CS4

Hello

I am just to script and I encounter an error message when you run this particular snippet, which is extracted from the CS4 scripting Guide

Picture 1.png

This is the part of the script that is causing a problem, anyone know why its giving me an error message? I searched around a lot and can't seem to understand...


app.activeDocument.flatten ();

jpgFile = new file ("/ Temp001.jpeg");

app.activeDocument.saveAs (jpgFile);

Thank you!

Try...

var jpgFile = new File ("~ / Desktop/Temp001.jpg");

~: Home project

Tags: Photoshop

Similar Questions

  • How to create the object rectangular box with a pure action script.

    How to create the object rectangular box with a pure action script?

    I think, it can be done through the clip library, but I'm not sure. Please, I want to take the suggestion to create a rectangular box as a script through

    Take a new file and write about the first image the code below, it works fine:

    var rect = new Shape();
    rect.graphics.beginFill (0xFF0000);
    rect.graphics.drawRect (0, 0, 100,50);
    rect.graphics.endFill ();

    var MC = new MovieClip();
    mc.addChild (rect);
    addChild (mc);

    If this doesn't solve your problem then paste the error you get

  • Problem with the stop action

    Hello...

    I have a prblem makes me Mad... not really professional to the whip, I'm just beginning so I guess it's normal... Here's my number...

    I have the timeline with an animation, what I do is an entire website with pages on different frameworks... So far I put to the top of the intro page, everything works fine... I started to make buttons for navigation, the problem is, when I put a stop on the 1st action framework... the introduction clip no longer plays, but the button works fine and takes me to framework x with different content, so I tried to change and put the stop at the end of the opening sequence action What then happens is the introduction plays ok and stops but the button does not take me more search framework...

    I don't know if it can be of any help, but in case here is the action script that I use:

    btn_home.addEventListener (MouseEvent.CLICK, accueilliens);
    function accueilliens (e:MouseEvent): void
    {gotoAndStop (65);}
    }

    Could someone please help me understand what I am doing wrong? Thanks in advance

    Looks like you have more than one keyframe for the keys.  When you have a new keyframe, any code that has been assigned to the buttons must be reallocated.  If you have buttons on their own layer and not interrupt that their with new images keys, then you don't have to assign a code for them once.

  • Flash beginner needs help with Movie Clips/Action script

    HI -.

    I'm having a problem with my video clips playing simultaneously and cannot, for the life of me, know what I did wrong. I'm new to flash so I can I have created something wrong but this is what I have so far:

    11 layers, total: 1 layer with 10 buttons, each button with the following actionscript code:


    on (release) {}
    gotoAndPlay (85);
    }


    When the number changes with regard to keyframes, the next film is about.

    I have 10 films, total, but they are only video clips, mainly photo slideshow with audio, does everything in the library.

    The problem occurs when I click on the second or third button. Not only the movie I selected starts to play, but all previous clips are as well, he has completely blurred all the sounds. I don't know what Miss me in action script, as my Action layer has a stop command to this topic at each keyframe where there is a new clip to play.

    I tried to add a stopAllSounds command, but I'm afraid that does nothing because it is not an "audio file" in itself playing in the timeline panel.

    I'm at the end of my rope and really need help to understand this one. My project is hanging in the balance on this point, I wrote everything correctly and it works beautifully.

    Help, please!

    Thank you
    Caroline

    Start your sounds in frame 2 and place stopAllSounds() on each keyframe where begins a movieclip.

  • Animate - problem with the duplication of scripts after loop

    Hi all

    I have a problem with button simple script to the first frame. All right when the timeline is playing for the first time. After that when timeline loops and stops again to 0 frame button script is fireing twice, when it performs a loop twice is fireing three times etc...

    Here is my script:

    This.Stop ();

    exportRoot.mc_cta.cursor = "pointer";

    This.mc_cta.on ("click", clickFunc.bind (this));

    function clickFunc() {}

    Console.log ("clicked");

    EB.userActionCounter ("clicked");

    exportRoot.gotoAndPlay (1);

    }

    Anyone any ideas? Where I'm wrong?

    Thank you!

    Kris

    As an alternative to creating multiple variables, you can also work around this problem by simply checking if the listener already exists:

    If (! this.mc_cta.hasEventListener ("click")) {}

    This.mc_cta.on ("click", clickFunc);

    }

    Moreover, you don't need bind() when you use on(). It automatically binds the event handler to the local scope.

    EaselJS v0.8.2 API Documentation: EventDispatcher

  • Problems with save for web - Illustrator

    Had problems with the recording of the images for the web in Illustrator (I use AI CC 2015).  When I save it for the Web my preview image appears at the level of 50% and pixelated.  And the saved image is pixelated. Type is optimized.  When I try to export the file resolution of 72 dpi out of poor as well.  I try to save at a higher resolution and reducing the size and who doesn't either.  Any help would be appreciated.  Thank you

    Adobe has released a 19.0.1 fix that resolves this problem in discussion on this topic. Please apply the patch to your creative cloud application. The creative cloud application checks the update once a day, so you may see the update immediately.  If you want to force the check for an update at the beginning please logout and log back into the creative Cloud application.

    Link to 19.0.1 release notes: https://helpx.adobe.com/illustrator/kb/illustrator-cc-2015-crash-bug-fixes-19-0-1.html

  • Problem with save for Web in Action

    We do hundreds of images to our fine print main client. As part of the work, they want to the final image through save for Web registered as file a .jpg and .png to 1000 pixels wide.

    The problem is, if you try to create an action for this, the size of the action records is a percentage and not a width in pixels. It is therefore impossible (so it seems) to record an action that sets the scale as a sizing with a fixed output of 1000 pixels wide. Since images vary in size and he insists on registration of the size as a percentage, you can not create an action that will work.

    I tried to see if there is a way to change the action to change the output of a width in pixels, but didn't see how to do it. Is it still possible? We would save TONS of not having to manually open each image twice as much work and savings for each format.

    Yes, there is a bug with this script.

    The bug got into CS5 and was not attached to the CS6.

    You can download the fixed script here...

    http://www.PS-scripts.com/BB/viewtopic.php?f=10&t=3370

  • Problem with SaveAs function using random paths.

    The installation program:

    Part 1) I have a script to the folder level that allows me to exercise a SaveAs function within forms. I'm doing this as a way to save the document quietly in the background. The effect is that the file is replaced with a copy of itself. The script is:

    var mySaveAs = app.trustedFunction (function (oDoc, cPath, cFlName)

    {

    app.beginPriv ();

    cPath = cPath.replace(/([^\/])$ /, ' $1 / ');

    try {}

    oDoc.saveAs (cPath + cFlName);

    } catch (e) {}

    App.Alert ("error during save it");

    }

    app.endPriv ();

    });

    Part 2) of my documents, I have to check by calling the function below:

    function runSave()

    {if (typeof (mySaveAs) == 'function') {}

    var pathArray = this.path.split("/"); "

    var myFileName = pathArray [pathArray.length - 1];

    cPath var = this.path.slice(0,myFileName);

    mySaveAs (this, cPath, myFileName);

    } else {}

    App.Alert ("Missing Save Function\n" + "Please contact forms administrator");

    }

    }

    Part 3) I have several large forms that use automatic recording to call save work according to a time interval of 5 minutes, using:

    app.setInterval (runSave (), 300000);

    The problem:

    Part 1) automatic backup function works very well and it works silently in the background. However, I started having problems when I open two forms at the same time. If, for example, I have a form of an open folder and open a form from a second folder, the save feature will sometimes save the active document in its original folder (as expected, crashing and creating an automatic registration) or sometimes save to original folder of the second document. This leaves me a copy update (automatic check) of the document in the right folder, and a copy not updated in the original folder. This seems to vary on what document I opened finally or document that is currently active. Although I can't find the right combination.

    It's like thinking what is to confuse the "this.path.

    Part 2) worse, if two documents have the same name, as is often the case with these forms, any incorrect saving deposit causes a crash of the second document and data loss.

    Part 3) makes it maddening, as sometimes happens when no record or the second second document is open. Instead, damaging it saves the active document in a recently viewed folder. For example, I'm going to open a local folder and open a Word doc, close the file and the doc, go to another folder in a different root (a folder in network), open the form and automatically saves it on the local computer in the folder with the Word doc. So now not only do I have a copy not updated in my folder, I have no idea where the updated copy was actually saved to until I met some time later.

    Part 4) once again, worse still, the previously viewed folder could happen which contains a document with the same name, and that the document is crushed by the automatic backup. I have no idea that the form was crushed until I sometimes open a little later and see that it contains a completely different form data.

    What is happening and how it stop?

    Adobe Acrobat X Pro on a PC.

    The code for this tutorial is unfortunately wasn't working, I discovered recently.

    This is my own personal code for a trust saveAs method. Note that it takes 2 parameters, not 3.

    safeSaveAs = {app.trustPropagatorFunction (function (doc, vPath)}

    app.beginPriv ();

    doc.saveAs({cPath:vPath});)

    app.endPriv ();

    });

    myTrustedSaveAs = {app.trustedFunction (function (doc, vPath)}

    app.beginPriv ();

    safeSaveAs (doc, vPath);

    app.endPriv ();

    });

    You call it like this:

    myTrustedSaveAs (this, "/ c/temp/test.pdf");

  • Problems with saveAs form using Javascript

    I created a form using Acrobat X Pro. I have activated additional features so it will save.

    The form has a "Save form" button with the following code of Actions:

    var FileName = ' / H/docs / "+ this.getField("Last_Name").value +" "+ this.getField("First_Name").value +"2012.pdf Evaluation. "

    this.saveAs ({cPath: FileName, bPromptToOverwrite: true});

    The screen is located in a directory on a server (is not stored locally on the PC). The formula works very well, every time. If I click on save button, it allows to save the form with the new name in the path of the affected server. But if I open it from another PC on the network, nothing happens when I click on the save form"" button. But the reader allows me to record using file-> save as-> PDF on the menu?

    What I am doing wrong? Saves the form one way but not the other? Why Javascript does not work?

    Any help will be greatly appreciated.

    I'm surprised that you can get this code works in a button. It is not there because it featured a privileged context, as a function of confidence in a script to the folder level. Here is a tutorial that explains the details: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

  • Problems with low light action on 70 d calls

    I have just spent a T3i to a 70 d. I seem to have trouble with the plans of action in low light situations, suggestions on implementing...

    Nelly wrote:

    cicopo wrote:

    You might find some ideas here.

    A better idea would be for the OP to give us an idea of what is meant by 'disorder '. Without knowing what the real problem, make suggestions are going to be a waste of time.

    More information would be useful.  But I bet confidently on the sentence "my photos are blurry" my silver or black.

  • Problem with skin retouching Actions in CS6

    Hello all and sorry for my bad English. I need help if possible: I bought and downloaded skin retouching Actions but I can not install in Photoshop with the Extensions Manager. I ask if there is a way to install it manually? Or in another way... Thanks in advance for the help!

    I sent you a PM with some contact info on get this resolved. Essentially if others have this problem, they should contact the producer of the product by going to the page that they bought the product and click on the name of the producer. They should also contact Jonathan Ferman who works for Adobe and works out the bugs of the Addons site. Jonathan needs to know these issues so that he can work to correct.

  • ADF TUTORIAL: PROBLEMS WITH "export Collection Action Listener.

    Hi all

    environment:
    Windows xp
    jedev 11.1.1.3.0
    Firefox 3.6.13

    Tutorial: develop Ajax with JSF-based User Interfaces: An Introduction to ADF Faces Rich Client components
    URL: http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm

    mainstep: "work with menus.
    step: number 5 "add a listener for collection action.

    until the step "work with menus" everthing works fine. After that I added the earpiece of the collection action and saved my work, the webapplication does not open. I only see a blank page and no error message.
    When I delete the action listener works just fine again.

    How can I solve this problem? Thank you to everyone.

    Best regards
    Gunnar

    You can paste the code of the page where you added the listener to action?
    Make sure it is added within the menu option.

  • Problem with brush + fill (gap) in 7 & cs4 (photo attached)

    So sometimes starting yesterday every time I draw with the brush (STROKE a path), then fill with the paint COP there is always a gap between the filling and the brush. What happens in 7 and cs4. See attached image I tried Googling this problem, but (brush, gap, fill) search terms are too generic.  I reset all the settings of photoshop and brushes in 7 and cs4.  I'm lost, any help is appreciated.

    in this screenshot you can see the gap between the brush and the filling, but there is no difference with a marquee of filling.

    brushproblem.jpg

    The problem is caused by the semi-transparent pixels created by either antialiasing inherent in almost all brushes or the fringes caused by hardness slider. If you are painting on a layer without transparent pixels square you get this problem if the paint bucket tolerance is pretty high.

  • problem with save in excel

    Hello

    I am get problem when I'm put two value in excel

    When I put the writing as filt.vi loop these unnecessary time data also came into it.

    and while I am putting filt.vi of measure outside the loop this time, only the last data record

    I want to save two data in the column two

    Yes help pleaze


  • Problem with "Save as".

    I kept a picture using "save under" then I hit something to cause the dialog box "save under" change.  When I now use "save under" everything that appears is the "file name" and the "Save as type".  Before, the dialog box contained lists of favorites, libraries, etc. on the left side of your choice.  (I'm sure there are more technical ways to say things, but I'm not a savvy computer person.)

    I actually tried too well... didn't work.  We finally solve the problem by restoring my computer on the eve of the dialog box has disappeared.

Maybe you are looking for

  • Protection of personal information

    at the first time, using my old phone Samsung Galaxy Verizon SCH-S3 - I535 Skype worked perfectly, but then change my phone for Skype Samsung Galaxy S4 T-Mobile SGH-M919 has now finished with a question. during any kind of calls even call the sound T

  • Tornado of Washington area, Illinois erased all the info to the computer's printer

    Washington Illinois Tornado caused computer crash, wipe all the drivers on my computer.  Now, try to reinstall but am running out of problems with the hp site that requires the purchase of the pilot program to do.  Have given everything I can to my n

  • Microsoft Sidewinder Mouse

    Hello Microsoft, I had a question about the pre-programmed buttons which came with my Sidewinder mouse, is possible to modify in order to link them to other keys in games? As the world of warcraft. Cause, that would be nice if these DPI 3 buttons and

  • Message from WOUTempAdmin

    When I boot I'm unable to log in I get a message stating that my user name or password are incorrect.  I can then put the user / newspaper once guest account where I can then pass user and he then accept my user name and password. Similarly, when I c

  • SONY BRAVIA 50 "no signal message for find analog channels

    I bougth a BRAVIA 50 "and everything has worked perfectly, but suddenly the TV sent no signal message can not find the signal of channel or something like that. I bougth TV on December 2012 and this 4 last January that happened. What?, because I coul