I love the Jaws dialog and have used segmented text. Although Jaws dialog can show entries in Alpha order, it will return the segmented index. i.e. "Zee, Why, Aye" displays Aye as alphabetically first but will return a 3. I just use the index returned and get the segmented text related to it. Paul B ________________________________ From: FreeLists Mailing List Manager <ecartis@xxxxxxxxxxxxx> To: jawsscripts digest users <ecartis@xxxxxxxxxxxxx> Sent: Thursday, March 29, 2012 10:11 PM Subject: jawsscripts Digest V6 #69 jawsscripts Digest   Thu, 29 Mar 2012   Volume: 06 Issue: 069 In This Issue:       [jawsscripts] Re: JAWS script how you alphabetize items or       [jawsscripts] Re: JAWS script how you alphabetize items or       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] Re: JAWS script how you alphabetize items or       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] TypeKey       [jawsscripts] Re: TypeKey       [jawsscripts] Re: TypeKey       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] Re: TypeKey       [jawsscripts] Re: TypeKey       [jawsscripts] Re: JAWS script how you alphabetize items or c       [jawsscripts] Re: TypeKey       [jawsscripts] Re: TypeKey ---------------------------------------------------------------------- Date: Thu, 29 Mar 2012 01:29:28 -0400 From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or Would you be able to provide a function that demonstrates this problem? Apologies if I missed that in previous posts in this thread, but looking again, I see descriptions of the problem but not an actual code block demonstrating it. On Wed, Mar 28, 2012 at 09:32:06PM -0700, John Martyn wrote: Nope, it acts up on this. Try it some time. Make a list segmented and make it order the list. Then speak the integer I actually picks. What is funny is that it will speak a much different value than what you selected, however, if you string segment on your string and reference the variable I as the dialog, it works just fine. I know this is a really weird bug. Perhaps this is a JAWS 13 thing? I'll test it on JAWS 12 and see if it happens. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 ------------------------------ Date: Thu, 29 Mar 2012 01:31:02 -0400 From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or The StringCompare() function is probably better for comparing strings for less/greater/equal. StringToInt does not help for this unless the strings are, or begin with, digits. But yes, the comparison operators do a sort of comparison. The precise nature of this comparison is a bit interesting and is different by default in JAWS 13 than in JAWS 12 and older. On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: JAWS 12 does the same thing. But there is hope. I can resort the list containing the item name and item number just like what I did with the segment1 and segment2 function I put out there. I could write this one too One other thing I noticed is that you can compare string values to see what is higher. The character A being the lowest and Z being the highest. Try it out. I just put ABB and ABC in the comparison below. if "abb" < "abc" then SayString("yes") endif Interesting that you can compare strings for values. I guess string to int isn't needed. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 ------------------------------ From: "John Martyn" <johnrobertmartyn@xxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Date: Wed, 28 Mar 2012 23:21:48 -0700 Interesting news. I wrote a function that kind of works, at least alphabetizing the list, now I need to get the numbers to match up. I'll have to test this with JAWS 12, but doesn't this string at the top make JAWS 13 act more like JAWS 12 and below with string comparisons? ;#pragma StringComparison partial John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 10:31 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare The StringCompare() function is probably better for comparing strings for less/greater/equal. StringToInt does not help for this unless the strings are, or begin with, digits. But yes, the comparison operators do a sort of comparison. The precise nature of this comparison is a bit interesting and is different by default in JAWS 13 than in JAWS 12 and older. On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: JAWS 12 does the same thing. But there is hope. I can resort the list containing the item name and item number just like what I did with the segment1 and segment2 function I put out there. I could write this one too One other thing I noticed is that you can compare string values to see what is higher. The character A being the lowest and Z being the highest. Try it out. I just put ABB and ABC in the comparison below. if "abb" < "abc" then SayString("yes") endif Interesting that you can compare strings for values. I guess string to int isn't needed. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 __________o? View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ From: "John Martyn" <johnrobertmartyn@xxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Date: Wed, 28 Mar 2012 23:23:50 -0700 I'll email the code block tomorrow since I am going to sleep now. I know it's a bug in the actual script interface, but I have figured out how to alphabetize the lists before they hit the dialog. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 10:29 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Would you be able to provide a function that demonstrates this problem? Apologies if I missed that in previous posts in this thread, but looking again, I see descriptions of the problem but not an actual code block demonstrating it. On Wed, Mar 28, 2012 at 09:32:06PM -0700, John Martyn wrote: Nope, it acts up on this. Try it some time. Make a list segmented and make it order the list. Then speak the integer I actually picks. What is funny is that it will speak a much different value than what you selected, however, if you string segment on your string and reference the variable I as the dialog, it works just fine. I know this is a really weird bug. Perhaps this is a JAWS 13 thing? I'll test it on JAWS 12 and see if it happens. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 __________o? View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ Date: Thu, 29 Mar 2012 03:35:52 -0400 From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or Yes, that line makes JAWS 13's operators work for comparisons like they did in JAWS 12 and before. I finally broke down and wrote a function to test this myself. I thus verified why it's happening: In the DlgSelectItemInList call, the parameter after nSort, the index to start on, represents how far from the top of the list on screen to start, not how far from the start of the string. This may and may not be by design, but it is how the function works. My function: void function dsilTest() var string segs = "dog|cat|lion|bear|tiger|rhyno|horse" var int i = 1 while i    ; The selected item is the ith from the top on screen, not the ith from the start of the string.    i = DlgSelectItemInList(segs, "Select an Animal", True, i)    sayInteger(i) endWhile endFunction On Wed, Mar 28, 2012 at 11:21:48PM -0700, John Martyn wrote: Interesting news. I wrote a function that kind of works, at least alphabetizing the list, now I need to get the numbers to match up. I'll have to test this with JAWS 12, but doesn't this string at the top make JAWS 13 act more like JAWS 12 and below with string comparisons? ;#pragma StringComparison partial John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 10:31 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare The StringCompare() function is probably better for comparing strings for less/greater/equal. StringToInt does not help for this unless the strings are, or begin with, digits. But yes, the comparison operators do a sort of comparison. The precise nature of this comparison is a bit interesting and is different by default in JAWS 13 than in JAWS 12 and older. On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: JAWS 12 does the same thing. But there is hope. I can resort the list containing the item name and item number just like what I did with the segment1 and segment2 function I put out there. I could write this one too One other thing I noticed is that you can compare string values to see what is higher. The character A being the lowest and Z being the highest. Try it out. I just put ABB and ABC in the comparison below. if "abb" < "abc" then SayString("yes") endif Interesting that you can compare strings for values. I guess string to int isn't needed. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 __________o? 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 -- 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 ------------------------------ From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Date: Thu, 29 Mar 2012 19:53:47 +1100 Hi Doug. Are you feeling up to specifying for us, what the differences exactly are, that you mention below, between 12 and 13, as regards differing methodology of their string comparisons? and/or how you discovered they were different? or is that a stupid question. If I might answer it an alternate way than bugging you about it, maybe indicate how/where you learned? ----- Original Message ----- From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, March 29, 2012 4:31 PM Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare > The StringCompare() function is probably better for comparing strings > for less/greater/equal. StringToInt does not help for this unless the > strings are, or begin with, digits. But yes, the comparison operators > do a sort of comparison. The precise nature of this comparison is a > bit interesting and is different by default in JAWS 13 than in JAWS 12 > and older. > > On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: > JAWS 12 does the same thing. But there is hope. I can resort the list > containing the item name and item number just like what I did with the > segment1 and segment2 function I put out there. I could write this one too > One other thing I noticed is that you can compare string values to see > what > is higher. The character A being the lowest and Z being the highest. Try > it > out. I just put ABB and ABC in the comparison below. > if "abb" < "abc" then > SayString("yes") > endif > Interesting that you can compare strings for values. I guess string to int > isn't needed. > John > -----Original Message----- > From: jawsscripts-bounce@xxxxxxxxxxxxx > [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee > Sent: Wednesday, March 28, 2012 9:03 PM > To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: JAWS script how you alphabetize items or > compare > > We might have to look at your actual code to figure this one out then. > I don't think DlgSelectItemInList() actually reorders the items in the > segmented string you pass to it, so item 23 should be the 23rd item in the > segmented list, not the 23rd item down on screen when the list is sorted. > > If you're saying DlgSelectItemInList really is reordering things in your > segmented string, which would surprise me greatly, just copy it somewhere > and then copy it back just before each DlgSelectItemInList call. > > Does that help? > > On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: > I know, that was just an example. The actual code is with the 0 being a 1 > to > sort it. But it doesn't seem to focus the correct item when it returns to > the while statement. > When I sort it, the I gives me a value of 23 if I pick the third item in > the > list. When I is set, I make it focus back on the variable I, but it > actually > goes to the 23 item in the list. I hope I am explaining this as best as I > can. It seems to focus the item, the rearrange the list after. That's what > I'm referring to. > John > > -----Original Message----- > From: jawsscripts-bounce@xxxxxxxxxxxxx > [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee > Sent: Wednesday, March 28, 2012 8:05 PM > To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: JAWS script how you alphabetize items or > compare > > You're passing 0 in that last call, indicating you don't want the list > sorted that time. If you sort it the first time and you want i to be valid > for another call, you'll need to sort it the second and subsequent times > also. Otherwise, the lists themselves are not equal, and item 3 is no > longer > what item 3 was before. > > On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: > I think I found a bug in the jaws script. When you DLGSelectItemFromList > and > arrange it in alphabetic order, it gives you the correct value when you > assign it to a variable such as int I, but if you remain in the function > in > a loop, it doesn't retain which index you are to properly set you on. For > example say I have the following segmented string. > Let someSegment = "dogs|cats" > > Naturally if you don't alphabetize it in the function, dogs will come up > first unless you put the flag of 1 in the built in function. Now, you can > string segment it to get the right information, but when it calls another > function that returns back to this dialog window, I wanted the previous > selection to be active. The result,I = DLGSelectDialog (someSegment, > "|",0,i) > > The I at the end of that function should return you to the previous item > in > the list with focus. But it doesn't return you to the same item if you > sort > the list inside the function call. > > This bug is annoying so I have to find a way around it. > > If I can alphabetize the string segment before it goes into the dialog, > that > would work, but how do you compare two words to be alphabetical? > > I can think of a long drawn out process that will drive me insane, but > possible. > > Is there any built in function that will help me out possibly? > > Thanks, > > John Martyn > > > > __________??? > > 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 __________o?> > 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 > > -- > 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 __________o?> > 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 > > -- > 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 > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > ------------------------------ Date: Thu, 29 Mar 2012 09:11:37 -0300 From: Andrew Hart <ahart@xxxxxxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Geoff, Up until version 13, JAWS Script is used non-standard string comparison operators. By non-standard, I mean that no other programming language (that I am aware of at least) has string comparison operators like JAWS Script. The issue is the following. In JAWS versions prior to version 13, the String Comparison operators do not take the lengths of the strings into account. It makes the comparison based on the shorter of the two strings being compared. For example, "hell"=="hello" is true (1) in JAWS script, but the two strings are clearly not the same since they are different words. The same is true of the other string comparison operators, <, <=, >, >= and !=. So, in order to do a proper string comparison in JAWS, it is necessary to write code like If (StringLength(a)==StringLength(b) && a<b) || (StringLength(a)<StringLength(b) && a==b) Then SayString("a comes before b") Else SayString("a is the same as b or a comes after b") endIf Ok. I hope I've got that logic right, as I'm just tossing this out off the top of my head. But yuck! I'm sure that's why FS introduced the StringCompare function. Most languages have a string comparison function similar to StringCompare. Btw, imho the reason FS made the operators work like this was that in the early days scripters were mainly comparing strings with window titles and the like and the most common operation was to check that the first part of the window title matched a certain string. Also, the scripting/macro language was more limited in what it could do compared to recent incarnations. So, it probably seemed like a good idea at the time and made scripting much easier and more efficient for scripters. However, window title usage became more varied later on and so this strategy became less effective, plus it also influenced the entire language. In JAWS 13, FS have refactored the string comparison operators so that they now work as any programmer would expect them to work. That example if statement I wrote above can now be written simply as If a<b then ... endif in JAWS 13. The ;#pragma String Comparison partial compiler directive instructs the script compiler to use the old pre JAWS 13.0 definitions of the string comparison operators. It's a compatibility directive. This enables you to write scripts that run on both JAWS 13 and older versions or to take scripts from JAWS 12 that depend on the old string operators and allow them to run on JAWS 13 without having to rewrite them. If you always use the StringCompare function to compare strings, then your scripts should run on both JAWS 13 and older versions as intended without the need to include the compiler directive. This difference has been reported on this list since JAWS 13.0 was released last year and there is some documentation hidden away on the FS site describing various changes that have been made to JAWS Script in versions 11.0 and 13.0 too. Hth, Andrew.    On 29/03/2012 5:53 AM, Geoff Chapman wrote: > Hi Doug. Are you feeling up to specifying for us, what the differences > exactly are, that you mention below, between 12 and 13, as regards differing > methodology of their string comparisons? > > and/or how you discovered they were different? > > or is that a stupid question. If I might answer it an alternate way than > bugging you about it, maybe indicate how/where you learned? > > ----- Original Message ----- > From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx> > To: <jawsscripts@xxxxxxxxxxxxx> > Sent: Thursday, March 29, 2012 4:31 PM > Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare > > >> The StringCompare() function is probably better for comparing strings >> for less/greater/equal. StringToInt does not help for this unless the >> strings are, or begin with, digits. But yes, the comparison operators >> do a sort of comparison. The precise nature of this comparison is a >> bit interesting and is different by default in JAWS 13 than in JAWS 12 >> and older. >> >> On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: >> JAWS 12 does the same thing. But there is hope. I can resort the list >> containing the item name and item number just like what I did with the >> segment1 and segment2 function I put out there. I could write this one too >> One other thing I noticed is that you can compare string values to see >> what >> is higher. The character A being the lowest and Z being the highest. Try >> it >> out. I just put ABB and ABC in the comparison below. >> if "abb" < "abc" then >> SayString("yes") >> endif >> Interesting that you can compare strings for values. I guess string to int >> isn't needed. >> John >> -----Original Message----- >> From: jawsscripts-bounce@xxxxxxxxxxxxx >> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee >> Sent: Wednesday, March 28, 2012 9:03 PM >> To: jawsscripts@xxxxxxxxxxxxx >> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or >> compare >> >> We might have to look at your actual code to figure this one out then. >> I don't think DlgSelectItemInList() actually reorders the items in the >> segmented string you pass to it, so item 23 should be the 23rd item in the >> segmented list, not the 23rd item down on screen when the list is sorted. >> >> If you're saying DlgSelectItemInList really is reordering things in your >> segmented string, which would surprise me greatly, just copy it somewhere >> and then copy it back just before each DlgSelectItemInList call. >> >> Does that help? >> >> On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: >> I know, that was just an example. The actual code is with the 0 being a 1 >> to >> sort it. But it doesn't seem to focus the correct item when it returns to >> the while statement. >> When I sort it, the I gives me a value of 23 if I pick the third item in >> the >> list. When I is set, I make it focus back on the variable I, but it >> actually >> goes to the 23 item in the list. I hope I am explaining this as best as I >> can. It seems to focus the item, the rearrange the list after. That's what >> I'm referring to. >> John >> >> -----Original Message----- >> From: jawsscripts-bounce@xxxxxxxxxxxxx >> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee >> Sent: Wednesday, March 28, 2012 8:05 PM >> To: jawsscripts@xxxxxxxxxxxxx >> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or >> compare >> >> You're passing 0 in that last call, indicating you don't want the list >> sorted that time. If you sort it the first time and you want i to be valid >> for another call, you'll need to sort it the second and subsequent times >> also. Otherwise, the lists themselves are not equal, and item 3 is no >> longer >> what item 3 was before. >> >> On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: >> I think I found a bug in the jaws script. When you DLGSelectItemFromList >> and >> arrange it in alphabetic order, it gives you the correct value when you >> assign it to a variable such as int I, but if you remain in the function >> in >> a loop, it doesn't retain which index you are to properly set you on. For >> example say I have the following segmented string. >> Let someSegment = "dogs|cats" >> >> Naturally if you don't alphabetize it in the function, dogs will come up >> first unless you put the flag of 1 in the built in function. Now, you can >> string segment it to get the right information, but when it calls another >> function that returns back to this dialog window, I wanted the previous >> selection to be active. The result,I = DLGSelectDialog (someSegment, >> "|",0,i) >> >> The I at the end of that function should return you to the previous item >> in >> the list with focus. But it doesn't return you to the same item if you >> sort >> the list inside the function call. >> >> This bug is annoying so I have to find a way around it. >> >> If I can alphabetize the string segment before it goes into the dialog, >> that >> would work, but how do you compare two words to be alphabetical? >> >> I can think of a long drawn out process that will drive me insane, but >> possible. >> >> Is there any built in function that will help me out possibly? >> >> Thanks, >> >> John Martyn >> >> >> >> __________??? >> >> 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 __________o?>> >> 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 >> >> -- >> 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 __________o?>> >> 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 >> >> -- >> 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 >> __________� >> >> 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 > > > ------------------------------ From: "Bissett, Tom" <tom.bissett@xxxxxxx> Date: Thu, 29 Mar 2012 14:06:58 -0400 Subject: [jawsscripts] TypeKey Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey but I need to send a combination "control+end" and I do not see how I can do that. Typestring isn't doing it either. TypeKey ("0x03f",1 ) works in sending a single keystroke but typestring("control+end") isn't doing it. Any suggestions? Thanks Tom Bisset ------------------------------ Date: Thu, 29 Mar 2012 11:38:46 -0700 Subject: [jawsscripts] Re: TypeKey From: Jackie McBride <abletec@xxxxxxxxx> Well, Tom, control+end is actually your jawsBottomOfFile script in the default.jss, & I would modify that if possible. If not, then I advise thus: 1) include common.jsm, which contains the following    cksControlEnd = "Control+End", (or u could make your own, but why?) 2) Your typeKey then looks like typeKey(cksControlEnd) HTH. On 3/29/12, Bissett, Tom <tom.bissett@xxxxxxx> wrote: > Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey > but I need to send a combination "control+end" and I do not see how I can do > that. Typestring isn't doing it either. > TypeKey ("0x03f",1 ) works in sending a single keystroke but > typestring("control+end") isn't doing it. > Any suggestions? > Thanks > Tom Bisset > __________� > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > -- Blame the computer--why not? It can't defend itself & occasionally might even be the culprit Jackie McBride Ask Me Computer Questions at: www.pcinquirer.com Jaws Scripting training materials: www.screenreaderscripting.com homePage: www.abletec.serverheaven.net ------------------------------ From: "Bissett, Tom" <tom.bissett@xxxxxxx> Date: Thu, 29 Mar 2012 14:50:44 -0400 Subject: [jawsscripts] Re: TypeKey Thanks Jackie, the typeKey(cksControlEnd) does the trick. I need to look more closely at the JSM files. I didn't even think to look there. I see there are other useful goodies in there. Regards Tom Bisset -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jackie McBride Sent: March 29, 2012 2:39 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: TypeKey Well, Tom, control+end is actually your jawsBottomOfFile script in the default.jss, & I would modify that if possible. If not, then I advise thus: 1) include common.jsm, which contains the following    cksControlEnd = "Control+End", (or u could make your own, but why?) 2) Your typeKey then looks like typeKey(cksControlEnd) HTH. On 3/29/12, Bissett, Tom <tom.bissett@xxxxxxx> wrote: > Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey > but I need to send a combination "control+end" and I do not see how I can do > that. Typestring isn't doing it either. > TypeKey ("0x03f",1 ) works in sending a single keystroke but > typestring("control+end") isn't doing it. > Any suggestions? > Thanks > Tom Bisset > __________ > > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > > -- Blame the computer--why not? It can't defend itself & occasionally might even be the culprit Jackie McBride Ask Me Computer Questions at: www.pcinquirer.com Jaws Scripting training materials: www.screenreaderscripting.com homePage: www.abletec.serverheaven.net __________ View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ From: "John Martyn" <johnrobertmartyn@xxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Date: Thu, 29 Mar 2012 13:22:51 -0700 I think the easiest way to overcome this is just do a string segment of the segment in question and I, then iterate to find the string that matches it in a while statement and use the safety count to determine what line you were on. At least I think that would work. It wouldn't be exact for duplicate items in the list thus bring you to the first selection of the same named items, but this is better than nothing. Also I am really thinking about aborting the alphabetizing function since the string comparisons differ so much among JAWS versions. It's not perfect, but it should work. I'll write back if my silly idea works. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Thursday, March 29, 2012 12:36 AM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Yes, that line makes JAWS 13's operators work for comparisons like they did in JAWS 12 and before. I finally broke down and wrote a function to test this myself. I thus verified why it's happening: In the DlgSelectItemInList call, the parameter after nSort, the index to start on, represents how far from the top of the list on screen to start, not how far from the start of the string. This may and may not be by design, but it is how the function works. My function: void function dsilTest() var string segs = "dog|cat|lion|bear|tiger|rhyno|horse" var int i = 1 while i    ; The selected item is the ith from the top on screen, not the ith from the start of the string.    i = DlgSelectItemInList(segs, "Select an Animal", True, i)    sayInteger(i) endWhile endFunction On Wed, Mar 28, 2012 at 11:21:48PM -0700, John Martyn wrote: Interesting news. I wrote a function that kind of works, at least alphabetizing the list, now I need to get the numbers to match up. I'll have to test this with JAWS 12, but doesn't this string at the top make JAWS 13 act more like JAWS 12 and below with string comparisons? ;#pragma StringComparison partial John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 10:31 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare The StringCompare() function is probably better for comparing strings for less/greater/equal. StringToInt does not help for this unless the strings are, or begin with, digits. But yes, the comparison operators do a sort of comparison. The precise nature of this comparison is a bit interesting and is different by default in JAWS 13 than in JAWS 12 and older. On Wed, Mar 28, 2012 at 09:42:27PM -0700, John Martyn wrote: JAWS 12 does the same thing. But there is hope. I can resort the list containing the item name and item number just like what I did with the segment1 and segment2 function I put out there. I could write this one too One other thing I noticed is that you can compare string values to see what is higher. The character A being the lowest and Z being the highest. Try it out. I just put ABB and ABC in the comparison below. if "abb" < "abc" then SayString("yes") endif Interesting that you can compare strings for values. I guess string to int isn't needed. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 9:03 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare We might have to look at your actual code to figure this one out then. I don't think DlgSelectItemInList() actually reorders the items in the segmented string you pass to it, so item 23 should be the 23rd item in the segmented list, not the 23rd item down on screen when the list is sorted. If you're saying DlgSelectItemInList really is reordering things in your segmented string, which would surprise me greatly, just copy it somewhere and then copy it back just before each DlgSelectItemInList call. Does that help? On Wed, Mar 28, 2012 at 08:58:23PM -0700, John Martyn wrote: I know, that was just an example. The actual code is with the 0 being a 1 to sort it. But it doesn't seem to focus the correct item when it returns to the while statement. When I sort it, the I gives me a value of 23 if I pick the third item in the list. When I is set, I make it focus back on the variable I, but it actually goes to the 23 item in the list. I hope I am explaining this as best as I can. It seems to focus the item, the rearrange the list after. That's what I'm referring to. John -----Original Message----- From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Doug Lee Sent: Wednesday, March 28, 2012 8:05 PM To: jawsscripts@xxxxxxxxxxxxx Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare You're passing 0 in that last call, indicating you don't want the list sorted that time. If you sort it the first time and you want i to be valid for another call, you'll need to sort it the second and subsequent times also. Otherwise, the lists themselves are not equal, and item 3 is no longer what item 3 was before. On Wed, Mar 28, 2012 at 07:47:26PM -0700, John Martyn wrote: I think I found a bug in the jaws script. When you DLGSelectItemFromList and arrange it in alphabetic order, it gives you the correct value when you assign it to a variable such as int I, but if you remain in the function in a loop, it doesn't retain which index you are to properly set you on. For example say I have the following segmented string. Let someSegment = "dogs|cats" Naturally if you don't alphabetize it in the function, dogs will come up first unless you put the flag of 1 in the built in function. Now, you can string segment it to get the right information, but when it calls another function that returns back to this dialog window, I wanted the previous selection to be active. The result,I = DLGSelectDialog (someSegment, "|",0,i) The I at the end of that function should return you to the previous item in the list with focus. But it doesn't return you to the same item if you sort the list inside the function call. This bug is annoying so I have to find a way around it. If I can alphabetize the string segment before it goes into the dialog, that would work, but how do you compare two words to be alphabetical? I can think of a long drawn out process that will drive me insane, but possible. Is there any built in function that will help me out possibly? Thanks, John Martyn __________??? 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 __________o? 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 -- 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 __________o? 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 -- 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 __________o? 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 -- 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 __________o? View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ From: "Bob J." <rjustice004@xxxxxxxxxx> Subject: [jawsscripts] Re: TypeKey Date: Thu, 29 Mar 2012 19:21:14 -0500 Try this {CTRL+END} hth Bob ----- Original Message ----- From: "Bissett, Tom" <tom.bissett@xxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, March 29, 2012 1:06 PM Subject: [jawsscripts] TypeKey Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey but I need to send a combination "control+end" and I do not see how I can do that. Typestring isn't doing it either. TypeKey ("0x03f",1 ) works in sending a single keystroke but typestring("control+end") isn't doing it. Any suggestions? Thanks Tom Bisset __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ Date: Thu, 29 Mar 2012 17:45:22 -0700 Subject: [jawsscripts] Re: TypeKey From: Jackie McBride <abletec@xxxxxxxxx> Bob, while that does work, it's no longer the standard, & FS is discouraging its use. If you're writing scripts for your own stuff, it doesn't matter, of course, but if they're to be distributed, FS would prefer that message constants be used instead. I really don't know why they changed it, except, perhaps, that certain keystrokes could not be adequately represented via the {} method. On 3/29/12, Bob J. <rjustice004@xxxxxxxxxx> wrote: > Try this > > {CTRL+END} > > hth > > Bob > > > ----- Original Message ----- > From: "Bissett, Tom" <tom.bissett@xxxxxxx> > To: <jawsscripts@xxxxxxxxxxxxx> > Sent: Thursday, March 29, 2012 1:06 PM > Subject: [jawsscripts] TypeKey > > > Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey > but I need to send a combination "control+end" and I do not see how I can do > that. Typestring isn't doing it either. > TypeKey ("0x03f",1 ) works in sending a single keystroke but > typestring("control+end") isn't doing it. > Any suggestions? > Thanks > Tom Bisset > __________� > > 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 > > -- Blame the computer--why not? It can't defend itself & occasionally might even be the culprit Jackie McBride Ask Me Computer Questions at: www.pcinquirer.com Jaws Scripting training materials: www.screenreaderscripting.com homePage: www.abletec.serverheaven.net ------------------------------ From: "John Martyn" <johnrobertmartyn@xxxxxxxxx> Subject: [jawsscripts] Re: JAWS script how you alphabetize items or compare Date: Thu, 29 Mar 2012 18:20:47 -0700 Hi Andrew and Doug, That string length thing totally fell flat for the purpose it was supposed to serve. I did one better though and here is the function. Keep in mind that segment2 has to be returned before segment1 when you call the function or else it doesn't do anything. Don't ask me why, when I reversed the order in which I made the function calls it magically worked like micky mouse on crack. Basically I examine the string segment and replace all spaces with the character "a". This is because a space is treated differently than a character. By doing this with a stringReplaceSubStrings I made it a whole word. Then I run it through a while statement to make the lengths exactly the same before the comparison. It is the most reliable thing and works perfectly. Also below this first function is me calling the functions and getting not only alphabetized for the track names, but it reorders the actual track item in the music library. It also returns you to the last selection . The time it takes for a long string segment like 150 segments is about 10 seconds. For just viewing tracks it hardly takes any time at all. I thought of creating a global that can update in the function because I would only have to call the function once. It can only return one thing at once, but I left it as is. Take a look: function AlphabetizeTheSegments(string segment1, string segment2, int theSegment) ;sort the segmented strings from highest to lowest var variant newList, variant newList2, variant exclude, variant tempList, string tempMod, string modMax, string theMax, int tempMax, int skipIt, int trigger, int safety, int trigger2, int safety2, int trigger3, int safety3 let theMax = "zzzzzzz" while trigger != 1 ;iterate through the list for the highest number while trigger2 != 1 let safety2 = safety2+1 while trigger3 != 1 let safety3 = safety3+1 if StringSegment (exclude, "|", safety3) == safety2 then let skipIt = 1 let trigger3 = 1 endif if safety3 >= StringSegmentCount (exclude, "|") then let trigger3 = 1 endif endwhile let trigger3 = 0 let safety3 = 0 if skipIt == 0 let tempList = StringSegment (segment1, "|", safety2) let tempMod = StringReplaceSubstrings (tempList, " ", "a") let modMax = StringReplaceSubstrings (theMax, " ", "a") while trigger3 != 1 let safety3 = safety3+1 if StringLength (tempMod) < StringLength (modMax) then let tempMod = tempMod+"a" elif StringLength (tempMod) > StringLength (modMax) then let modMax = modMax+"a" elif StringLength (tempMod) == StringLength (modMax) then let trigger3 = 1 endif endwhile let trigger3 = 0 let safety3 = 0 if tempMod < modMax then let theMax = tempList let tempMax = safety2 endif else let skipIt = 0 endif if safety2 == StringSegmentCount (segment1, "|") then let trigger2 = 1 endif endwhile let trigger2 = 0 let safety2 = 0 if exclude == "" then let exclude = tempMax let newList = StringSegment (segment1, "|", tempMax) let newList2 = StringSegment (segment2, "|", tempMax) let theMax = "zzzzzzz" else let exclude = exclude+"|"+tempMax let newList = newList+"|"+StringSegment (segment1, "|", tempMax) let newList2 = newList2+"|"+StringSegment (segment2, "|", tempMax) let theMax = "zzzzzzz" endif if StringSegmentCount (exclude, "|") == StringSegmentCount (segment1, "|") then let trigger = 1 endif endwhile let trigger = 0 let trigger2 = 0 let safety = 0 let safety2 = 0 if theSegment == 1 then return newList elif theSegment == 2 then return newList2 endif EndFunction Here is where I am calling the functions to get an idea of what is being manipulated in a menu driven system. function ViewAllTracks(string theArtist,int addTracks,int deleteTracks) var int trigger, int trigger2, int safety2, int trigger3, int safety3 while trigger != 1 Say("Viewing "+theArtist+" tracks",3) Say("Please Wait.",3) ;Say("Press escape or Cancel to return to the previous Menu",3) var int i, object o, object s, string choices, variant trackList, variant trackListCount, string trackName let s = iTunesApp.librarysource.playlists.item(theSelectedPlaylist) let o = iTunesApp.librarysource.playlists.item(2).tracks while trigger2 != 1 let safety2 = safety2+1 if theArtist == StringSegment (theArtists, "|", safety2) then if trackList == "" then let trackList = StringSegment (theTrackNames, "|", safety2) let trackListCount = safety2 else let trackList = trackList+"|"+StringSegment (theTrackNames, "|", safety2) let trackListCount = trackListCount+"|"+safety2 endif if addTracks == 1 then s.addtrack(o.item(safety2)) elif deleteTracks == 1 then o.item(safety2).delete endif endif if safety2 >= StringSegmentCount (theArtists, "|") then let trigger2 = 1 endif endwhile if addTracks == 0 && deleteTracks == 0 then ;must do the track count first, for some strange reason it only works this way let trackListCount = AlphabetizeTheSegments(trackList,trackListCount,2) let trackList = AlphabetizeTheSegments(trackList,trackListCount,1) let i = DlgSelectItemInList (trackList, "Viewing All Tracks", 0, i) else return endif if i == 0 then return else ViewTrackOptions(StringSegment (trackList, "|", i), StringSegment (trackListCount, "|", i)) endif endwhile EndFunction ------------------------------ From: "Bob Kennedy" <intheshop@xxxxxxx> Subject: [jawsscripts] Re: TypeKey Date: Thu, 29 Mar 2012 21:59:55 -0400 I use the TypeKey and enclose the keys in quotes. You can use braces around the keys as well and then you leave out the TypeKey function. ----- Original Message ----- From: "Bissett, Tom" <tom.bissett@xxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, March 29, 2012 2:06 PM Subject: [jawsscripts] TypeKey Hi, I want to send a keystroke from a jaws script. I looked at the TypeKey but I need to send a combination "control+end" and I do not see how I can do that. Typestring isn't doing it either. TypeKey ("0x03f",1 ) works in sending a single keystroke but typestring("control+end") isn't doing it. Any suggestions? Thanks Tom Bisset __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ From: "Bob Kennedy" <intheshop@xxxxxxx> Subject: [jawsscripts] Re: TypeKey Date: Thu, 29 Mar 2012 22:20:17 -0400 Thanks for this. It is better to keep things uniform if possible I agree. ----- Original Message ----- From: "Jackie McBride" <abletec@xxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, March 29, 2012 8:45 PM Subject: [jawsscripts] Re: TypeKey Bob, while that does work, it's no longer the standard, & FS is discouraging its use. If you're writing scripts for your own stuff, it doesn't matter, of course, but if they're to be distributed, FS would prefer that message constants be used instead. I really don't know why they changed it, except, perhaps, that certain keystrokes could not be adequately represented via the {} method. On 3/29/12, Bob J. <rjustice004@xxxxxxxxxx> wrote: > Try this > > {CTRL+END} > > hth > > Bob > > > ----- Original Message ----- > From: "Bissett, Tom" <tom.bissett@xxxxxxx> > To: <jawsscripts@xxxxxxxxxxxxx> > Sent: Thursday, March 29, 2012 1:06 PM > Subject: [jawsscripts] TypeKey > > > Hi, I want to send a keystroke from a jaws script. I looked at the > TypeKey > but I need to send a combination "control+end" and I do not see how I can > do > that. Typestring isn't doing it either. > TypeKey ("0x03f",1 ) works in sending a single keystroke but > typestring("control+end") isn't doing it. > Any suggestions? > Thanks > Tom Bisset > __________� > > 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 > > -- Blame the computer--why not? It can't defend itself & occasionally might even be the culprit Jackie McBride Ask Me Computer Questions at: www.pcinquirer.com Jaws Scripting training materials: www.screenreaderscripting.com homePage: www.abletec.serverheaven.net __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts ------------------------------ End of jawsscripts Digest V6 #69 ******************************** __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts