[jawsscripts] Re: GetSelected text

  • From: "Bissett, Tom" <tom.bissett@xxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 5 May 2016 10:41:56 -0400

How are you defining the strSelectedObject variable?  String, int or variant?
Also if you do a say on the strSelectedObject variable you should be able to 
determine the contents of the variable.
Tom Bisset
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Steve S
Sent: Thursday, May 05, 2016 8:16 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] GetSelected text

Hi folks. I'm experiencing some strange behaviour with get selected text.  In 
this app, a selected object can be named whatever you like, so like the file 
name or simply a letter.  So, there's no knowing how long the name will be or 
what will be displayed on screen.
A feature is to zoom in and out, which in turn expands or contracts the visible 
text.

For example:
A file could be called "hello there", but if your zoomed out, then it could 
display as "hlo tre".
Now the issue is, storing this in a variable is returning a different value, 
depending on whether  you get it or say it. E.g:

Let strSelectedObject = GetSelectedText()

; if the full file name is visible, all is well If FindString( GetRealWindow( 
GetFocus()), strSelectedObject, S_BOTTOM, S_UNRESTRICTED) Then
    Say( strSelectedObject, OT_STRING, TRUE) Else ; If the file name is 
contracted, then we fail
    Say( msgNoObjectStatusSelectedTrackError, OT_STRING, TRUE)

It seems as if, when the full file name is visible, then all works OK, if it's 
different on screen to what the function is returning, then it fails.  So, does 
anyone know if this "get selected text" function is returning the full file 
name, then comparing it to the visible selection?  If so, any ideas on how to 
solve this? THX Steve.
__________�

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

__________�

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

Other related posts: