I run a Mac Pro using parallels to run numerous virtual machines. I am using the following script to get the URL from the active Tab of active window of Firefox.
(1) tell application "Firefox" to set theURL to «class curl» of window 1 (For Firefox < 3.6)
(2) tell application "Firefox"to activate tell application "System Events" keystroke "l" using {command down} keystroke "c" using {command down} end tell delay 0.5 the clipboard(For Firefox >= 3.6)
But, these applescripts tries to open Firefox in one of the virtual machines and ignores the open Mac-native Firefox. What can be done about this?
Thanks in advance. Regards, Deepa
You probably have Shared Guest Applications enabled (Share Windows applications with Mac OS option in Vm configuration). So, Parallels Desktop creates stubs in your ~/Application folder for guest applications. For example, you will find Firefox.app there that is linked with Firefox inside guest.
Your options are:
For example, you can identify application as (https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-SW2):