Battery testing, volume booster

Lynch, Jonathan BNZ2 at CDC.GOV
Wed Dec 8 09:58:45 EST 2004


Can the volume boost be affected through VBScript, C, or Jscript?

If so, you could maybe create a script in Rev that does the following:

1) Checks to see if the relevant .vbs file (or whichever language you
use) is located in the same folder as your stack

2) if it is not found, then writes a .vbs file with the necessary
VBScript code

3) uses the shell command with the CScript command-line command to run
the VBScript

I am working on something like this to force a window to always stay on
the bottom level. I think this is probably a very difficult approach,
with many opportunities for odd problems - but it might work if nothing
else does.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Richard
Miller
Sent: Tuesday, December 07, 2004 7:01 PM
To: How to use Revolution
Subject: Re: Battery testing, volume booster

Thanks, Sarah. That seems to work fine. Much appreciated.

Still looking for ideas on the volume boost from anyone else.

Richard


On Dec 7, 2004, at 5:51 PM, Sarah Reichelt wrote:

> Hi Richard,
>
>> Looking for ideas on how to accomplish two functions from within Rev:
>>
>> 1. Read the status of the internal battery (i.e. % charged);
>>
> I can't help with the volume boost, but here is the script I use for 
> reading the battery charge in an iBook. It requires the shell command 
> "battery" which you can download from 
> <http://www.mitt-eget.com/software/macosx/>. I couldn't get that link 
> to work this morning, so if you want the shell command, let me know 
> off-list and I can email you a copy.
> I put it into the "/usr/bin/" folder but you can put it anywhere you 
> like if you send the full path to the shell function. It can give you 
> a whole heap of info - run it in Terminal and check the help, but the 
> function below just returns the percent charge or "n/a" if there is no

> battery.
>
>
> -- check battery level using OS X shell command
> -- battery script needs to be in /usr/bin/
> --
> -- returns percent charge or "n/a"
> --
> function batteryLevel
>   if isOSX() then
>     put shell("battery csv") into tBatt
>     put last item of line 1 of tBatt into tPercent
>     put item 4 of tBatt into tFlags
>     if char 6 of tFlags = 0 then
>       -- no battery connected
>       put "n/a" into tPercent
>     end if
>   else
>     -- OS 9 can't use shell commands
>     put "n/a" into tPercent
>   end if
>   return tPercent
> end batteryLevel
>
> Cheers,
> Sarah
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the use-livecode mailing list