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?
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.
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
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
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
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.
Copy link to clipboard
Copied
testfile1 is a list with only one item. I think this change make it work for you:
Copy link to clipboard
Copied
Applescript wont do this:
set xyz to item 1 of choose from…
But I found out, that
The problem was to tell the page
Copy link to clipboard
Copied
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.