currently I am working on this script
#include <library.au3> _func_Alert("server1/server2 @ 33% battery. Servers will be shut down.", "NP"); alert called from library - sends text alert to phone $test = 0 If MsgBox(4, "Test?", "Is this a test run?", 5) = 6 Then $test = 1 If $test = 1 then $machine="\\server1"; test server else $machine = "\\server2"; production server EndIf RunWait(@ComSpec & ' /c shutdown -s -m ' & $machine & ' -t 9999 -c "Power Outage - UPS LOW" -d :6:12', @SW_HIDE)
my situation is I'm very new to this and I've taken over a position of someone who loved this stuff. programming drives me nuts, but I must admit that this is a very handy solution to many repetitive tasks.
We have 2 servers on 1 ups, so I need for the attached server to send a shutdown to the 2nd server that doesn't have the ups data cable to monitor the ups.
This will be one of the easier problems to work around, but there have been MANY times I have wished I could right-click on a line of code and choose an option that would display what the line develops in to. Whether it's a DOS command, a line of output text or whatever. Just have it have execute the code and pop-up an alert window that says: This is your result at line (whatever line I've highlighed/specified)- "some shutdown command that didn't work on the 1st draft".
I hope this makes sense and I hope it's doable.
Thanks,
Dave
edit : (just now I realized I did not have a 2nd EndIf - probably the majority of my problem. - or maybe not. Grrr.
Edited by nauip, 31 August 2007 - 06:08 PM.




