Power Status (was Re: Because LC can't do two things at once.)

Mark Wieder mwieder at ahsoftware.net
Thu Mar 5 14:13:28 EST 2015


Peter Brigham <pmbrig at ...> writes:

> 
> Double-check me on this.
> 

No, you're still checking the enclosing directory instead of the file. Grab
"/sys/class/power_supply/BAT0/status"
and the same for BAT1.

...and the caseSwitch function confuses me a bit:

I don't think the 'if tMatch = "*"' part is going to do anything useful here
(do you really expect the contents of the status file to be "*"?

and there's no processing for the case where tCheckValue is *not* among the
items of tMatch *and* tMatch is not "*" (will return empty).

-- 
 Mark Wieder
 ahsoftware at gmail.com





More information about the Use-livecode mailing list