Lost in translation (for JS)
Hi all
I wrote an applescript script, but I need to convert it to JavaScript to ensure compatibility with a 3rd party pugin.
I'm having a bit of badly translated the following section of code from as to JS.
Tell application "Adobe InDesign CS5"
Set DocumentLinks to the path of file of all links in the active document
tell the end
So far, I have the following js:
var documentLinks = [];
myDocument var = app.documents.item (0);
for (var myCounter = 0; myCounter < myDocument.allGraphics.length; myCounter ++) {}
var myGraphic = myDocument.allGraphics [myCounter];
myLink var = myGraphic.itemLink;
var myPath = myLink.filePath;
var documentLinksCount = documentLinks.push (myPath);
}
When I try to run it with a specific indesign document, I get the error 'null is not an object' and the ' var myPath = myLink.filePath; ' line is highlighted.
I think that this error occurs because as "myDocument.allGraphics.length;" has a value of 19 with this document, but when I look at the links manually palette in indesign, I see only 18 links.
so somehow, I have a picture on the page that has one track zero which is causing my script for the error.
can someone tell me the best approach to work around this problem?
Thank you!
Sorry, my code there was an error:
var documentLinks = app.activeDocument.links.everyItem().filePath;
Substances
Tags: InDesign
Similar Questions
-
Hey I lost my ios for my macbook how to fix
Hey I lost my ios for my macbook how to fix or install ios
You have a Macbook, but you've posted in the forum for desktop - I asked guests to move it on the forum of Macbook.
Your Macbook does not run iOS - it is for iPhones and iPads. I guess that say you you have damaged your operating system somehow, OSX - is that correct? This Apple help page explains how to reinstall your system:
-
Tecra A10 - lost HDD Recovery for Vista
Hello Toshiba,
I bought a Tecra a month ago. Here are the details:
Device name: Tecra A10 - 11L
Unit number: PTSB0E-00C006ARFor some reason I have to downgrade the machine in Windowx XP (using the CD-ROM supplied in the packaging recovery). I do not use Vista.
Now I need to go back to the factory installed Vista Business.
I didn't create a Vista recovery CD before downgrading to XP.I think I lost recovery disk for Vista.
Then I found the site to order: https://backupmedia.toshiba.eu/serial.aspx
1. I'm not sure I'll order the recovery Vista or XP Media?, it shows (price (including VAT): EUR 29.33)
What recovery media that I will get?
a. VISTA Business recovery
b. recovery XP Media? (that I have)2 is there a hidden partition that I can use it to retrieve the vista?
Can someone help/guide me?
Sincerely,
Andrew
You are right. After installing Windows XP edition family the HDD recovery went and it cannot be used to install more factory settings. There is no hidden partition and you can't do anything.
I really don't understand why you ignored Toshiba reminder on creating recovery DVDs.In any case, I think that you will get Vista 32 Bit SP1 Business (EN) because with this OS is delivered and preinstalled Tecra.
-
I lost the code for the option menu 'limitations' of the iPhone 4, how can you do then? so I can come and factory reset, it is a 4 digit code, so I can be able toexample factory reset the phone, don't know if this is the right forum for my question but
Sorry, but the restriction password cannot be reset, it is part of the backup and restore a backup that was taken after the restrictions were activated, restore this code again.
You will have to start without the help of the data backup, configure the phone to factory settings and start over. Follow the steps mentioned in this article:
Use iTunes to restore your device to factory settings - Support Apple iOS
If you lose or forget your password restriction, you must erase your device and then put it up as a new device to remove the restriction password. Restore the device by using a backup does not delete the access code.
copied from: Sur les Restrictions (parental control) on iPhone, iPad and iPod touch - Apple Support
-
From Windows 8.1 to Windows 7, my HP Pavilion e101sl 17 laptop lost the drivers for USB
Hello guys, from 8.1 to Windows to Windows 7, my laptop HP Pavilion 17-e101sl lost the drivers for the USB controller, USB3 does not work, can someone help me please, thanks in advance
Hello:
Here is the link for the usb driver 3, you must...
Here's how to get the graphics to work when using W7 x 64...
1 install the Intel chipset driver and restart.
2. install the Intel graphics driver and restart.
3. download and install MS .NET Framework 4.0.
http://www.Microsoft.com/en-US/Download/details.aspx?ID=17851
4. download and install the latest amd catalyst driver beta.
http://support.AMD.com/en-us/KB-articles/pages/latest-catalyst-Windows-Beta.aspx
-
I have lost my disc for my Tablet TC4200. Any Suggestions?
I have lost my disc for my Tablet TC4200.
Any Suggestions?
Jim
Hello:
If you live in the United States, you must call this number you have a notebook of class business.
1-800-334-5144
If HP has more discs for your model, you can always get a game from this provider on the link below.
-
I lost my dvd for win 7 home basic oa what I do
I lost my dvd for win 7 home basic oa what I need to do? How do I format my laptop is there a link? years of pl
See if this post on the forum helps: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/when-can-i-download-the-windows-7-home-basic-iso/39eac399-3a12-46ed-91f4-93a300126e43
Windows 7 Home Premium 32 Bit: http://msft.digitalrivercontent.net/win/X17-58996.iso
Windows 7 Home Premium 64-Bit: http://msft.digitalrivercontent.net/win/X17-58997.isoJ W Stuart: http://www.pagestart.com
-
I lost the disk for my Canon Pixma ix6820 installation, is there something I can download instead? It is a mac.
Thanks for any help or ideas.
-
I lost my disc for Age Of Mythology: titans pack expansion and I saw several responses re download the trial version and to enter the key from there, but I can't find where to enter the product key can help you?
Hi JAWigan,
I recommend you contact the support of Microsoft Game for assistance:
http://www.Microsoft.com/games/ageofmythology/norse_downloads.aspx
Reference:
Support for issues of PC gamesHope the helps of information.
-
Windows xp starts
I lost my backup for windows xp home disks and now my computer asks me for the startup disk. Is there anywhere I can download the file on a dvd?Hi DrKathy1950,
· Did you do changes on the computer before the show?
· When she asks the startup disk?
· You get the error message?
· Are you able to boot to the desktop?
Answer with the information required to help more.
For reference:
How to replace Microsoft software or hardware, order service packs and replace product manuals
-
I lost my recovery for windows Vista disk. How can I restore the computer to its original factory State? I can't find how to create recovery discs, I did not have this option in the Recovery Manager
Hello
Here are the different ways to reinstall vista
Contact the computer manufacturer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it
they do it for a nominal cost of $
also ask them if you have a recovery partition on your hard drive to get back to the way you bought
you would normally press F10 or F11 or Alt + F10, 0 at startup to start the recovery process according to the manufacturer
Ask them of the exact key sequence
or borrow a microsoft dvd vista
Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer
they contain all versions of vista
This is the product key that determines which version of vista is installed
http://www.theeldergeek.com/Vista/vista_clean_installation.html
Save all data, because it will be lost, do the above
How to replace Microsoft software or hardware, order service packs and replace product manuals
-
How can I get a copy of my lost 'product key' for my Vista operating system?
How can I get a copy of my lost 'product key' for my Vista operating system?
How can I get a copy of my lost 'product key' for my Vista operating system?
It is quite difficult to 'lose '.
1. If you have a desktop computer, the product key is on the side or rear.
2. If you have a portable computer, the product key is down.
All else fails:
13 free product key finder programs
http://pcsupport.about.com/od/productkeysactivation/TP/topkeyfinder.htmBelarc Advisor
http://www.Belarc.com/free_download.html -
lost product key for Windows Vista
lost product key for Windows Vista Home basic and the system is not start without the key, how to retrieve the product key
http://www.magicaljellybean.com/KeyFinder/
If you have a Vista operating system running and enabled, you can use the program above to find your product key; but you do not.
If the Office: Watch next or back
If laptop: look on the underside.It is a 25-digit number on a sticker number in 5 groups of 5 digits.
Or contact the manufacturer.
See you soon.
Mick Murphy - Microsoft partner
-
failure of the regular creation of translation for the protocol 50
Hello
I get the following error message when you try to connect a vpn client via an ASA5505 with an ipsec already configured a connection site to site AES/256:
failed to create regular translation for protocol 50 src:inside:192.168.1.167
DST: Outside:XX.xxx.x.64
The address of a site isn't relevant, I don't mean to pass traffic to the site to site, but rather to create a new virtual private network from inside the customer external VPN outside which is not under my control.
The client is able to create a connection, but no traffic is passed, when I try to ping / rdp, the message above is returned to me.
If I add the static rule (indoor, outdoor) interface 192.168.1.167 netmask 255.255.255.255 then it works, everything works, but ONLY from this computer.
Been Googling for hours, but no result yet.
Hope someone can shed some light on my questions.
Thank you
\\mark
Hi, as the client away from end running the VPN server to turn on NAT - T, if they have a PIX / ASA have then add isakmp nat-traversal crypto 20 just as you do not have in your.
Concerning
-
Using blackBerry Smartphones, I've lost the password for password keeper
Help I lost the password for password keeper. Is their any way I can reset the password without my previous password keeper?
I had my backup phone a few days before and was able to restore the previous state with 10 more try and was able to open the password lock after a bit more to try. Everything is good.
Maybe you are looking for
-
How can I recoverr my photos my computer crash and lost all the
Hi everyone I need help from someone my computer crash and I lost all my photos is their far I can retrieve them.i would really apreciate the help thanks .i am despret 4 my photos.
-
How to get two strings to write to a text file
As requested above. Attached is the peak of the problem I have Thank you Sorry I'm new to Labview
-
No virtual USB port printer and device option think its an IEEE 1284.4 print media device
I read a number of threads and can still not my problem fixed. I have a Dell box running Windows XP SP3 and tries to connect to a printer of labels Zebra GX420t via a USB connection. He was not to recognize the printer and I think I inadvertently h
-
Let me describe what is happening. I used the 'get info' in iTunes to add various jpg work at the individual level of CD (i.e. selecting song at the same time) multiple. ITunes displays the work very well and works very well. Over a period of time,
-
HP mini admin password or power on password
so I need the code of deactivation of the system in order to get the code administrator? I am locked out and have no idea what other password is... & lt; BR & gt; disable code 84437807 & lt; BR & gt; & lt; BR & gt; Thank you