JavaScript for InDesign article Simple Script Runner

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / JavaScript for InDesign article Simple Script Runner

Viewing 6 reply threads
  • Author
    Posts
    • #1236413
      Edward Randell
      Participant

      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.

    • #1236424
      David Blatner
      Keymaster

      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.

    • #1236434
      Edward Randell
      Participant

      Okay, Thank you David!

    • #1236444
      Peter Kahrel
      Participant

      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

    • #1236544
      David Blatner
      Keymaster

      @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!

    • #1236553
      Edward Randell
      Participant

      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.

    • #1238723
      Peter Kahrel
      Participant

      Just for the record: Edward discovered that it was a problem with InDesign’s preferences. After deleting them the scripts worked as expected.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.
>