JavaScript for InDesign article Simple Script Runner
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / JavaScript for InDesign article Simple Script Runner
- This topic has 6 replies, 3 voices, and was last updated 3 years, 11 months ago by Peter Kahrel.
-
AuthorPosts
-
-
April 2, 2020 at 11:31 am #1236413Edward RandellParticipant
In Issue 132 of InDesign Magazine there is a fascinating article about JavaScript for InDesign. Do to a complicated chain of incidents, I opted to use the Simple Script Runner at the end of the article. The problem I’m having is that the Save function appears to be the same as the Open function. It wants to open a file rather than save it. Anyone else run into this? If I knew more about coding in JavaScript I could analyze the script for it and figure out what’s wrong. I will pursue that.
-
April 2, 2020 at 11:43 am #1236424David BlatnerKeymaster
Ooops! You’re right. It’s not really the same, but it doesn’t let you name the script… so Save is kind of useless at the moment. Let’s see if Peter K can work up a fix.
-
April 2, 2020 at 12:03 pm #1236434Edward RandellParticipant
Okay, Thank you David!
-
April 3, 2020 at 7:10 am #1236444Peter KahrelParticipant
The Save dialog does indeed virtually look the same as the Open dialog. At first sight the difference is only in their titles, ‘Select a script’ vs. ‘Save the script’. On Windows (which I use) it works fine though:
1. Click Save
2. At the ‘File name:’ prompt, type a name for the script and click OK (or press Enter/Return). No need for a file type, .jsx is added automatically.I have some screen shots but I can’t show them here. I’ll send them to David.
If neither of you can get it to work then it must be a Mac thing. In which case I’ll have to think of some fix.
Peter
-
April 4, 2020 at 4:07 pm #1236544David BlatnerKeymaster
@Edward: Peter wrote a new version of the script, and it has been updated (at the same link in the magazine). I just tried it and Save works on the Mac now. Whew!
Thank you, Peter!
-
April 15, 2020 at 9:51 am #1236553Edward RandellParticipant
Thank you David and Peter,
The script editor works just right now! Thanks again.There is a page in the JavaScript for InDesign article called Simple Scripts to Get You Started. One script in particular caught my eye. The second one in the list.
I have a sixteen chapter book and each chapter is a separate document. Each starts numbering at 1. To make them all continuously sequenced would be great!Here’s my problem. I opened all of them (I’m running a test with just the first 5 chapters) set the numbering to Automatic, and ran the script. Then I closed them all. Once with saving, and once without. But nothing happens. No change in the numbering at all. The book dialogue box still shows each document starting with 1. It’s a simple one line script so I know it’s typed properly, but I can’t get it to change a thing.
Anyone else have this problem?
PS I’m on a Mac. -
April 16, 2020 at 2:11 am #1238723Peter KahrelParticipant
Just for the record: Edward discovered that it was a problem with InDesign’s preferences. After deleting them the scripts worked as expected.
-
-
AuthorPosts
- You must be logged in to reply to this topic.