Indesign CS 3.0.1 Thoughts of script design/how to do...

:smiley:

first off I am learning applescript…
I want to be able to automate my process for page layout and make sure no ads for the newspaper i work for are left out.

I want to be able to take the file names from CS to FMP 5.

example:
radco.indd – get file name from CS – have file name send to FMP 5 “Name of File”
– Check Advertising Insertion Order ( FMP 5 database for the sales people ) --Check if radco is supposed to run – Yes then write to report
then check to see if Classified page #.indd has “Name of File” on it. if not then pop up message and warn that it isnt there. – Then take radco.indd and send any image names or files to “Files Placed Into Ad” ( just the names of the files not the files themselves )
Redo for each week.

I am getting myself an applescript book from borders today…

this is my AS knowledge right now LoL ( not really but you get my drift )


beep

I have been searching around the net and havent come up with any thing close to this.
If i can get some pointers to help me on my journey it would be very helpful.

(* If this sort of thing hasnt been done then i would love to help out and let others use this as well once its done *)
I dont really want to be hand fed the script nor have someone else do it. I want to LEARN this… But pointers never hurt. :wink:

*** My example may be confusing but hopefully you get the jist of things i want to accomplish ***

Hi DijitaL,

InDesign has fantastic scripting support, so the best place to start is with Script Editor, InDesign’s dictionary, and the pdf inDesign scripting manual. Start by fooling around. For example, create a box in inDesign, select it, then go to Script Editor and type:

tell application "InDesign CS"
	get selection	
end tell

you’ll get something like:

{rectangle id 166 of page id 131 of spread id 126 of document "Untitled-2" of application "InDesign CS"}

This is the address of the object, which is how you can talk to it in AppleScript. Addresses are really important.

Similarly, to get the name of your current document, say:

tell application "InDesign CS"
	get name of document 1
end tell

However what you probably want is the file path of the document. This can be stored in a text field in FM.

tell application "InDesign CS"
	set myFilePath to (full name of document 1) as string
end tell

tell application "FileMaker Pro"
	tell database "myDatabase"
		tell current record
			set cell "myFilePath" to myFilePath
		end tell
	end tell
end tell

Obviously this will only work with saved documents, as unsaved ones don’t have a file path…

Get Shirley Hopkins’ book “AppleScripting InDesign” from Amazon.com. It is essential.

As I am working in the same area, I’d like to invite you to contact me at my email address if you’d like to discuss the subject further. I have been studying AppleScript for about 18 months and have so far managed to automate inDesign and FileMaker quite successfully for the newspaper I work for. I’d be happy to exchange scripting ideas and techniques with you and any others with an interest in this area.

Alex aclarke@nrg.com.au

How would i go about demanding InDesign to display the names of the files selected…

only if I could Understand the dictionary…

:?: :?: :?:

There has to be a way for AS to tell this app to get selection put it into a string then display that to me or store it…if you have any ideas or maybe a template I can use I would appreciate it.

(or even the way way to format the script I can fill in the blanks and misc)


tell application "InDesign CS"
	
	set linkage to (get name of every link of document 1)
	set myLinks to linkage as string
	
end tell
linkage

Yes I can get the result… but getting it to be placed in FMP 5 is odd. I have tried.
where it says --set data… But It wont allow that. Any ideas on how to get that to work?
I have been reading through my book but get side tracked and etc.


tell application "FileMaker Pro"
	tell database "Classified Control"
		tell current record
			set cell "Name of File" to myFilePath
			do script "Date_Finished Script"
			--set data of item 5 of cellValue of every cell of record 1 to linkage
		end tell
	end tell
end tell

Would it be something other then string? perhaps an array? ( now to learn that! )
And thanks Alex for helping me get this far.