[jawsscripts] Re: Share data between scripts

  • From: The dark count <darkcount1@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Mon, 25 Feb 2013 17:18:30 -0800

I am not Paul, but yes as long as jfw does not get shut down your 
variables will persist.
Meaning they will retain the data you stored in them unless you redefine 
them.



so if I say
globals
string msg1,
string msg2

And in one of my scripts I define the two global variables thus:
let msg1 ="wrong number"
Let msg2= "right number"

I can then use the two in what ever script for that application until 
the user kills jaws for the day, or restarts the computer.
Or until I decide to rename either of those msg variables in another script.

hth

D C


On 2/25/2013 4:55 PM, Nguyen Van Dung wrote:
> Hi Paul
> I used global variable but just only for functions in a same script, not
> between some scripts because as I known scripts are invoked by key
> combinations so I am not sure that global variable value is kept between
> scripts.
> I will try it soon.
> Thank you for your help.
> Regards,
> Dung Nguyen.
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Paul Magill
> Sent: Monday, February 25, 2013 5:32 PM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: Share data between scripts
>
> Hi Dung,
>
> I am not clear on what you mean here, so if what I suggest is not what you
> needed, please ask again with a little more description.
>
> Global variables can store data between running of scripts, and the data
> remains stored in them while Jaws is active.
>
> Near the top of the script file:
>
> Globals
> string G_StringData,
> int G_IntegerData
>
> Script SampleScript1 ()
> ; the lines of actions that need doing in one of your scripts
>
>
> LET G_StringData = "the result of your actions"
> LET G_IntegerData = 99 ; sample result of actions
> EndScript
>
> Script SampleScript2 ()
> SayString (G_StringData) ; or any other action you want with the data from
> the first script
> SayInteger (G_IntegerData)
> EndScript
>
> Regards,
> Paul from Australia
>
> ----- Original Message -----
> From: "Nguyen Van Dung"<dungnv1984@xxxxxxxxx>
>
>
> Hi all
> I have some scripts and combine  them with some different eksykeys. These
> scripts need to use a same data (the next script uses output of previous
> script).
> At the moment, I am concerring to use file to store sharee data.
> Does anyone know if we can store  the shared data in the memory for my
> scripts?
> Thank all.
> Regards,
> Dung Nguyen.
>
> __________�
>
> 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
>
>

-- 
Thanks,

D C

__________�

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

Other related posts: