[jawsscripts] Re: GUI Objects with same control ID

  • From: "Jacob Kruger" <jacobk@xxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 1 Mar 2010 21:03:52 +0200

I know - OTOH, if PC cursor didn't move around you could instead use 
keystrokes/shortcuts to move jaws cursor around and say prompts.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message ----- 
From: "Jackie McBride" <abletec@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, March 01, 2010 8:57 PM
Subject: [jawsscripts] Re: GUI Objects with same control ID


> Jacob, this is why I asked if the pc cursor actually changed
> positions. Problem w/that scenario, of course, is that if the
> resolution changes, you're royally screwed--sorry, folks, most polite
> way I know how to phrase that 1.
>
> It's a situation that bites, no doubt about it.
>
> On 3/1/10, Jacob Kruger <jacobk@xxxxxxxxxxxxxx> wrote:
>> Not sure this is relevant, but can't you use things like control
>> coordinates, or I think you call them frames in this sense to then
>> differentiate between controls that stay in the same positions on screen?
>>
>> Stay well
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...fate had broken his body, but not his spirit...'
>>
>> ----- Original Message -----
>> From: "Chris Kung" <Chris.Kung@xxxxxxxxxxxxxxxxxx>
>> To: <jawsscripts@xxxxxxxxxxxxx>
>> Sent: Monday, March 01, 2010 7:46 PM
>> Subject: [jawsscripts] Re: GUI Objects with same control ID
>>
>>
>>> Thanks for you input Soronel
>>> Just to complicate matters the objects are of the same class (Edit) 
>>> aswell
>>> as having the same control ID. They perform different functions and so
>>> require JAWS to say something different when focused on them. The only
>>> unique identifier is the handle but that changes every time you load up 
>>> a
>>> new instance of the window.
>>>
>>> Out of interest does JAWS call some Window API to retrieve information
>>> about the current application? I am quite interested as to how it all
>>> works.
>>>
>>> Thanks
>>> -----------------------------------------------------------
>>> Christopher Kung
>>> Junior Technical Implementation Specialist
>>> TrapezeGroup (UK) Limited
>>> www.trapezegroup.co.uk
>>> -----------------------------------------------------------
>>>
>>> Keep the dates free - 18-20th May, 2010
>>> Join us in Manchester at the Radisson SAS Hotel for the 2010 UK User
>>> Conference!
>>> Registration is now open - 
>>> http://www.trapezegroup.co.uk/2010uc/index.php
>>> Take advantage of the Early-Bird rate - available until 19th March, 
>>> 2010!
>>>
>>>
>>>
>>> Soronel Haetir <soronel.haetir@xxxxxxxxx>
>>> Sent by: jawsscripts-bounce@xxxxxxxxxxxxx
>>> 01/03/2010 16:12
>>> Please respond to
>>> jawsscripts@xxxxxxxxxxxxx
>>>
>>>
>>> To
>>> jawsscripts@xxxxxxxxxxxxx
>>> cc
>>>
>>> Subject
>>> [jawsscripts] Re: GUI Objects with same control ID
>>>
>>>
>>>
>>>
>>>
>>>
>>> If the windows are at least of different types you could do something
>>> like the following:
>>>
>>> Const
>>>  SHARED_ID = 1234,
>>>  INTERNAL_ID1 = 2000,
>>>  INTERNAL_ID2 = 20001
>>>
>>> int Function GetInternalId(Handle hWnd)
>>> Var
>>>  string strClass,
>>>  int nID
>>>
>>>  Let nID = GetControlID(hWnd)
>>>  Let strClass = GetWindowsClass(hWnd)
>>>
>>>  If nID == SHARED_ID1 Then
>>>    If strClass == "SysTreeView32" Then
>>>      return INTERNAL_ID1
>>>    Elif strClass ="SysListView32" Then
>>>      return INTERNAL_ID2
>>>    EndIf
>>>  EndIf
>>>
>>>  ; return 0
>>> EndFunction
>>>
>>> Note that I haven't tried entering this in the script editor so there
>>> may be errors, it's only meant to illustrate the idea of using
>>> whatever unique information is available to assign an easier value for
>>> matching purposes.  After writing the above function you could do
>>> something like the following:
>>>
>>> void Function SomeEventHandler(Handle hWnd)
>>> var
>>>  int nID
>>> ...
>>>
>>>  Let nID = GetInternalID(hWnd)
>>>  If nID == SHARED_ID1 Then
>>>    ...
>>>  ElIf nID == SHARED_ID2 Then
>>>    ...
>>>  EndIf
>>> EndFunction
>>>
>>>
>>> Also, if the class/ID pair is unique within a context you can use
>>> FindWindowWithClassAndId to get a handle to it.
>>>
>>> On 3/1/10, Chris Kung <Chris.Kung@xxxxxxxxxxxxxxxxxx> wrote:
>>>> Hi Everyone
>>>> I work for a company that provides software to transport divisions.
>>>>
>>>> I've been trying to get my head round JAWS scripting to get our
>>>> application to up to scratch but I've encountered some problems.
>>>>
>>>> The main issue is that we have certain objects with the same control 
>>>> ID,
>>>> thus when it comes to scripting its difficult to distinguish between 
>>>> the
>>>> two objects.
>>>>
>>>> One idea was get the screen position of the object and unique identify
>>> it
>>>> that way but I haven't got a clue on how to do this.
>>>>
>>>> Has anyone here experienced similar problems?
>>>>
>>>> Thanks
>>>> -----------------------------------------------------------
>>>> Christopher Kung
>>>> Junior Technical Implementation Specialist
>>>> TrapezeGroup (UK) Limited
>>>> www.trapezegroup.co.uk
>>>> -----------------------------------------------------------
>>>>
>>>> Keep the dates free - 18-20th May, 2010
>>>> Join us in Manchester at the Radisson SAS Hotel for the 2010 UK User
>>>> Conference!
>>>> Registration is now open -
>>> http://www.trapezegroup.co.uk/2010uc/index.php
>>>> Take advantage of the Early-Bird rate - available until 19th March,
>>> 2010!
>>>>
>>>> __________
>>>> Visit and contribute to The JAWS Script Repository
>>> http://jawsscripts.com
>>>>
>>>> View the list's information and change your settings at
>>>> //www.freelists.org/list/jawsscripts
>>>>
>>>>
>>>
>>>
>>> --
>>> Soronel Haetir
>>> soronel.haetir@xxxxxxxxx
>>> __________
>>> Visit and contribute to The JAWS Script Repository 
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/jawsscripts
>>>
>>>
>>>
>>>
>>> __________
>>> Visit and contribute to The JAWS Script Repository 
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/jawsscripts
>>>
>>>
>>> __________ Information from ESET NOD32 Antivirus, version of virus
>>> signature database 4906 (20100301) __________
>>>
>>> The message was checked by ESET NOD32 Antivirus.
>>>
>>> http://www.eset.com
>>>
>>>
>>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus 
>> signature
>> database 4906 (20100301) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>>
>
>
> -- 
> Change the world--1 deed at a time
> Jackie McBride
> www.abletec.serverheaven.net
> Please join me Saturday, 11/7, on my walk against breast cancer by
> making a donation at:
> http://main.acsevents.org/goto/larkspur>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 4906 (20100301) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> 


__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 4906 (20100301) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: