GetComputerUpTime JAWS Scripts Readme file
Written by Drew Weber.
some of the functions found within these JAWS scripts allowing reading, writing, and appending to a text file, were written by Jamal Mazruiand. provided on the mailing list by Jamal Mazruiwith. The archive of the post may be found at
, & are in his “homer utilities” file, the link provided by this post no longer valid.
Usage: NOTE! Only use these scripts if you are running a computer without a recognised battery. Example, you are running a desktop computer/micro tower that runs off of A/C power. You have this computer connected to a backup battery bank meant to charge a laptop. This allows you to be mobile with the computer.
These scripts will calculate/estimate the uptime of the Windows opporating system measured in 10ths of a second. This will be divided into hours, not hours half hours and minutes, so it is an estimate.
The first script, CalculateBattery
I have tighed to insert+shift+b, your standard command for getting battery status. This script will write a text file on your desktop, “uptime.txt”. This file will hold the last runtime data that will be written into a variable and then added to. It’s important to note that currently, each time you run the script it will add these numbers together, so if you don’t hear the hours spoken, or want the information again, you should go into the file on the desktop to understand the number. In saying this, you want to run this script only once per computer run, before you shutdown the computer to properly calculate the time. You also want to run this script, only if you feel the computer has been up for an hour or more.
Open the text file
Select all with control+a
copy with control+c
open your JAWS Script manager with insert+0
hit control+shift+d to open the default script file
hit control+end to go to the end of the file
make sure you are on a blank line below,
If you are not hit end, then, enter.
paste with control+v.
Hit control+s. You should hear JAWS report, compile complete and a ding.
Hit control+f4. This will close the default.jss file ut not the script manager.
alt+tab back here to the readme,
Copy this next line to your clipboard
alt+tab back to your JAWS Script manager, and hit, control+o
tab to files of type, hit k.
shift+tab three times to the list view and hit d.
JAWS should report default.jkm
hit control+home to go to the top of the file.
Hit control+f to open the JAWS find and type
you should be on the line common keys
then enter to create a blank line below this line
hit control+v to paste the copied line from your clipboard
hit control+s to save. You won’t hear a ding.
hit alt+f4 to close the script manager.
The second script, isn’t actually a script, but a function that lives inside the shutdownux.JSS. This is the script file for the Windows10 shutdown dialogue. You probably don’t have the user file but a shared file, so, go to the desktop, then, alt+f4 to bring up this dialogue, then hit insert+0 to bring up the JAWS script manager. Hit control+end to go to the bottom under the “EndFunction” line make sure you are on a blank line or hit enter.
hit control+a to select all,
control+c to copy
alt+tab back to the shared shutdownux.JSS JAWS script manager window.
Hit Control+V to paste the contents.
You may want to edit the text inside the quotes
SayString (“Please press shift, capslock, v, before shuttingdown or restarting this computer, to log the number of hours the machine has been running on Battery power. Remember, the machine can only run up to x hours on a charge.”)
to make sure you remember how much time your battery will provide.
Control+s to save, you should hear a ding, and compile complete. You should now have the USER version, vs the shared.
You can alt+f4.
This script will play a sound and announce a message when you activate the shutdown dialogue to remind you to calculate the uptime before you shutdown or restart the computer.
Enjoy your new scripts!