[jawsscripts] Re: Scripting question

  • From: John Martyn <johnrobertmartyn@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 6 Jan 2014 12:45:32 -0700

You can sometimes catch the clearing of a dialog or context with this using a 
global variable.
Function AutoFinishEvent()
If globalVar == 1 then
Let globalVar = 0
;do something
endif
EndFunction
Cheers,
John
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Octavian Rasnita
Sent: Monday, January 06, 2014 12:02 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Scripting question

No I can't because I don't know how to do that. :-)

Thank you for the idea though.

--Octavian

----- Original Message ----- 
From: "John Martyn" <johnrobertmartyn@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, January 06, 2014 7:01 PM
Subject: [jawsscripts] Re: Scripting question


> Can you create a global variable and off the context menu use the auto 
> finish event or something?
> John
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx 
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Octavian Rasnita
> Sent: Sunday, January 05, 2014 12:02 PM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: Scripting question
>
> No, unfortunately pause() doesn't help.
>
> It seems that no matter if I use pause() or delay(10), all the lines of 
> code after it are executed immediately and then the delay is done.
>
>
> --Octavian
>
> ----- Original Message ----- 
> From: "Sean Farrow" <sean.farrow@xxxxxxxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Thursday, January 02, 2014 3:29 PM
> Subject: [jawsscripts] Re: Scripting question
>
>
>> Hi,
>> Does replacing your Delay(5) with just a pause function change the
>> behaviour?
>> Hth
>> Sean.
>> -----Original Message-----
>> From: jawsscripts-bounce@xxxxxxxxxxxxx
>> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Octavian Rasnita
>> Sent: 01 January 2014 12:54
>> To: jawsscripts@xxxxxxxxxxxxx
>> Subject: [jawsscripts] Scripting question
>>
>> Hello and happy new year!
>>
>> I tried to create a script that speaks the number of messages in a folder
>> in
>> Windows Live Mail, but there are important things that don't work and I
>> don't know why.
>>
>> I have added a few comments in this script below. This script is 
>> activated
>> with the hotkey Insert+PageDown, which is useless in WLM:
>>
>> Script NumberOfMessagesInAFolder ()
>>    var String obj = GetWindowClass (GetFocus())  ;get the class of the
>> object with focus
>>
>>    ;press tab once if the focus is not in the tree view and get the new
>> object with focus
>>    If obj != "WLXDUI" Then
>>        {Tab}
>>        obj = GetWindowClass (GetFocus())
>>    EndIf
>>
>>    SpeechOff()   ;make Jaws not speak anything for the moment
>>    {Shift+F10}   ;open context menu
>>    {UpArrow}   ;select the properties menu element
>>    {Enter}   ;open the properties window
>>    delay(5)   ;allow some time for that window to open
>>    RouteJAWSToPc ()   ;activate Jaws cursor and move it in this 
>> properties
>> dialog window
>>    {PageDown}  ;move the Jaws cursor at the bottom of the properties
>> window
>>    {UpArrow}  ;move the Jaws cursor one line up, where appears the number
>> of messages
>>    var String nr_messages = GetLine ()  ;read the line and store it in
>> nr_messages var
>>    {Escape}  ;press escape and close the properties window
>>    SpeechOn()  ;activate speech
>>    SayString("test" + nr_messages)  ;say the line with the number of
>> messages
>> EndScript
>>
>> All well and fine, but the single problem is that it doesn't work. :-)
>>
>> If the currently selected folder is say "Deleted items", then pressing
>> Insert+Page Down to run this script just makes Jaws to speak "test 
>> Deleted
>> Items", so the GetLine() function is executed immediately and it reads 
>> the
>> name of the folder. (I added that string "test" + the number of messages
>> to
>> be sure that this line is executed).
>>
>> You've seen that I used delay(5) to wait for the properties window to 
>> open
>> for 0.5 seconds.
>> Even if I use a much longer time, Jaws waits that time without speaking
>> anything, but then it still speaks the name of the current folder.
>>
>> I thought that maybe GetLine() reads the line where the PC cursor is, and
>> not the Jaws cursor, but I read that this function  uses the active
>> cursor,
>> and the active cursor after JawsToPC is the Jaws cursor.
>> I even added another line that explicitly turns on the Jaws cursor, but 
>> it
>> worked the same.
>>
>> You've also seen that I added a line with {Escape} that closes the
>> properties window. I even commented that line to not close the properties
>> window, but still the folder name was spoken.
>>
>> Do you have any idea what is missing? Should I add another function that
>> specifies somehow that the active window is the properties dialog or
>> something like that?
>>
>> Thanks.
>>
>> --Octavian
>>
>> __________
>>
>> 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
>>
>
> __________
>
> 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
> 

__________�

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: