Skip to main content
David André Erichsen
Inspiring
October 19, 2014
Question

[AS] Place gun

  • October 19, 2014
  • 3 replies
  • 2055 views

Hi, Im doing a script that ends up with images loaded in the place gun. Is there a way to only enable the "grid-tool" with the script, so you dont need to press cmd+shift when placing the images on the page?

This topic has been closed for replies.

3 replies

Legend
November 20, 2017

Hey David,

hope youre still poked if this thread gets an answer:

Im struggeling even targeting the place gun. Ive found this code snippet but it doesnt work, do you have any clue why its not working?

tell application "Adobe InDesign CC 2017"

    set testfile1 to choose file "Choose graphic file." with multiple selections allowed

    tell active document

        tell page 1

            tell place gun 1

                load place gun testfile1 without showing options

            end tell

        end tell

    end tell

end tell

David André Erichsen
Inspiring
November 20, 2017

Try this

set loadFiles to choose file "Choose graphic file." with multiple selections allowed

tell application id "com.adobe.indesign"

  activate

  tell active document

   if loaded of place gun 1 is false then

     tell place gun 1

       repeat with loadFile in loadFiles

         load place gun loadFile without showing options

       end repeat

     end tell

   end if

  end tell

end tell

Legend
November 20, 2017

That worked out fine…but i cant point out the difference
In my code, i had only one file choosen, and it didnt work out.

Inspiring
November 11, 2015

something like this should get you going

activate application "Adobe InDesign CC 2015"

delay 0.5

tell application "System Events" to tell process "Adobe InDesign CC 2015"

    key down {command}

    key down {shift}

end tell

Inspiring
November 6, 2015

HI David, I’m sorry, this isn’t an answer to your question, but I am having trouble loading the place gun at all. Can you show me your script? Thanks.