[jawsscripts] Re: Questions Regarding Allocated Data and Globals

  • From: Jonathan Cohn <jon.c.cohn@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Tue, 16 Feb 2016 22:09:18 -0500

Everything that is in a global variable stays around until JAWS restarts. If 
you have several things to keep track of, you could keep them in an array or 
dictionary  and clean the array on AutoStopEvent.

Also, for this reason, I generally put the Application Name as part of the 
Global so that other scripts will not mess with my variables that are global to 
the terminal emulator. 

global dictionary ReflectionTerminalProperties … Though of course if more than 
one window is open from your terminal emulator, then you will need to consider 
what happens when switching between the two emulators.

Best wishes,

Jonathan Cohn

On Feb 16, 2016, at 21:42, Paul Bonarrigo (Redacted sender "pjbonarrigo" for 
DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:


It has been a while since I did this. I have scripting code that reads table 
headings in a terminal emulator similar to the Jaws excel table title 
feature. My script speaks the heading title for each column in a table data 
row. Everything is hard coded as Constants;  what terminal page the table is 
on, the heading row, the heading names, their column start and end, etcetera. 
I simplified this code by storing heading text in a segmented string 
constant.  I dynamically parse a table heading row based on this segmented 
string and allocate a collection of nodes that stores each column heading 
name, row pixel start, and row pixel end.  I prototyped the emulator table in 
Notepad and it appears to work.  My question is the persistence of this 
allocated data.  I have not tried transitions yet.  If I alt tab to another 
app then come back I assume my scripts reload and all my globals reinitialize 
and all my allocated data is gone.  This would not be a problem to me as I 
can rec
reate the data.  My questions are: Does leaving my app using alt tab unload 
my scripts or does this just happen when I close the app?  If so, is all my 
allocated memory freed properly?Paul Bonarrigo



__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: