• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[AS] Place gun

Explorer ,
Oct 19, 2014 Oct 19, 2014

Copy link to clipboard

Copied

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?

TOPICS
Scripting

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 06, 2015 Nov 06, 2015

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 10, 2015 Nov 10, 2015

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 20, 2017 Nov 20, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2017 Nov 20, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 20, 2017 Nov 20, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2017 Nov 20, 2017

Copy link to clipboard

Copied

testfile1 is a list with only one item. I think this change make it work for you:

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 20, 2017 Nov 20, 2017

Copy link to clipboard

Copied

Applescript wont do this:
set xyz to item 1 of choose from…

But I found out, that

  1. tell page 1
  2.             tell place gun 1
  3. …
  4.             end tell
  5. end tell

The problem was to tell the page

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 16, 2024 Sep 16, 2024

Copy link to clipboard

Copied

LATEST

I know this is an old thread, but does anyone know how to make this work with a file path to a single file, instead of the choose file option? Maybe more of a syntax question.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines