Virtual machine browser is considered applescript if parallels are set in MacPro

I am running Mac Pro using parallels to run many virtual machines. I use the following script to get the URL from the active tab of the active Firefox window.

(1) tell the application β€œFirefox” to set the URL to β€œcurl” window 1 (for Firefox <3.6)

(2) tell the program "Firefox" to activate say the application "System Events" pressing the "l" key using {command down} pressing the "c" key {command down} end say delay 0.5 clipboard (for Firefox > = 3.6)

But these applescripts try to open Firefox on one of the virtual machines and ignore the open Mac-native Firefox. What can be done about this?

Thanks in advance. Regards, Deepa

+4
source share
1 answer

You probably have shared guest applications enabled (share Windows applications with the Mac OS option in the Vm configuration). In this way, Parallels Desktop creates stubs in your ~ / Application folder for guest applications. For example, you will find Firefox.app there, which is associated with Firefox inside the guest.

Your options:

  • Disable shared guest apps for your Vm
  • More specifically, in AppleScript to define an application not only by name

For example, you can define the application as ( http://developer.apple.com/library/mac/#documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-SW2 ):

  • application id "ttxt"
  • Application ID "com.apple.TextEdit"
  • application "/Applications/TextEdit.app"
+4
source

Source: https://habr.com/ru/post/1339177/


All Articles