Question about error 1242 (file/folder expected)

I have the following code:

var myAmount = prompt ("how?");

var = myDir "/photoshop_js_test/ f / [authority];

myname = "testJPEG"; var

var mySuffix = ".jpg";

var myFile;

for (var i = myAmount; I > 0; i--) {}

myFile = myDir + MyName + i + mySuffix;

var myJPEG = new JPEGSaveOptions();

myJPEG.quality = 5;

myJPEG.formatOptions = FormatOptions.STANDARDBASELINE;

activeDocument.saveAs (myJPEG, myFile, false);

activeDocument.close ();

var j = i-1;

var myNewFile = mySuffix; + j + MyName, myDir

open (myNewFile);

}

But the interpreter gets stuck on this line:

activeDocument.saveAs (myJPEG, myFile, false);

and gives me error 1242 - improper argument... File/folder provided.

I'm puzzled.  I don't know many Javascript and learn another (ActionScript) ECMA script, but I tried to create a code for someone who has posted in the forum of Photoshop.  I suggested Javascript it and am now trying to emulate the problem on what he posted.

(the [authority] is a path on my computer that I put comment with supports to protect my file system.)

Any help is greatly appreciated.

Sincerely,

-markerline

You can try this...

myDir var = '/photoshop_js_test/ Inv. [authority];

Note the slash before the drive.

You can also do a check if the file exists;

{if (!) MyFile.Exists)}

Alert ("file does not exist");

return;

}

Tags: Photoshop

Similar Questions

  • General questions about errors in eventvwr

    Greetings.

    I have a general question about some failed modules are stored in the Windows Event Viewer.

    An error leading to the crashes some applications that I've seen several times now when supporting computer problems is something like this:
    (Windows error reporting) Fault bucket, Type 0, name of the event: PCA2, (...) P1: application.exe, (...)

    I wonder what this 'PCA2. Which is a kind of module Windows handles tasks such as allocating memory or smth. Like this? What could be the cause of these errors (physical memory problems / corrupt swap file / insufficient rights?)

    Same Question for the application falls down because of "kernelbase.dll" as in:
    (Application error) Failing application: application.exe, Version: 0.0.0.0, (...) Failed module: KERNELBASE.dll, Version: 6.1.7601.18015, (...) Path of the failing module: C:\Windows\syswow64\KERNELBASE.dll (...)

    What is the .dll file and what could possibly cause kernelbase.dll Fault?

    The application can be a bit buggy, but I wonder what could possibly cause these accidents and if there is a way to fix these problems - or what dev did wrong.

    The two errors occur mainly on x 64 systems - especially Windows 7/vista

    Kind regards

    With application errors, the application is called everything first and the module he collaborated with is named second. Normally you should try to reinstall the application if you see not to repeat the mistakes. If this does not work, you go to the forum on the application to see if other users see the same error. There may be a bug in the application.

    The observer of the Application event log contains Information reports (event ID: 1001) for errors where the details were sent to Microsoft for review. You will find that there are corresponding to the event ID: 1000 reports errors, either in the system or Application logs. These reports are also included in the center of the Action. Center type action in the area of research above the Start button and press ENTER. Click on the arrow pointing downwards to the right of Maintenance, and then click view reliability history. The errors reported are the Red orbs with a white cross. You can search for solutions to problems, but occasionally you get a significant response from Microsoft.

    I can't tell you what it means PCA2. Google did not find a significant result. The reports themselves are not unintelligible, although I have never tried to understand the meaning of a particular report. I have extracted what, in my view, is a starting point of two reports:
    Event name: PCA2 = P1: motherboard_utility_onoffchargesetup.exe P2: 4.65.0.0

    Event name: PCA2 = P1: setup.exe P2: 11.0.0.28844

    You have the app in the boredom and the version of the file. These details have been extracted a file of information system to a computer with a card mother Gigabyte. So, you see I have a starting point, if I wanted to determine the cause of a failure.

    I will say before you go dive deep into each event ID: 1001 report that many are not easy to even begin to understand. However, they can provide useful clues.

    KERNELBASE.dll is likely to be the module with which the application works. You need to focus on the application.  KERNELBASE is probably preceded by P3 or P4 in the report?

    General remarks on the event viewer:
    http://www.gerryscomputertips.co.UK/syserrors5.htm

  • Save the questions: message error "the file may be read-only.

    I do a lot of scanning to PDF and will often add a page newly digitized to an existing pdf archived and then resave it.

    I have a very consistent workflow and use both screens. The folders that contain the files are still on my second monitor while I work on the main screen.

    After that I inserted the page newly digitized in the existing pdf very often I get an error Impossible to save the file:

    The file may be read-only or another user can open. Please save the document under a different name or in a different folder.

    I'm the only user, none of the files are read-only, and I am sure that the file I'm re-record is not enabled (I see that on my second screen).

    Sometimes, if I click on the second screen to another folder, he'll let re-register me, but other times I have to close the Windows Explorer completely.

    I would avoid renaming of files: it is important to keep the name of the original file.

    This seems to happen a lot more with Acrobat X Pro version 9. It's very embarrassing.

    No known workaround solution?

    DG

    The folders that contain the files are still on my second screen

    In the case of Windows (a Mac user will have to talk about this for the environment).

    If Windows Explorer is "focused" on the file (for example, the file selected) or has the "focus" on the parent or the files folder/directory you get the alert dialog box.

    Close Windows Explorer or place its development d.

    In addition, if the preview feature is used for files in a folder (or in a nested subfolder files) you will experience similar "speed humps" in the path of the workflow.

    Was not always in this way, but the OS updates (XP, Vista, etc.) seem to have given us some clever new options which, by coincidence, there are some pitfalls.

    Be well...

  • Question about errors stored in our trace files

    DB version: 12.1.0.2.5 Linux

    I'm looking for trace files for one of our production database and I see entries that are similar to the following:

    kjgcr_StatCheckLCP: getweinfo returned error, kjzsret = 0 x 0

    I Googled, searched this forum and the research in the MOD and I can't find what it means.

    Does anyone have an idea of what they show?

    Thank you

    Thomas

    Thomas Morgan wrote:

    DB version: 12.1.0.2.5 Linux

    I'm looking for trace files for one of our production database and I see entries that are similar to the following:

    kjgcr_StatCheckLCP: getweinfo returned error, kjzsret = 0 x 0

    I Googled, searched this forum and the research in the MOD and I can't find what it means.

    Does anyone have an idea of what they show?

    Thank you

    Thomas

    submit the Service request to MOS

  • Question about playlists and file nav

    Research in get a rocket, or a variant of the Sansa, b/c I get lazy with the long method involved in duty sync w/iPod songs and their playlists, even with the Zune.

    I have read the manual for the rocket, and it seems that I can just drag and drop the files on the drive. My question is can I make records, as driving music, trance, etc. And then put different songs in every folder and then be able to go into that folder and shuffle the songs in that folder?

    Second issue (assuming that my answer is not), is on the creation of playlist. Looks like I have to do inside WMP playlists and then sync it to the top? Is there another way? I read an old thread on the use of other software to generate the playlist, but my playlist would be basically all the songs in a particular folder (the one I'm talking to the 2nd paragraph).

    Thank you for any input!

    eli2k wrote:

    I have read the manual for the rocket, and it seems that I can just drag and drop the files on the drive. My question is can I make records, as driving music, trance, etc. And then put different songs in every folder and then be able to go into that folder and shuffle the songs in that folder?

    Yes, with the most recent firmware, you can browse and read in folder.

  • 2 questions about short mp3 files playback

    I am installing a Snd simple class to encapsulate the sound effects, I can do this:

    SND sound = new Snd ();

    sound.throwSwitch ();   Plays a switch short audio mp3

    So, after reviewing the RIM and other examples of Iam work try this:

    import java.io.InputStream;
    Javax.microedition.media import. *;

    public class {Snd
       
    Private player player;
       
    Find the supported content types
    public static final String types [] = Manager.getSupportedContentTypes (null);

    public void throwSwitch() {}
    Makes a click
    for (cnt int = types.length - 1; cnt > = 0; cnt-) {}
    If (types [cnt].equals("audio/mpeg")) {}
    try {}
    Get the MP3 file
    Class clazz = Class.forName ("net.berrysoft.dib.sound");
    InputStream is = clazz.getResourceAsStream ("switch.mp3");
    InputStream is = getClass () .getResourceAsStream ("switch.mp3");
                       
    Create an instance of the reader of the InputStream
    Reader = javax.microedition.media.Manager.createPlayer (, "audio/mpeg" "");
    Player.Realize ();
    Player.prefetch ();
    Player.Start ();            Start the player
    Manager.playTone (0 x 45, 2000, 100);
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }
    } / / end: for
    }
       
    }

    but I don't get all the sounds.  I checked that the mp3 format is supported and loaded the sound of my press card and he played like a ring tone without problem.

    What could I do it wrong?

    Second question is that in the past (other languages), I had two ways to play a sound... one as a "one-shot" meaning not listened and streaming (used for sounds at large to hold entirely in memory).  In Java there is this distinction?  It seems that the above code transmissions my sound, but she is so short, she could be held entirely in memory.  It is played only once (at the start), but I wonder given it's such an effect short if there is a better way.

    Patrick

    Here is an example that works. In the example, the generated COD file is com_foo_Foobar, Foobar is the root for the COD file directory and Foobar.java is the main application class. The MP3 is at the root of the directory "/" the COD file. Notice the "Class.forName" call and how not intuitive that the root is specified in the parameter of this string. It took me quite a few tries until I thought about it.

        public void play()
        {
            if (m_player != null){
                stop();
            }
    
            try {
                Class cl = Class.forName("com.foo.Foobar.Foobar");
                InputStream input = cl.getResourceAsStream("/foonoise.mp3");
                m_player = Manager.createPlayer(input,"audio/mpeg");
                m_player.realize();
                m_volumeControl = getVolumeControl(m_player);
                if (m_volumeControl != null)
                    m_volumeControl.setLevel(m_volume);
                m_player.prefetch();
                m_player.start();
            }
            catch (Exception e){
                System.out.println("ERR: " + e.toString());
            }
        }
    
  • Urgent question about loading image file to boot to a concentrator VPN 3030

    Hi Netpros,

    I really hope someone can help me with this URGENT matter. I have an upgrade in 12 hours. By reading the Cisco documentation, I also need to upgrade the boot image file. Here's my question... the cisco image file name is vpn30xxboot - 4.0.Rel.hex but the VPN concentrator would accept 8.3 file names i.e. BOOT file format. TXT... so the question is is it OK to just keep the same hexagonal extension without causing damage to the file... That is, name the file BOOT - 4.hex... your comments are very much appreciated...

    Fernando,

    Take it out '-' usage just and naming BOOT40.hex

    What type of hub? If it's a 3005, you wouldn't need an upgrade of startup code.

    There is enough of an upgrade of startup code if memory is upgraded from 256 to 512 MB - just an info.

    Good luck in your upgrade.

    See you soon

    Gilbert

  • OCP: Question about the critical files on control and collision

    Hello

    I am currently a student at OCP certification exam 1z0-053.

    To do this, I bought the all-in-one fixed Oracle Press (http://www.mcgrawhill.ca/professional/products/9780071629188/)

    During his studies, I would like to test, to prove things and simulate the operation to get more familiar as possible with important concepts.

    The study guide covers the fact that when a critical file is damaged or lost, the proceedings will end. The critical files listed are: all copies of the controlfile, a data file that belongs to the SYSTEM table, a data file which is part of the current tablespace undo.

    As said here's the quote:

    Some of the files are important. Damage to a critical file means that the database instance will end if it is open and cannot be reopened until the damage is repaired.

    [...]

    Practically the moment where that the damage occurs, the instance will end. As always, first reaction of the DBA to an instance crashed should be to attempt a start. It will fail in NOMOUNT mode, with an error message appropriate. The alert log will show what controlfile copy is missing and also - in the section list of parameters to initialize default - controlfile how many copies there are actually is and where they are.

    A self-test at the end of the chapter, it is:

    1. loss of these files will cause a database open failed? (Choose all good answers.)

    A. a controlfile multiplex

    B. A multiplexed log file online

    C. a multiplexed log file archive

    D. an undo tablespace datafile asset

    E. a tablespace temporary assets tempfile

    F. Since the SYSAUX tablespace data file

    G. a file of data space of SYSTEM tables

    H. a data file containing the user's critical data

    [...]

    Answer:

    1. A, D and G. damage to any copy controlfile put an end to the proceedings, as damage to critical tablespaces: SYSTEM and break current tablespace.

    So, under the 11.2.0.3 when I delete or corrupt a control file copy, the instance is not crashing and the database continue to work. Alerts log is only regularly notifynig controlfile missing:

    Fri Aug 30 10:16:02 2013

    Errors in the /u01/app/oracle/diag/rdbms/ocp1/ocp1/trace/ocp1_m000_26767.trc file:

    ORA-00210: could not open the specified control file

    ORA-00202: control file: ' / u01/app/oracle/oradata/ocp1/control03.ctl'

    ORA-27041: could not open the file

    Linux-x86_64 error: 2: no such file or directory

    Additional information: 3

    I'm not really knowledge.

    I have to stick to what is said in the book or the experienced facts?

    Thank you

    Bruno

    The information contained in the Guide of the exam are not correct as written.  The Oracle instance would end on the loss of a single control file.  Oracle documentation on the management of the control files is here:

    Management of control files

    It says: "If a control file is damaged due to a disk failure, the associated instance should be stopped. Once the drive is repaired, damaged control file can be restored using the intact copy of the control of the other disk file and the instance can be restarted. »

    "Stop" means that the instance has become unstable.  Unstable case act differently depending on the situation this way, the book is not (cannot) document the specific behavior that may occur.  While the loss of a control file means that the DBA should be abandoned to the instance, it is a very different thing from the instance to the destination of its own.

    The ultimate source is always the Oracle documentation. I checked the page of errata for this book to McGraw-Hill.  I only see an extra.  Submit this to them and get your name on the page as a contributor.

  • Small Question about the Framework Services folder

    OK so I set it up and learn how to use CRMI to speak at the University Complutense of MADRID, I don't really need help in this regard.  My question is I am to read the documentation of records Services and read "FLD_CREATE_FOLDER" and has been in deficit.  A how can I find the GUID for the parent folder, and secondly I don't see a way to add the name of the new folder.  I'm a bit lost with this one hoping somone can point me in the right direction.

    Hello

    To obtain the GUID for the parent folder, you can use either the service FLD_INFO with IsJava = 1 parameter or executing the query on table FolderMetaDefaults.

    1. service a part:

    From the browser, use the following function call:

    http://ucmhostname:port/cs/idcplg? IdcService = FLD_INFO & path = / Folder1

    Here the path refers to the hierarchical structure for the real one whereby we create a new.

    For example: If Folder1 is created under the root, and unless we create a new subfolder then path = / Folder1

    If under Folder1, we subFolder1 then path = / Folder1/subFolder1.

    Than under ResultSet "FolderInfo" look for fFolderGUID and use it as the value for fParentGUID

    Sample code: https://forums.oracle.com/thread/2554885

    The code would be like this:

    dataBinder.putLocal ("IdcService", "FLD_CREATE_FOLDER");

    dataBinder.putLocal ("fParentGUID", "FLD_ROOT");

    dataBinder.putLocal ("fFolderName", "RIDCFF1");

    Example above creates a new folder under the root itself.

    I hope this helps.

    Thank you

    Srinath

  • Question about the password file

    Good afternoon

    In document s/n 2 days, she says:

    >
    When you call DBCA as part of the installation procedure for Oracle, DBCA database
    create a password with a single input file: the user SYS.
    >

    I created the database using DBCA and it must have created a file password for me since I was able to connect to the database remotely.

    The question is: I can't locate the created password THAT DBCA, I don't know what his name. Can someone give me the name of THAT DBCA is using the password file?

    Thanks a lot for help.

    John.

    ORACLE_HOME/dbs/orapw * IX and ORACLE_HOME/database / PWD.ora under windows

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • Satellite Pro L10: Question about saving the files on a CD

    Please can someone tell me how I can save a typed document (produced in Word or similar) on the CD? I don't have a floppy drive on my satellite pro L10 portable. Have 'saved' music using the immediate recording before, but now need to record your actual work on the hard disk for transport to a pc with access to a printer.

    When I tried it told me incorrect function, contact administrator (that's me!) I tried CD - R and CD - RW discs and neither would not let me save the file on it. would be grateful for any advice regarding this.

    Thank you

    Hi Roy,

    First of all, you will ned to ensure that you have enabled logging on oprical drive you. For this a right-click on the CD-ROM in my computer icon and then selecting "properties-> recording. Make sure that "Enable CD writing on this drive" is checked.

    Once you have done the above, you can simply drag the documents that you want to copy on the CD-ROM icon in my computer.

    Note that the burning process does not happen immediately. Windows caches the files to be placed on your hard drive first and then you can burn all documents cached only once.

    Alternatively, you may find that some third-party software has been bundled with your portable computer, which performs a similar function the standard Windows CD burn software.

    Kind regards

  • Question about a music file

    I have an audio file of 5 seconds which plays fine in Windows Media Player or QT. It's actually a file audio .wav. When it comes to an end after 5 seconds, and then it restarts as if he's stuck in a kind of 'loop' and it goes on ad infinitum.

    How to play only once, please? Do I need a sound/audio editor to edit the file?

    Thank you.

    Hi, Bluenose_ted,

    Have you created the file to embed in a web page?

    See the following article: how to create clips WAV (shows edition)

    http://www.ehow.com/how_5957935_create-WAV-clips.html

    See the code used for 'loop' (instant replay)

    http://www.boogiejack.com/add_sound.html

    Editors: Audacity, WavePad or Source Forge

  • Question about the .vmx file created on ESXi

    I'm trying to automate the creation of a virtual machine and take a snapshot. I use the vSphere SDK Perl.

    The problem I faced is if I create a virtual machine called TestVM, the .vmx file created on the ESXi is TestVM_1.vmx instead of TestVM.vmx due to which my snapshot creation fails.

    I faced the same problem, if I manually create the virtual computer. If there is no other computer virtual with the same name.

    A restart of the server ESXi fixed the problem.

  • Question about backup WRSP file

    Hello

    Work environment
    Consumption: WLP10.3
    Producer: websphere 6.0

    I have a file of storage attached to the remote portlets. I use the backup file to use a value (say x) of my property set and send it to my producer to display the content of y on the remote portlets.
    Everything works fine.

    But the producer is upgraded to websphere 7.0, so I had to register my producer through my PAT. But what is happening in the backup file? Currently remote portlets do not work I do not all exceptions.

    am I missing something? Help, please.

    Thank you.

    Hello

    The problem is that there is no way to attach a file to backup to a proxy portlet (representation on the side of the remote portlet consumer) through the PAT.

    If you use the IDE to record producer, to import the portlets and attach backup files, everything should work from there.

    Kevin

  • question about old ARC files in an Oracle 10 g database

    Hello

    We have Oracle Database 10 g, the database is in archivelog mode and we're cold backup of the database. We would like to know, if we must restore and recovery of the database if we have a problem, we would have to do so from the last ARc file or we must apply all ARC files, we see on the EIS from v$ archived_log?

    Kind regards
    Beatriz.

    We must apply all ARC files, we see on the EIS from v$ archived_log?

    N ° the recovery will require the ARC from the point of leaving, the backup files. V$ archived_log contains a "history" of the older archivelogs thus list.

    So, if you have daily backups and v$ archived_log shows the entries for 7 days
    If you restore the cold SUNDAY backup you ArchiveLogs on Sunday from
    If you restore the cold WEDNESDAY backup you frome ArchiveLogs Wednesday, even though the controlfile in Wednesday backup lists the previous 7 days (starting on Thursday!) ArchiveLogs in v$ archived_log.

Maybe you are looking for