Batch Login script

Hi guys,

I’m trying to remotely login computers all at once in a classroom with no luck.
The computer running the script is on OS 10.9.5 and the other on OS 10.8.5.

Where I’m at now is trying to use this script:

–tell application “System Events” of machine “eppc://192.168.0.103”
–keystroke “myUserName”
–keystroke return
–delay 0.5
–keystroke “myPassword”
–delay 0.5
–keystroke return
–end tell

I always end up with the error: Application isn’t running.
So far I’ve tried everything I’ve seen on this forum and others to try and run the application without success.
I was able to close a remote application doing this:
–tell application “Safari” of machine “eppc://192.168.0.103”
– if running then quit
–end tell

But after a hour of working, the same command now gives me the same error message, Application isn’t running and yes, Safari is running. The exact same command running on my computer closes Safari:
–tell application “Safari”
– if running then quit
–end tell

I’m guessing the whole problem is the use of application from remote somehow.
The system preferences on the remote computer for Sharing are set to Remote Login, Remote Management and Remote Apple Events.

Could someone help me figuring it out?

Could anyone give me an idea where to start with this?

I googled “remote site:macscripter.net”.

This is the 1st link that comes up. Does this apply to your situation?