Does anybody else have any insights on this, because I'd like to
know the
answer too (this could be very useful to me if I can get it to work
reliably). I get a "user authentication failure" error. I am using
a valid
username/password combo, and have verified that remote apple
events are
enabled.
I don't know that this is the problem, but it may simply be that
you are not allowed to run osaxen (like beep and run script)
remotely. There used to be an osiz resource which specified if an
osax was allowed to run remotely. I'm not sure if there's any
corresponding technique to allow or prevent remote osaxen these days.
Indeed, "run script" does not allow remote execution -- it's a
security thing. In general, scripting addition commands that
trigger user interface are not allowed to run, though you can still
annoy the heck out of the remote user with "beep" and "say". [1]