Hi, Let’s try the full path to Adobe Acrobat 8.0 Professional with a delay and remove: activate.
I’m guessing that the name of the folder is: Adobe Acrobat 8.0 Professional – and it’s in your Applications folder.
do shell script "open -a /Applications/Adobe\\ Acrobat\\ 8.0\\ Professional/Adobe\\ Acrobat\\ 8.0\\ Professional.app"
delay 4 -- Increase or decrease as needed
tell application "Adobe Acrobat 8.0 Professional"
-- perform my task
end tell
Tom
Browser: Safari 530.19
Operating System: Mac OS X (10.5)
I think the problem doesn’t fall on the do shell script line, because it does launch the correct version as requested.
Just try again to let ver 8 to have enough time to launch (I even try delay 10), yet no luck!
I think it will just get the firstly open application to perform the task… That means, if ver 7 is open first followed by ver 8, no matter how, it will let ver 7 to perform the task.
Second thought, if this couldn’t be fixed for the time being, can I have a workaround method by asking the user to quit other versions of Acrobat except ver 8?
But then, how am I going to detect is there any other versions of Acrobat which is(are) currently open?
If this doesn’t help, someone else may have the solution.
tell application "System Events" to set ffopen to exists process "Adobe Acrobat 7.0 Professional"
if ffopen then
tell me to display dialog "Currently Adobe Acrobat 7.0 Professional is active.
Want to quit version 7.0 and launch version 8.0?" buttons {"Cancel", "Yes"} default button 2
if the button returned of the result is "Yes" then
quit application "Adobe Acrobat 7.0 Professional"
delay 0.4
do shell script "open -a Adobe\\ Acrobat\\ 8.0\\ Professional.app"
tell application "Adobe Acrobat 8.0 Professional"
activate
-- perform my task
end tell
end if
else
-- I don't know what 'else' you want to do here.
(*
do shell script "open -a Adobe\\ Acrobat\\ 7.0\\ Professional.app"
tell application "Adobe Acrobat 7.0 Professional"
activate
-- perform my task
end tell
*)
end if
Tom
Browser: Safari 530.19
Operating System: Mac OS X (10.5)
My guess (I do not even have one version of Acrobat here) is that although they have different names on disk, both versions share the same bundle ID. I thought this was what Leopard’s application “/posix/path/to/an.app” specifier was for (no Leopard on my machine, either).
Sorry for the late feedback because I didn’t have access to the station that consists few versions of Acrobat.
Thank you, Tom Ostro. Your script for checking Acrobat 7 existence does work provided the name of the application tally with the one spelt in the script. But you know, some users like to change the application name to look neater…