Dialog works in script but the impossible code to hard path

I am writing a script to read the xml document and convert it to the pdf format.

When I try to get the path by opening the dialog box. He works...

var xmlFile = File.openDialog ("Select Document XML File");

If (xmlFile == null: xmlFile.name.length < 4)

{

Alert ("invalid file");

return;

}

This code above works

But when I try:

xmlFile var = ' / c/xyz/abc.xml';

Alert (xmlFile);

If (xmlFile == null: xmlFile.name.length < 4)

{

Alert ("invalid file");

return;

}

It pops up an error

It says error:

Error number: 21

Error string: undefined is not an object

Line 105:

Source: if (xmlFile == null: xmlFile.name.length < 4)

Can someone help me with this. ?

Hello Mohit,

Put "File" before "/ c/xyz/abc.xml";

var xmlFile = leader (' / c/xyz/abc.xml' ();

Alert (xmlFile);
If (xmlFile == null: xmlFile.name.length)<>
{
Alert ("invalid file");
Exit();
}

Tags: InDesign

Similar Questions

  • Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database. can you please explain, where the value in frontend comes? It differs from the flow_status_code in oe_or

    Sales order form, line status code is displayed as "WITHDRAWN". but the same code appears as "AWAITING_SHIPPING" for the same line in the database.

    Where the value in the frontend is filling?

    It differs from the flow_status_code in oe_order_lines_all?

    Thanks for the correction.

    He slipped right out of my mind!

    Here is a detailed explanation of this case:

    Status of orders picked and picked partial

    Kind regards

    Bashar

  • Work of fine WebLogic Server machine url same p6 eppm primavera also works in server but the client lan both URLs machine works not

    Work of fine WebLogic Server machine url same p6 eppm primavera also works in server but the client lan both URLs machine works not

    When I install weblogic and eppm works in client machine only 10 minutes after does not always work in Server

    Thanks for the reply,

    I solved that

    Eppm proxy server is enabled, so I remove the proxy in internet option, it works very well in all the URLs of web client machine p6

  • I installed windows 7 but the activation code has stopped working.

    I installed windows 7 on 3 laptops but the product key will not work on the third, what should I do?

    If the Windows 7 Home Premium Family Pack upgrade, try the phone activation;

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

    If it's a single license, then you will need to purchase additional licenses.

    the key that can be used with 32-bit or 64-bit Windows 7 is designed to drive 1. You cannot use install both. 1 license, 1 installation, so choose wisely. If you want to install Windows 7 32 or 64 bit on another partition or another computer, you must purchase an additional license.

    .    INSTALLATION AND USE RIGHTS.

    a. one copy per computer. You can install one copy of the software on a single computer. This computer is "licensed computer.

    b. a computer license. You can use the software on up to two processors of the computer under license at some point. Except as provided in these license terms, you cannot use the software on any other computer.

    c. number of users. Except as provided in these license terms, only one user may use the software at a time.

    d. other Versions. The software may include several versions, such as 32-bit and 64-bit. You may install and use only one version at a time.

  • How can I move script of the Analytics (code) to the bottom of the page?

    I use Google Analytics and Statcounter to track usage of the Web site. I also follow the downloads of document (PDF, Word, etc.).

    I can place the Analytics scripts in the head of HTML using the properties of the page or the page properties master, but saw the script in the head of the document may prevent the script in Statcounter tracking script downloads.the must be at the bottom of the HTML at the end < / body > tag.

    Any suggestion is appreciated.

    C

    Try to place the script in the box to insert HTML in the menu object and place it at the bottom of the page.

    Make sure the inside of the script tags

  • Impossible to get a javasript alert work in FF, but the same alert works in Internet Explorer, Chrome, Opera.

    Just trying to get the alert message below to display in FF, but it won't. It works in other browsers. I checked the settngs in Options/content and Javascript is on. This may be obvious, but I don't see anything.

    Alert ("example message!");

    Try your attribute of type "text/javascript". Firefox is not running jscript.

  • C769US, recovery boot, loads and works very well, but the next new start begins recovery... again and again

    Well, the good enough subject line says it all.  Run you the recovery and everything works well. Can save a document or download the updates.  But when you stop and start (or restart after windows updates) nothing has been saved... it goes right back into recovery mode.

    When I look in disk management in Windows Vists it tells me the drive the healthy and functioning properly.  However, when I run diagnostics in the BIOS it tells me that there is a hard disk with error code 10008 failure.  So what should I assume that the drive is dead? Said recovery reformats it, but like I said, do remember not or record programs or DATA.

    I have recovery DVD and I downloaded the service manual and feel that I can replace the drive myself.  But I'm not sure I buy the right disc to install.  I read on this site that others have bought Western Digital, so if you think all that I need a new disc could someone tell me if this drive will work?

    Western Digital - Scorpio Blue 250 GB internal SATA hard drive for laptops

    WD hard drive you linked to should work fine in your laptop, just myself to order in the size of 320 GB.

  • Satellite A10-S403D: NO start UP but the LED code flashes (flash)

    Hello

    I want to understand what is happening to my Satellite.

    When I try to start it, it does absolutely nothing but orange flashing:
    Short-Long, short-short-Long, short, Long, Long

    How can I understand the meaning of the code please? :-(

    Thank you very much for your help!
    Bye bye!

    Hello

    It is a firmware simply displayed if no hardware problem have been located on the motherboard.
    The LED provides this firmware and only the technician can read this code.
    OK, you will probably be able to read this code, but you will find all the details on the meaning of the code.

    I found a useful description how to read such a code.
    Please check this thread:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=16497&MessageID=60354

  • His works on laptop but the headphones don't

    Hello

    I spent the last few hours LURKING through forums to try to solve this problem, but I have not thought about it then it is my last chance before I lift my hands upwards!  I have a laptop hp Compaq nc6220 I bought a refurbed just a week ago (but don't think to test this before the purchase feature, doh!)  in any case, it runs Windows XP Professional.
    Sound works when I watch a video on YouTube or other.  But when I plug my headphones, the sound continues to come out the speakers for computer rather than the helmet itself.  I tried several sets of headphones and the problem persists.  I downloaded the latest SoundMAX driver and this does not solve the problem.
    I went on the Panel and select sounds and Audio Devices option.  After having clicked on the Audio tab, there is a section that explains its default player.  I have SoundMax Digital Audio selected in the menu drop-down (the only other choice is wireless Bluetooth, which I don't know).  When I click on the Advanced button in this section, there is an option to select your speaker configuration, and I have "Stereo headphones" selected in the list.
    I'M out of IDEAS: P in any case, if someone has a suggestion to throw out there, I'd be most grateful.  It is not the end of the world or anything either, but I stay in a hostel right now so I'm almost never alone and can really use the headphone option to do not disturb my classmates-hostel.  Thank you!

    Hello

    In Windows XP, if you plug in headphones then the default audio device should get replaced by the helmet and you will be able to hear the sound from headphones not computer speakers.

    Even after connecting the headset, if you receive the sound from the speaker to the computer, then it might be the problem with the headphone jack.

    I suggest you to check with hardware support for laptop computer for more information.

  • WAP54G works by default but the installation program can't find it...

    I just had to reset my WAP54G (v2).  With all the default settings, it works very well to connect to my hub and internet access.  I need to connect to configure and update the bios but.  Setup does not work on my network.  I turned off antivirus, firewalls, etc.  No change.  Are there other options to find and configure?

    Thanks in advance,

    Dave

    OK... I found the answer.  I connected a laptop computer.  I put the laptop IP 192.168.1.10 (static) and the gateway to 192.168.1.1 and then connected to my factory WAP54G (192.168.1.245).  Configure a new ip address static (192.168.0.245) and power cycling box.  I have connected to my network, and then was able to connect to its new IP address.  The installer is still, but that's fine.  I know what I have to do now!

    Thank you!

  • Created a Java Script but the need in Spanish

    In Adobe Standard X, I created the following Script for a dynamic buffer

    Event.Value = util.printd (a-mmm-yyyy ", new Date()");

    That would show

    January 5, 2015

    How to say the same thing but in Spanish. I want to display

    5 January-2015

    Windows 7 x 64

    Remove the options to Format selected for this field.

  • The file converted for my site has errors in its design mode when you preview. I can't do these items appear in the correct position when you preview? And everything worked perfectly yesterday but the file converted don't? Answers to tha

    My site was working yesterday in the 2014 muse but once converted 20141 a couple of points, the same ones-on all pages are on-site during preview. I tried a number of things to fix this but can't seem to solve the problem?  All responses to this topic?

    Please send the file to [email protected] and indicate the specific elements that exhibit this behavior. A screenshot highlighting the elements on the page may be useful for the diagnosis more far.

  • my main wireless hp programe not working do not receive the error code 0 x 80070002

    my main wireless hp program does not keep receiving error code 0 x can 80070002 someone piz

    Your message is in the forum for people needing help with the anti-malware program from Microsoft Security Essentials (MSE).

    You ask for help in Forum Windows: http://answers.microsoft.com/en-us or contact HP Support at http://h10025.www1.hp.com/ewfrf/wc/siteHome?cc=us&lc=en

  • his works on anything but the latest version of flashplayer

    RealPlayer sound works, games, sound works etc. on everything. I updated flashplayer, now sound does not work when you download videos

    Hello

    Follow these steps and check if they help.

    a. Uninstall Flash player completely, then reinstall it. Use this procedure

    Download uninstaller for Flash player from http://www.adobe.com/go/tn_14157_fr (save to disk)

    b. download the ActiveX Installer http://fpdownload.macromedia.com/get/flashplayer/current/install_flash _player_ax.exe offline (save to disk)

    c. close all the browser windows, and then run the uninstall program, followed by the installer

    You can check if the installation was successful at http://www.adobe.com/software/flash/about/

  • On ASA 5510 VPN works do not but the work stations

    We have an ASA 8.2 (3) running and have two VPN site to site running on it.  The second VPN we just establish the other day, and of the SAA itself, it seems to work.  We are able to ping remote hosts from the ASA without problem.  However, on this second VPN all hosts on our local network cannot reach the remote party...  Trying to understand what could happen.  Applicable config below (please forgive the mistakes and formatting):

    interface Ethernet0/0

    nameif outside

    security-level 0

    address IP WAN. IP. ADDR 255.255.255.224

    !

    interface Ethernet0/1

    nameif inside

    security-level 100

    IP 192.168.21.1 255.255.255.0

    !

    interface Ethernet0/2

    Shutdown

    nameif intf2

    security-level 0

    no ip address

    !

    interface Ethernet0/3

    Shutdown

    No nameif

    no level of security

    no ip address

    !

    interface Management0/0

    Shutdown

    nameif management

    security-level 100

    no ip address

    management only

    !

    access extensive list ip 192.168.21.0 outside_cryptomap allow 255.255.255.0 10.50.50.0 255.255.255.0

    Access-group acl_out in interface outside

    Crypto ipsec transform-set esp-3des esp-sha-hmac ATLAS-TS

    life crypto ipsec security association seconds 28800

    card crypto mymap 2 match address outside_cryptomap

    card crypto mymap 2 together peer PEER. WAN. IP. DEA

    card crypto mymap 2 game of transformation-ATLAS-TS

    map mymap 65535-isakmp ipsec crypto dynamic dynmap

    mymap outside crypto map interface

    crypto isakmp identity address

    crypto ISAKMP allow outside

    crypto ISAKMP policy 5

    preshared authentication

    3des encryption

    sha hash

    Group 2

    ISAKMP crypto 10 nat-traversal

    tunnel-group of PEERS. WAN. IP. ADDR type ipsec-l2l

    tunnel-group of PEERS. WAN. IP. ADDR ipsec-attributes

    pre-shared key *.

    Hello

    Seems to me that his dynamic State PAT shot meant for Internet traffic

    Phase: 6

    Type: NAT

    Subtype:

    Result: ALLOW

    Config:

    NAT (inside) 1 0.0.0.0 0.0.0.0

    is the intellectual property inside everything outside of any

    dynamic translation of hen 1 (WAN. IP. ADDR.162 [Interface PAT])

    translate_hits = 6186208, untranslate_hits = 145616

    Additional information:

    Translation dynamic 192.168.21.100/0 to WAN. IP. ADDR.162/12936 using subnet mask 255.255.255.255

    So you might miss the NAT0 configuration for this connection

    Do the following

    Issue the command "Display running nat" and you should see a NAT0 configuration for the 'inside' interface. Something like that

    NAT (inside) - 0 access list

    Next, you will need to check the ACL configuration

    See the list of access running

    You can add local and remote network that need to communicate through that VPN L2L connection to this ACL

    So for examples sake lets assume that your ASAs directly related "inside" subnet needs to access the remote network, and then you would add

    ip 192.168.21.0 access list allow 255.255.255.0 10.50.50.0 255.255.255.0

    So use the above configuration format with good source and network of destination, as well as the correct name of the ACL and add the required ACL lines and then try to host LAN connections.

    Hope this helps

    Remember to mark a reply as the answer if it answered your question.

    Feel free to ask more if necessary

    -Jouni

Maybe you are looking for