I just recently went through all of my Adobe CS3 scripts and converted them to work in CS4. I could not find a good reference listing what needed to change so I thought I would start a thread with what I found.
InDesign:
For the most part I changed my Tell Application “Adobe InDesign CS3” lines to Tell Application “Adobe InDesign CS4” and most of my scripts worked as before. The only exception I found had to do with the “relink” command. It needs to have “file” before the path to the new link. Also, the weird bug where the relinked item would come in modified (necessitating an “update link” command that always errored for no reason) has been fixed.
Old CS3:
relink link (referenceToTheLink) to (pathStringToNewFile)
try
update link (referenceToTheLink)
end try
New CS4:
relink link (referenceToTheLink) to file (pathStringToNewFile)
Adobe Acrobat:
I don’t have a lot of Acrobat scripts, but wanted to note that the name of the app is different. Where InDesign, Illustrator, and PhotoShop just change from having “CS3” in the name to “CS4”, Acrobat changes like this:
CS3 name: “Adobe Acrobat Professional”
CS4 name: “Adobe Acrobat Pro”
The only other thing I had to change was some System Events UI scripting where things moved around.
Distiller:
We have a period of time where the CS3 package and the CS4 package will both be on everyone’s Mac so there was one thing I had to account for, which is that the name of the Distiller app did not change. In CS3 and CS4 the app is “Acrobat Distiller”, so a command like ‘Tell Application “Acrobat Distiller” to launch’ will have various effects based on if you have one of the versions launched already or neither launched.
I changed the above command to:
do shell script "/usr/bin/open -g " & (quoted form of “/Applications/Adobe Acrobat 9 Pro/Acrobat Distiller.app”)
Once the CS4 version of Distiller was running, any Tell application “Acrobat Distiller” block would always use the CS4 version regardless of whether or not the CS3 version was running.
Those are all of the issues I had with my scripts. Hopefully this can be a reference to help anyone else going through this conversion. Please respond with any issues you had that I didn’t come across.
Model: iMacintel
AppleScript: xCode 3.0
Browser: Safari 525.20.1
Operating System: Mac OS X (10.5)