Hello everyone,
I am currently creating a new ASOC project in Xcode. I have created a few projects using Shane Stanley’s excellent book as a resource. Kudos to Shane.
To my question, I am in the process of writing my first ASOC project which includes remote apple events to control Excel on a remote computer. Shane does have some information about controlling applications on the remote machine, but not to make the connection to the machine itself. I am curious if anyone can help with the syntax i need to use to make the connection.
Going back to the AppleScript Studio days, you could use a connection such as this, then control the application
set theRemoteMac to "eppc://username:password@ip_address"
tell application "Excel" of machine theRemoteMac
using terms from application "Microsoft Excel"
--do stuff here
end using terms from
end tell
In ASOC projects it doesn’t seem to work that way. If I use the “of machine” command (from the AppleScript Studio days), I receive a “Cannot find remote machine” error.
Using Shane’s book as a guideline, i have my code currently written as follows…
set theRemoteMac to "eppc://username:password@ip_address"
set theApp to application ((theRemoteMac as text) & "/Microsoft Excel")
using terms from application "Microsoft Excel"
tell theApp
--DO STUFF HERE
end tell
end using terms from
but this code produces the following error… Microsoft Excel got an error: Application isn’t running.
Any thoughts as to how I need to word my syntax to make the connection?
If there is any further information I can supply, please let me know.
Thanks everyone!