news |
info |
people |
software |
stuff |
Power XFCN. Version 1.0d2, by Sam Deane. Copyright ©1994 ULTRALAB. Compiled 16:51:39, 28/04/94. Debugging code included.
You can check what the status and level of the battery is, and you can get. set and clear a wakup time.
Commands
powerThe syntax is:
Power("power")
Example script for poweron mouseUp repeat until the mouseClick put Power(power) end repeat end mouseUp
statusThe syntax is:
Power("status")
The results will contain one or more of the keywords: connected, hicharge, overflow, low, changed.
Example script for statuson mouseUp repeat until the mouseClick put Power(status) end repeat end mouseUp
wakeStatus
Example script for wakeStatuson mouseUp put Power(WUstatus) into status put Power(WUtime) into seconds convert seconds to time and date answer status && seconds end mouseUp
wakeTimeThe syntax is:
get Power("wakeTime")
wakeSetThe syntax is:
get Power("wakeSet",<time>)
The time parameter should be the time, in seconds since 1904, at which to wake up. To convert a time and date into seconds you can use the hypertalk convert command, as in the following script:
get "10/01/94 17:54"
convert it to seconds
Example script for wakeSeton mouseUp get Power(WUtime) convert it to date and time ask "Wakeup time?" with it if it is not empty then convert it to seconds get Power(WUset,it) end if end mouseUp
wakeOffThe syntax is:
get Power("wakeOff")
Example script for wakeOffon mouseUp answer Power(WUoff) end mouseUp