Because LC can't do two things at once.

Martin Koob mkoob at
Fri Feb 20 11:19:06 EST 2015

Hi Richard

I noticed in your bug report was for Mac so till that enhancement gets
implemented you could use this.

function powerStatus
   put shell ("pmset -g batt") into tPowerStatus
   put matchtext(tPowerStatus, "'([^']*)",tPowerSource) into tSuccess
   return tPowerSource
end powerStatus

Not sure how to do this for other platforms.

I wonder if this could be something that could be made into a widget once
they are ready?

Richard Gaskin wrote
> * If we want to max out the CPU by taking full advantage of idle time 
> for background processing, it would be ideal to do this only when 
> powered by wall socket, so laptops running from battery wouldn't be 
> drained unnecessarily by what could be optional workloads.   To do that 
> we'd need to be able to know when a computer us running on battery, so I 
> requested a powerStatus function:
> <>
> -- 
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________

> Ambassador@

> _______________________________________________
> use-livecode mailing list

> use-livecode at .runrev

> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list