So can a couple of Unix users out there test this part out? if there is a file "/sys/class/power_supply/BAT0" then put url "/sys/class/power_supply/BAT0" into tStatus else if there is a file "/sys/class/power_supply/BAT1" then put url "/sys/class/power_supply/BAT1" into tStatus else return "AC" -- no battery, must be running off external power end if put word 1 of tStatus into tStatus if tStatus = empty then return empty return caseSwitch(tStatus,"discharging=Battery","charging,unknown,full=AC","*=*") -- if tStatus = empty, returns empty -- -- Unix users please test: should this return some value?? -- if tStatus is not in "discharging,charging,unknown,full" then -- just returns whatever "/sys/class/power_supply/BATx" reports
-- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode