Copy link to clipboard
Copied
I have just updated to InDesign CC 2017. Previously I used inDesign CS 6 and started my scripts with "#target InDesign;" and it worked fine. Now when I try to run these scripts my computer wants to open the old installation of InDesign instead of running the script in the CC 2017 version which is already open. I googled this and discovered that I should now add '#target "indesign-9.064"' to the start of my scripts instead. Unfortunately this doesn't help - all I get is the error message in the title of this question: '"indesign-9.064" is undefined!'. Any ideas on what I should do to run my scripts in InDesign CC 2017? I'm on Mac OS X El Capitan 10.11.6.
Another related question. When I open the scripts panel in InDesign and right click a script to edit it in ExtendScript Toolkit it automatically opens the old CS6 version of the toolkit. How can I set it to automatically open in the newest version instead?
You can also "connect" to your target without a target directive by using the functionality of the ESTK:
Changing target without using #target …
Regards,
Uwe
Copy link to clipboard
Copied
I discovered that: #target "indesign-12" seems to work for my version of InDesign. Does this mean I need to update these scripts overtime I update to a new version of InDesign?
Copy link to clipboard
Copied
Hi Simon,
no. At least not necessarily…
Why do you think, you need the target directive at all?
Without target directive:
If you run your script from the Scripts panel of InDesign the target is automatically the InDesign version you are working with.
Regards,
Uwe
Copy link to clipboard
Copied
Hi Uwe, thanks for your suggestion. When a script is finished I will usually run it from the panel so it's good to know that I don't need the target for that reason. But while I'm working on the script and need the debugger I usually run it from the toolkit. I guess I do need the target directive in those cases?
Copy link to clipboard
Copied
You can also "connect" to your target without a target directive by using the functionality of the ESTK:
Changing target without using #target …
Regards,
Uwe
Copy link to clipboard
Copied
Great! I didn't know that. I don't really have that much knowledge of the ESTK. Thanks for pointing it out to me!
Copy link to clipboard
Copied
Well, don't forget to read the help PDFs under ESTK's Help menu:
ExtendScript Toolkit ReadMe
Adobe Intro To SCripting
JavaScript Tools Guide CC
Regards,
Uwe