My goal is to ensure that links clicked on the same osx machine are loaded into safaris on the remote computer with apple events enabled. To do this, I am trying to create an applescript application, which then creates a default browser on the system.
My applicator looks like this:
on run argv set theurl to item 1 of argv set dest to "eppc://user: password@ipaddress " tell application "Safari" of machine dest activate open location theurl end tell end run
In case argv is not a suitable method to use the url, I simplified the script to:
tell application "Safari" activate open location "http://www.google.com" end tell
Then I save it as an application and tell Safari that this application should be the default browser, but when I click the links in the applications, it completely ignores my applescript and loads the URL in Safari anyway (and not the URL I ' ve is the URL I clicked on).
Why is this? Do I need to do something special for my Applescript to act like a browser? If I run the applescript application by double-clicking on it, it will do exactly what it was supposed to do, but if I launch it using the "default browser" function, it does not start at all, and Safari takes over.
If there is something simple I am doing wrong or not doing, or if I go about it completely wrong, please let me know.
source share