[jawsscripts] Re: QueueFunction in Jaws 2019/2020

  • From: "Steve Spamer" <stevespamer68@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 2 Apr 2020 18:52:40 +0100

Interesting Bob.  Well this is getting the meters from a window name, but 
it's not available anywhere else.  I guess I'll have to shelve the auto 
speaking for now, as it's just another mystery I can do without lol. Best 
Steve.

-----Original Message----- 
From: Bob
Sent: Thursday, April 2, 2020 6:13 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: QueueFunction in Jaws 2019/2020

I ran into a similar issue recently in 2020 where I was using 
scheduleFunction to watch for a value changing before announcing it was 
done.
The scheduled function never read a different value to the original despite 
the value updating. I can’t remember how I was getting the value but it may 
have been a window name or text.

Bob

On 2 Apr 2020, at 17:07, Steve Spamer <stevespamer68@xxxxxxxxx> wrote:

Hi folks.  I have a script that reads meter levels for a set number of 
times
using the QueueFunction.  In jaws 2019, all works as expected, but in jaws
2020 it's not.  For example, pressing any key in 2019 will stop the 
function
and jaws stops speaking, but in 2020 only the control key works.  Also, in
2019, while the function is running, any meter levels are constantly 
updated
as they change, but again, in 2020 jaws just repeats the initial level
encountered when initiating the script.

So, I'm not expecting anyone to know exactly what's going on, but is it
possible this function has changed or become somehow broken in jaws 2020?
I'll paste the script and function it calls below to give a bit more
clarity.  BTW, it's only the QueueFunction that seems to be the issue in 
the
script, but pasting the full script.  Thanks Steve.

Script MaxMetersRead ()
; assigned to F7
Var
   Int iCount

; tell braille that we are now in the meter display and which meter is
active
let giBrailleDisplayMode = cmMeterDisplay
let giMeterType = ctMAXMeter
Let iCount = 0
If IsGetArrangerDirect() Then
   {Control+Alt+Shift+V}
   Delay(2)
If (!giMetersAutoReadToggle) Then
; if the auto speaking of meters is turned off, then only speak the meters
once
   MAXMeters ()
   Return
Else
; if the auto speaking of meters is turned on, then speak until a key is
pressed or 200 has been reached
While iCount <200
   QueueFunction ("MAXMeters ()")
Let iCount = iCount + 1
EndWhile
EndIf
ElIf IsVisualizationWindowForNav() Then
If (!giMetersAutoReadToggle) Then
; if the auto speaking of meters is turned off, then only speak the meters
once
   MAXMeters ()
   Return
Else
; if the auto speaking of meters is turned on, then speak until a key is
pressed or 200 has been reached
While iCount <200
   QueueFunction ("MAXMeters ()")
Let iCount = iCount + 1
EndWhile
EndIf
Return
ElIf IsObjectEditorFXTabForNav() Then
If (GetControlID(GetFocus()) == idObjectEditorFXEQHigh) Then
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorFXHi +
msgObjectEditorTabAlreadySelected, OT_STRING)
Else
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorFXHi, OT_STRING)
SetFocus (FindDescendantWindow (GetRealWindow(GetFocus()),
idObjectEditorFXEQHigh))
EndIf
   Return
ElIf IsObjectEditorFadesTabForNav() Then
If (GetControlID(GetFocus()) == idObjectEditorFadesObjectLength) Then
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorFadesObjectLengthEdit +
msgObjectEditorTabAlreadySelected, OT_STRING)
Else
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorFadesObjectLengthEdit,
OT_STRING)
SetFocus (FindDescendantWindow (GetRealWindow(GetFocus()),
idObjectEditorFadesObjectLength))
EndIf
   Return
ElIf IsObjectEditorTimepitchTabForNav() Then
If (GetControlID(GetFocus()) == idObjectEditorTimepitchStretchFactor) Then
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorTimePitchStretchFactorEdit 
+
msgObjectEditorTabAlreadySelected, OT_STRING)
Else
   SayUsingVoice (VCTX_MESSAGE, strObjectEditorTimePitchStretchFactorEdit,
OT_STRING)
SetFocus (FindDescendantWindow (GetRealWindow(GetFocus()),
idObjectEditorTimepitchStretchFactor))
EndIf
   Return
ElIf IsMidiObjectEditorMainForNav() Then
If (GetControlID(GetFocus()) == idMIDIObjectEditorTranspose) Then
   SayUsingVoice (VCTX_MESSAGE, strMidiObjectEditorTranspose +
msgObjectEditorTabAlreadySelected, OT_STRING)
Else
   SayUsingVoice (VCTX_MESSAGE, strMidiObjectEditorTranspose, OT_STRING)
SetFocus (FindDescendantWindow (GetRealWindow(GetFocus()),
idMIDIObjectEditorTranspose))
EndIf
   Return
Else
   SayCurrentScriptKeyLabel()
EndIf
EndScript

String Function MAXMeters ()
Var
   String strMaxMeters

Let strMaxMeters = GetWindowName (GetDockerVisualization ())
   Let strMaxMeters = StringSegment (strMaxMeters, strVerticalBar, 3)
If (giBrailleMode == 0) Then
; if a braille display isn't connected
SayUsingVoice (VCTX_MESSAGE, strMaxMeters, OT_STRING)
   Else
; if a braille display is connected
   Return strMaxMeters
EndIf
EndFunction

Visit the samplitude Access website. Jaws scripts for pro recording with
Samplitude in Windows: www.samplitudeaccess.org.uk

__________�

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: