InDesign tutorial help

Hi,
I’m trying to work through the Adobe tutorial for applescripting InDesign… but have run into a snag… they have this code:

on myGetBounds(myDocument, myPage)
	tell application "Adobe InDesign CS3"
		set myPageHeight to page height of document preferences of myDocument
		set myPageWidth to page width of document preferences of myDocument
		set myLeft to left of margin preferences of myPage
		set myRight to right of margin preferences of myPage
		set myBottom to bottom of margin preferences of myPage
		set myTop to top of margin preferences of myPage
	end tell
	set myRight to myPageWidth - myLeft
	set myBottom to myPageHeight - myBottom
	return {myTop, myLeft, myBottom, myRight}
end myGetBounds

specifically, the “set myTop to top of margin preferences of myPage” gives me an error saying
“expected end of line, etc. but found application constant or consideration”

I don’t understand… am I buggy? or is applescript?
thanks
David

Hi,

this compiles


on myGetBounds(myDocument, myPage)
	tell application "Adobe InDesign CS3"
		set myPageHeight to page height of document preferences of myDocument
		set myPageWidth to page width of document preferences of myDocument
		tell margin preferences of myPage
			set myLeft to left
			set myRight to right
			set myBottom to bottom
			set myTop to top
		end tell
	end tell
	set myRight to myPageWidth - myLeft
	set myBottom to myPageHeight - myBottom
	return {myTop, myLeft, myBottom, myRight}
end myGetBounds

maybe this is a script originally written for CS or CS2, Adobe made a few changes in the dictionary

BINGO!

how in the future, will I know that changes like that have been made? It’s interesting, in this tutorial from Adobe, at the beginning of this particular exercise the script references CS3, then it references CS2… hmmmm…

although, it’s gotta be better than Quark is…

thanks for the help
david