Each time this script runs the number will be one higher. If the file name does not contain a path, the file will be created in the JAWS user settings folder. On the other hand if the file extension is jsi, the file will be in the Personal Settings folder of the JAWS user settings folder. Also remember that if you are going to specify a path in the file name, a back slash must be entered twice. For example, c:\\HighLevel\\NextLevel\\MyFileName. The value of this script is so that an event or action may be executed after a given number has been reached, for example if you set it to trigger on system startup each morning and you want to be reminded to run maintenance every 30 days this could be used to test against that numeric value and then reset the INI file to restart the cycle.


Function IncrementTheNumber ()
int TheNumber, ; What we read from the file.
int DefaultValue ; The number we'll get if there is no entry in the file.
let DefaultValue = 0
let TheNumber = IniReadInteger ("Sectionname", "keyname", DefaultValue, "C:\\MyFilename.ini")
SayString (""+IntToString (TheNumber))
Let TheNumber = TheNumber+1
IniWriteInteger ("sectionname", "keyname", TheNumber, "C:\\MyFilename.ini")
SayString ("The new number is "+IntToString (TheNumber))

Go Back