Hello!
Im trying to make a script with the follow coordinates.
- User input an info.
- Script search for an image with this info.
- After, place in inDesign this image.
I don’t know what is wrong in my script, but his return this information.
error “Can’t get alias \input info" of alias "path that indesign search for the input info".” number -1728
This is my script.
set originalFolderPath to choose folder with prompt "Please locate the folder"
tell application "Adobe InDesign CC 2017"
set myDialog to make dialog
tell myDialog
set name to "Test"
set myDialogColumn to make dialog column
tell myDialogColumn
set myBorderPanel to make border panel
tell myBorderPanel
set myDialogColumn to make dialog column
tell myDialogColumn
make static text with properties {static label:"Reference:"}
end tell
set myDialogColumn to make dialog column
tell myDialogColumn
set myTextEditField to make text editbox with properties {edit contents:"", min width:180}
end tell
end tell
end tell
end tell
set myResult to show myDialog
if myResult is true then
tell application "Adobe InDesign CC 2017"
set myNameFile to edit contents of myTextEditField
set myDocument to active document
tell myDocument
set noColor to swatch "None"
set myRectangle to make rectangle with properties {fill color:noColor, stroke color:noColor, geometric bounds:{0, 0, 10, 10}}
tell myRectangle
place alias (myNameFile) of originalFolderPath on myRectangle
end tell
fit myRectangle given proportionally
fit myRectangle given center content
end tell
end tell
end if
destroy myDialog
end tell