Hi all,
I'm new to Mac/OSX and I'm looking for a bit of guidance. In brief I have a program (Poweroff) which runs as a service on several Windows machines on my network which I can use to remotely standby/poweroff/run programs etc. Previously I used the same program on my Windows laptop to send commands to the servers, but the program doesn't exist (yet) for the Mac. Fortunately the server side exposes a telnet interface, so I thought I could just create an Applescript for each machine to connect via telnet and issue commands.
I'm basically looking for the following:
Launch a terminal session
Telnet to {server} {port}
Send command 'Password {password}'
Send command 'Action Standby'
Send command 'Wait 10'
Send command 'Doit'
Send command 'Quit'
Close the telnet session
Quit terminal
It would be even better if the script could prompt me for the 'Action' (standby, shutdown, etc.) and substitute this in the script.
So far I've managed to launch terminal and issue the telnet command. Unfortunately I can't figure how to issue multiple commands each as a separate entry.
I'm sure this is pretty basic stuff for most of you, but any advice much appreciated.
Thanks in advance,
Tom
I'm new to Mac/OSX and I'm looking for a bit of guidance. In brief I have a program (Poweroff) which runs as a service on several Windows machines on my network which I can use to remotely standby/poweroff/run programs etc. Previously I used the same program on my Windows laptop to send commands to the servers, but the program doesn't exist (yet) for the Mac. Fortunately the server side exposes a telnet interface, so I thought I could just create an Applescript for each machine to connect via telnet and issue commands.
I'm basically looking for the following:
Launch a terminal session
Telnet to {server} {port}
Send command 'Password {password}'
Send command 'Action Standby'
Send command 'Wait 10'
Send command 'Doit'
Send command 'Quit'
Close the telnet session
Quit terminal
It would be even better if the script could prompt me for the 'Action' (standby, shutdown, etc.) and substitute this in the script.
So far I've managed to launch terminal and issue the telnet command. Unfortunately I can't figure how to issue multiple commands each as a separate entry.
I'm sure this is pretty basic stuff for most of you, but any advice much appreciated.
Thanks in advance,
Tom