Thanks guys. I've been working in C too long. -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Paul Bonarrigo (Redacted sender "pjbonarrigo@xxxxxxxxx" for DMARC) Sent: Wednesday, December 03, 2014 12:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: jawsscripts Digest V2 #234 Regarding passing arrays ByRef. I used the index [1] and it worked. Index[0] did not work.I tried it in Jaws 13. void function x(StringArray ByRef sArray) LET sArray[1] = "hello" EndFunction On Tuesday, December 2, 2014 11:15 PM, FreeLists Mailing List Manager <ecartis@xxxxxxxxxxxxx> wrote:  jawsscripts Digest   Tue, 02 Dec 2014   Volume: 02 Issue: 234 In This Issue:       [jawsscripts] script crashing Jaws v16       [jawsscripts] Re: script crashing Jaws v16       [jawsscripts] Arrays       [jawsscripts] Re: Arrays       [jawsscripts] Re: Arrays ---------------------------------------------------------------------- From: "Philip Hall" <p.hall.eml1@xxxxxxxxx> Subject: [jawsscripts] script crashing Jaws v16 Date: Tue, 2 Dec 2014 21:42:56 -0500 Hi. A while ago, I through together a script to toggle check boxes on a web page. I mostly use it for deleting Gmail messages on the Gmail web page in the basic html view. The script works just fine with jaws 14, and 15, but crashes jaws 16. It doesn't crash jaws immediately, but after about 50 to 70 check boxes have been toggled. I wrote it as a function and just call it from a script inserted into the default.jss script. The function is below. there is extra code for debugging. ; toggle check box ;mostly used to toggle check boxes on Gmail to delete trash. ; key used is JawsKey+ctrl+` Function FToggleCheckBox () var int maxCounter, int counter, int curPercentage, int speechIsOff, int CheckedCheckboxes, int TotalTableRowCount, int TableRowCount, int BeepCount ;used to beep to keep the user notified let CheckedCheckboxes = 1 ; what to search checked or not checked checkboxes let counter = 0 let maxCounter = 1000 let speechIsOff = IsSpeechOff () let BeepCount = 0 ; beep after every 10 check boxes MoveToFirstTable ()    ;moves to the first table on the page let curPercentage = GetDocumentPercentage () let TotalTableRowCount = GetTableRowCount () ;total number of rows let TableRowCount = 0 if (speechIsOff == 0) then SpeechOff () endIf while (counter < maxCounter && curPercentage <= GetDocumentPercentage () && TableRowCount <= TotalTableRowCount ) let counter = counter + 1 ;let curPercentage = GetDocumentPercentage () let TableRowCount = TableRowCount+1 PerformScriptByName ("VirtualSpacebar") ;toggle check box delay (1) ;SayObjectTypeAndText () if ( BeepCount <= 8 ) Let BeepCount = BeepCount + 1 else SpeechOn () SayInteger (TableRowCount ) ;speak row count every 10 check boxes SpeechOff () BeepCount = 0 Beep () EndIf MoveToNextCheckbox () delay (1) endWhile if (speechIsOff == 0) then SpeechOn () endIf ;delay(1) ;SayObjectTypeAndText () ;&& ControlIsChecked () != CheckedCheckboxes EndFunction Phil ------------------------------ From: "Jim Snowbarger" <snowman@xxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: script crashing Jaws v16 Date: Tue, 2 Dec 2014 20:57:21 -0600 Personally, I think JAWS 16 currently has some serious crash vulnerabilities. I have one computer on which I can't keep it from eventually going through it's crash, recover, and call FS phase. And, of course, They're sorry I'm having so much trouble. So, cross your fingers, and hope for an effective update. -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Philip Hall Sent: Tuesday, December 02, 2014 8:43 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] script crashing Jaws v16 Hi. A while ago, I through together a script to toggle check boxes on a web page. I mostly use it for deleting Gmail messages on the Gmail web page in the basic html view. The script works just fine with jaws 14, and 15, but crashes jaws 16. It doesn't crash jaws immediately, but after about 50 to 70 check boxes have been toggled. I wrote it as a function and just call it from a script inserted into the default.jss script. The function is below. there is extra code for debugging. ; toggle check box ;mostly used to toggle check boxes on Gmail to delete trash. ; key used is JawsKey+ctrl+` Function FToggleCheckBox () var int maxCounter, int counter, int curPercentage, int speechIsOff, int CheckedCheckboxes, int TotalTableRowCount, int TableRowCount, int BeepCount ;used to beep to keep the user notified let CheckedCheckboxes = 1 ; what to search checked or not checked checkboxes let counter = 0 let maxCounter = 1000 let speechIsOff = IsSpeechOff () let BeepCount = 0 ; beep after every 10 check boxes MoveToFirstTable ()    ;moves to the first table on the page let curPercentage = GetDocumentPercentage () let TotalTableRowCount = GetTableRowCount () ;total number of rows let TableRowCount = 0 if (speechIsOff == 0) then SpeechOff () endIf while (counter < maxCounter && curPercentage <= GetDocumentPercentage () && TableRowCount <= TotalTableRowCount ) let counter = counter + 1 ;let curPercentage = GetDocumentPercentage () let TableRowCount = TableRowCount+1 PerformScriptByName ("VirtualSpacebar") ;toggle check box delay (1) ;SayObjectTypeAndText () if ( BeepCount <= 8 ) Let BeepCount = BeepCount + 1 else SpeechOn () SayInteger (TableRowCount ) ;speak row count every 10 check boxes SpeechOff () BeepCount = 0 Beep () EndIf MoveToNextCheckbox () delay (1) endWhile if (speechIsOff == 0) then SpeechOn () endIf ;delay(1) ;SayObjectTypeAndText () ;&& ControlIsChecked () != CheckedCheckboxes EndFunction Phil __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ From: "Jim Snowbarger" <snowman@xxxxxxxxxxxxxxx> Subject: [jawsscripts] Arrays Date: Tue, 2 Dec 2014 21:17:50 -0600 If you want to call a function, and have it generate an array of data and return it back to you, what is the right way to do that? According to the script manager, it seems that a function can not have an array data type, so apparently you can't return an array. Is that correct? So, do you need to pass the array in by reference, and modify it inside the function? If you do that, I presume the array needs to actualy be created with the "new" statement out in the calling function. For example: Var stringArray s S = new stringArray[30] myFunc(s) But, in this example, you would need to be able to declare the function parameter as a byRef array. And, According to the script manager, a parameter can not be of an array type. But, the following fragment of jibberish will compile, but does not work. void function x(stringArray byref s) s[0] = "hello" EndFunction Script test () var  stringArray a SayString ("beep") Let a = new stringArray[5] x(a) SayString (a[0]) EndScript Compiles great, but doesn't speak the word, hello. The following also compiles, and it doesn't work either! stringArray function x() var  stringArray s s = new stringArray[5] s[0] = "hello" return(s) EndFunction Script test () var  stringArray a a = x() SayString (a[0]) EndScript Can somebody set me straight here? How is this supposed to be done? Thanks. ------------------------------ Date: Tue, 2 Dec 2014 19:16:28 -0900 Subject: [jawsscripts] Re: Arrays From: Soronel Haetir <soronel.haetir@xxxxxxxxx> I thought I read that arrays are already passed by reference even without the byref decorator. On 12/2/14, Jim Snowbarger <snowman@xxxxxxxxxxxxxxx> wrote: > If you want to call a function, and have it generate an array of data > and return it back to you, what is the right way to do that? > According to the script manager, it seems that a function can not have > an array data type, so apparently you can't return an array. Is that > correct? > > > > So, do you need to pass the array in by reference, and modify it > inside the function? > > If you do that, I presume the array needs to actualy be created with > the "new" statement out in the calling function. For example: > > > > Var stringArray s > > S = new stringArray[30] > > myFunc(s) > > > > But, in this example, you would need to be able to declare the > function parameter as a byRef array. And, > > According to the script manager, a parameter can not be of an array type. > > > > But, the following fragment of jibberish will compile, but does not work. > > > > void function x(stringArray byref s) > > s[0] = "hello" > > EndFunction > > > > Script test () > > var > >  stringArray a > > SayString ("beep") > > Let a = new stringArray[5] > > x(a) > > SayString (a[0]) > > EndScript > > > > Compiles great, but doesn't speak the word, hello. > > > > The following also compiles, and it doesn't work either! > > > > stringArray function x() > > var > >  stringArray s > > > > s = new stringArray[5] > > s[0] = "hello" > > return(s) > > EndFunction > > > > Script test () > > var > >  stringArray a > > a = x() > > SayString (a[0]) > > EndScript > > > > Can somebody set me straight here? How is this supposed to be done? > > Thanks. > > > > > > > > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > -- Soronel Haetir soronel.haetir@xxxxxxxxx ------------------------------ Date: Tue, 2 Dec 2014 23:17:57 -0500 From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: Arrays Works for me if I index arrays starting at 1 instead of 0. I always mix that up... On Tue, Dec 02, 2014 at 09:17:50PM -0600, Jim Snowbarger wrote: If you want to call a function, and have it generate an array of data and return it back to you, what is the right way to do that? According to the script manager, it seems that a function can not have an array data type, so apparently you can't return an array. Is that correct? So, do you need to pass the array in by reference, and modify it inside the function? If you do that, I presume the array needs to actualy be created with the "new" statement out in the calling function. For example: Var stringArray s S = new stringArray[30] myFunc(s) But, in this example, you would need to be able to declare the function parameter as a byRef array. And, According to the script manager, a parameter can not be of an array type. But, the following fragment of jibberish will compile, but does not work. void function x(stringArray byref s) s[0] = "hello" EndFunction Script test () var  stringArray a SayString ("beep") Let a = new stringArray[5] x(a) SayString (a[0]) EndScript Compiles great, but doesn't speak the word, hello. The following also compiles, and it doesn't work either! stringArray function x() var  stringArray s s = new stringArray[5] s[0] = "hello" return(s) EndFunction Script test () var  stringArray a a = x() SayString (a[0]) EndScript Can somebody set me straight here? How is this supposed to be done? Thanks. __________??? View the list's information and change your settings at //www.freelists.org/list/jawsscripts -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller ------------------------------ End of jawsscripts Digest V2 #234 ********************************* __________� 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