Run script from InDesign block

compiles as

tell application "Adobe InDesign CS3"
	tell document 1
		set theScript to alias ("xxx.scpt")
		tell me to run script theScript entire path {1}
	end tell
end tell

Can someone please tell me how to get the parameters passed? Obvious, I’m sure, but I’ve been away from AppleScript for quite a while - I should know this.

Thanks…

  • Dan

You are in the InDesign tell block, so it appears that InDesign is trying to interpret the “with parameters” line according to its dictionary. I would just get it out of that block. The easiest way would be to move it to a subroutine.

tell application "Adobe InDesign CS3"
	tell document 1
		my runTheXTernalScript(1)
	end tell
end tell

on runTheXTernalScript(theNumber)
	set theScript to alias ("xxx.scpt")
	tell me to run script theScript with parameters {theNumber}
end runTheXTernalScript

Thanks Matt-Boy - the subroutine should work - I’ll do that. Just curious why the “tell me” didn’t cause the run script to be compiled in the AppleScript context instead of InDesign’s.

Anyhow, thanks - that helps!

  • Dan