Re: AC power testing
Re: AC power testing
- Subject: Re: AC power testing
- From: Nigel Smith <email@hidden>
- Date: Wed, 17 Mar 2004 17:10:24 +0000
On 17/3/04 2:01, "Rob Lewis" <email@hidden> wrote:
>
I need a script that will tell me if the AC power has failed (computer
>
is on a UPS). I have been using an old osax called "Lookup" that will
>
let me test if my LaserWriter is on-line (it's not on a UPS). But I
>
need OS X capability.
Print Center isn't scriptable to this extent -- it will return "idle" if its
queue to that printer is idle, without even looking for the real printer.
You don't say which LaserWriter but, if it has Ethernet, you should be able
to give it an IP address and then ping it to see if it is still up.
if (do shell script "ping -c 1 <ipaddress>") contains <no-break>
"100% packet loss" then
--its down
else
--its up
end if
Or perhaps there is something else on your network you can ping.
HTH,
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.