[jawsscripts] AW: [!!Mass Mail]Local/global variables.

  • From: IPDGmbH <jawsscripts@xxxxxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 26 May 2016 08:39:22 +0200

Hello,

as far as I see it, You will have to setup two global variables. Otherwise You 
would have one global overridden at every script call. Would look like 
something in psoydo code:

global string one, string two

void Fubnction FillVariables()
if (!one) then
one = GetYourContentHere()
sayString("1st variable has been filled")
elseif
two = GetYourContentHere()
sayString("2nd variable has been filled")
endIf
if (one&&two) then
sayString("one contains "+one+"and two contains "+two)
one = nothing
two = nothing
endIf
endFunction

script CompareContent()
FillVariables()
endScript

So You could press Your script key twice to get the content into two variables 
and a third time to hear its contents. Afterwards, both variables are reset for 
further use.

Hth

Richard

-----Ursprüngliche Nachricht-----
Von: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] ;
Im Auftrag von Steve S
Gesendet: Mittwoch, 25. Mai 2016 21:20
An: jawsscripts@xxxxxxxxxxxxx
Betreff: [!!Mass Mail][jawsscripts] Local/global variables.

Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable Hi. Forgive me for what could be a 
very basic question, but I have a = script where I want to store a string in a 
variable, then compare it the = next time the script gets run. For clarity, am 
I correct in thinking = that this must be a global variable?
Example:
1. I run the script with a keystroke.
2. The string at the cursor is stored in a variable.
3. I run the script again and want to compare that stored value.

If it's a local variable, it will be cleared each time you run the = script, so 
that's why I think it should be a global?  I may have = answered my own 
question here, but confirmation does breed confidence I = think , THX Steve.


__________�

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

__________�

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

Other related posts: