applescript to login user after scheduled startup
Hi,
I am trying to get the MACs in the office to:
at a set time - do a TM backup.
after backing up shutdown the MAC
Next morning startup, login the/a user loading any apps that were in use before the previous shutdown and sleep (which the MAC will do anyway after a period of inactivity anyway)
Thus the backup, shutdown and restart are effectively invisible to the user -unless they have left blocking apps open.
I have pretty much got it sorted. But I can't find a way to login the user after a scheduled startup using apple script.
Currently a crontab runs this applescript:-
(* next wake time - set for just before DoBackup is scheduled *)
do shell script "pmset repeat wakeorpoweron MTWRF 18:55:00" password "LoginPassword" with administrator privileges
(* login *)
tell application "System Events"
tell application process "loginwindow"
keystroke "LoginName"
keystrokereturn
delay 3.0
keystroke "LoginPassword"
delay 3.0
keystroketab
keystrokereturn
end tell
end tell
Am I trying to do something that I just can't achieve?
Is there a simple way of achieving this?
Andy C