I need an AppleScript that launches Photoshop, but the users' machines have any of the following versions: CS2, CS, 7. I wrote a test script the tries to launch the most recent version. If that fails, it tries to open the next and so on:
The problem I have, is that when an app isn't found, it launches a "Choose Application" dialog for the user to locate the executable. Is there a way to get rid of the dialog? Thanks
Code:
set PS1 to "Adobe Photoshop CS2"
set PS2 to "Adobe Photoshop CS"
set PS3 to "Adobe Photoshop 7.0"
try
tell application PS1
activate
end tell
on error
try
tell application PS2
activate
end tell
on error
tell application PS3
activate
end tell
end try
end try