Monday, October 26, 2020

#1 2020-10-12 10:45:47 am

kempederson
Member
Registered: 2020-09-02
Posts: 17

Auto Loading InDesign Library

I am trying to figure out how to load a library for InDesign from my desktop at the start of this script and need it to close the library at the end.

This in the first part of the original script...

Applescript:



tell application "Adobe InDesign CC 2019"
   activate
   set myDW to 0
   set spSize to 0
   set setspineSize to 0
   set myB to 0
   set bleedamount to 0
   set myW to 0
   set coverWidth to 0
   set myH to 0
   set coverHeigth to 0
   set myBCorBF to 0
   set myBCBF to 0
   set myKW to 0
   set myKorW to 0
   set myWFSP to 0
   set myWframeSP to 0
   set myWFFC to 0
   set myWframeFCP to 0
   --
   
   if not (exists library "SCH Library.indl") then
       display dialog "Please open the library SCH Library.indl."
   else
       my myDialog()
       if theResult = false then
           error number -128
       else
           my myContinue()
           my myplaceitems()
           my mySave()
           save theDoc to theFile & theName as string
           if theExist is true then
               display dialog "The document " & theName & " was created because file name alreasy exist in folder, also graphics copied." giving up after 10
           else
               display dialog "The document " & theName & " was created and graphics copied." giving up after 10
           end if
       end if
   end if
end tell

Can anyone help me?

Offline

 

#2 2020-10-12 04:00:07 pm

kempederson
Member
Registered: 2020-09-02
Posts: 17

Re: Auto Loading InDesign Library

I got this far, this will open my library when my script runs, but now i am having a time figuring out how to close the library completely so i do not get an error if i open another version of InDesign...

Applescript:



set library_path to path to desktop as string

tell application "Adobe InDesign CC 2019"
   
   set the_libraries to library
   
   set pathtoLibFile to ((path to desktop folder) & "_Scholastic Libraries:") as string
   set the_libraries to "SCH Library" & ".indl" as string
   set theDoc to open (pathtoLibFile & "SCH Library" & ".indl")

Any ideas??

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)