About open command

This is what I did.
open “Finder”
But it only opens the Finder on my computer not the one I’m controlling through VNC. How do you fix this?

The ‘open’ SenseTalk command applies to the local host system. You can open a particular application using the following script included in your libraries/suite of scripts. With a small modification this handler could be made to goto a particular folder in the file system via the Finder on the SUT.

to OpenMacApp app

set app to words 1 to -1 of param(1)
if char 1 of app <> “/” then
OpenMacApp “/Applications/” & app
else
split app by “/”
set ( base, name ) to ( “/” & items 2 to -2 of app joined by “/”, item -1 of app )

TypeText F11 – expose mode
Click (50,50) – bring up the finder as current application
TypeText commandDown, shiftDown, “g”, shiftUp, commandUp
wait 30 ticks
TypeText base & return – type the directory, and return to open up the path
wait 30 ticks
TypeText name – get the right application hilited
TypeCommand “o” – open the application
end if

wait 2 seconds

end OpenMacApp