How to differentiate between applications with the same name in applescripts

I'm trying to use tell application "Google Chrome" in order to script the OS X Chrome app, but this keeps being interpreted as referring to a virtual application with the same name which refers to the windows "Google Chrome" inside a parallels desktop virtual machine. (Parallels Desktop automatically creates dummy OS X applications corresponding to all of the windows programs, so that they can appear running in the OS X dock etc.)

How could I differentiate between applications of the same name in such tell statements, based on the application path or some other attribute?


Solution 1:

You can use direct path to the application inside Your Apple Script. This will looke like:

set p to "/Applications/Safari.app"
tell application p to activate

Here's the link about AppleScript and POSIX paths