If you can guarantee where you're running these instances, you could theoretically "escape" the browser in a safe way using a deeplink.
That is, inside Perspective trigger a navigation event to customApplication://someArguments
(instead of http://someUrl
).
Then, if the local system has a protocol handler registered (this must be done out of band, you cannot do this on the page for the reasons Phil called out already), the web browser will prompt the user asking if they want to use customApplication
to open the link:
Then your custom application can be launched as-close-to-seamlessly-as-is-possible, from Perspective.
I'm handwaving entirely over the "custom application" piece of this. You'll need to code something that both registers with the OS as a URL handler (or can be registered manually as a handler) and is capable of doing the automation of clicks in your other application(s). This is a non-trivial engineering task requiring some actual software development.
But if you have to use Perspective, that's (as far as I know) the best you can do.