Targetting latest version of application

I have two version of Office on my Mac. X and 2004. When I execute a script calling for “Microsoft Word” instead of choosing the latest version, which is what I want, it asks me to choose where word is. How I tried to change the Word version X name to Microsoft word X, but it doesn’t work. Since This is a script that is on a server with people using either X or 2004, I can’t use the relative path to the application. Is there another way to avoid this?

btw, if I choose the application once, I won’t need to do it again until I restart my computer.

TIA
Lesta

First try:
Open a new script, paste the old script in the new window, close the old script. Change the name of the target Application inside the new script to “New Application”-


--insert this in place of current application's tell statement
tell application "New Application"

When you check the syntax or run it, the first thing it will do is ask where “New Application” is. Select your new version and the script should auto replace “New Application” with the new version name.

If that don’t do it…

Open a new script, paste the old script in the new window, close the old script. Change the name of the App inside the new script. BEFORE running it, move the old application’s icon to the trash TEMPORARILY. Run the new script, and it shouldn’t be able to find the old app, which should bring up the “where is this app” prompt. Find your new app and select it. Undo move of old app to trash back to its original spot*

Let me know how this fares.
SC

Sitcom,

I’ve tried your first approche before posting to the forum. As for the second option. It works the 'til I restart the computer. AS remembers for the time the computer is running, but as soon as its restarted, it forgets and sees there is two app with the same name and ask which one I want.

Thanks for the suggestions though…
Lesta

I would try renaming THE OLD PROGRAM at its source. Eliminate the comp’s ability to find the “MicrosoftWord” in the application’s name. This was suggested with old versions of Internet Explorer when converting from 5.0 to 5.1.
:arrow: So rename the old application file to “MSW_oldversion”. If that doesn’t work after restart, you may have a corrupted preferences file.
SC

Hi,

I don’t understand how it works on the server about using the path, but here’s some ideas. What if you prompt the user to choose a version.

choose from list {“Word X”, “Word 2004”}

then use the path. If the user chooses Word X, thenuse the path to X:

set a to (path to At Ease applications folder from local domain) as string
set r to (a & “Microsoft Office X:Microsoft Word”) as alias

gl,