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

  • From: "Steve S" <stevespamer68@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 27 May 2016 11:03:52 +0100

Let strLocation = GetLocation()
Let nEndTrack = 0

If (giZoomMode) Then

        SaveCursor()
    JAWSCursor()
;    RouteJAWSToInvisible ()
    If (giStartTrack == 0) Then
; we grab the value of the starting track
        Let giStartTrack = StringToInt (GetWord())
; if we don't find the track number
        If (giStartTrack == 0) Then
            Say (msgStartTrackError, OT_STRING, TRUE)
        Else
            LeftMouseButton()
            Say (msgStartingTrack + strSpace + GetWord(), OT_STRING, TRUE)
        EndIf
; the starting track is set, so get the ending track
    Else
        Let nEndTrack = StringToInt (GetWord())
        If (nEndTrack == 0) Then
        Say (msgEndTrackError, OT_STRING, TRUE)
    Else
        ShiftLeftMouseClick ()
        Say (msgEndingTrack + strSpace + GetWord(), OT_STRING, TRUE)

; reset giStartTrack back to 0
        Let giStartTrack = 0
    EndIf
EndIf

RestoreCursor()
    EndIf
EndScript

THX Steve.

-----Original Message----- 
From: IPDGmbH
Sent: Thursday, May 26, 2016 7:39 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] AW: [!!Mass Mail]Local/global variables.

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 ;

__________�

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

Other related posts: