Random InDesign CS Selection

I have InDesign CS and InDesign CS2 on the same board

tell application "InDesign CS"
get properties
end tell
tell application "Adobe InDesign CS2"
get properties
end tell

is fine & i save & close it

then open (with InDesign CS or CS2 open or both open)
and it will default both the apps calls to either one or the other
(it seems to depend on which was opened first)

How do i stop it changing the desired App?

thankyou please
ethel

I also tried this

my DoItRight(180, 200, "InDesign CS")
my DoItRight(180, 200, "Adobe InDesign CS2")

on DoItRight(w, h, CorrectSoddingApp)
tell application CorrectSoddingApp
set page width of document preferences to w
set page height of document preferences to h
end tell
end

but its a no goer on the compile/save

ethel,

This is a snippet of code from an Illustrator CS script I have. I noticed this behaviour also. This is how I solved the problem. I have tried to substitute InDesign but I don’t have InDesign CS2 to try it out.

property IddCS2 : (path to applications folder as Unicode text) & "Adobe InDesign CS2:InDesign CS2.app"-- this should give a path to your Indesign CS2 app. If it errors try copying the name from the app itself.

on run
	tell application "System Events"
		if exists process "InDesign CS" then tell application "InDesign CS" to quit
	end tell
	tell application "System Events"
		if not (exists process "Adobe InDesign CS2") then
			tell application IddCS2 to launch
		end if
	end tell
	thisScript()
end run

on thisScript()
using terms from application "Adobe InDesign CS2"
-- put your main code here
end using terms from
end thisScript

Let us know if this helps.

PreTech

Thanks for the suggestion

kind of does but doesnt work
I am wanting to toggle which version of InDesign i have live
and trouble is your script falls fowl of Randomness in its

using terms from application "Adobe InDesign CS2"

If i open this script with just InDesign CS open
It will immeditately swap it to

using terms from application "InDesign CS"

similarly if i send a script out to a board to deliberately do something in CS
The moment the person tries to run the script it will be set to whcih ever version in open

I guess i could have a seperate script so that i call a script with passed parameters saying kill all indesigns
and then trigger another script to launch the one i want & then do what i require.
Its a bit poxy though!!!

thanks for your help anyway
I will try this line of attack & let you know

Ethel,

I don’t know if this will work, but you could declare a property (as in the beginning of the sample) for both versions of InDesign. Then you would use that variable for the using terms line or use the properties to quit the InDesign version you do not want to use.

Good luck.

PreTech