Hi David, Since you are using a tree view and an editbox, below are many things you can do using the event triggered by the tab into the editbox. I kept some of it there for the editbox if disabled you enable it.
Inside your treeview procedure: If dEvent = editboxFocus Then If Not myAlertDialog.Control( AlertEditboxName).Enabled Then myAlertDialog.Control( AlertEditboxName).Enabled = True dControl.SelectAll Sleep 200 Exit the function call with the normal stuff. Now below are the routines you can use inside that tab. Now if you want to read the entire editbox, above you selected all, now all you need to call inside a speak command is: Function TextSelected( dObj, dId) 'Get Selected Text. On Error Resume Next TextSelected = dObj.Control( dId).Selection end Function Function LineText( dObj, dId) 'Get Text From Line Cursor Is On. On Error Resume Next LineText = dObj.Control( dId).Line( LineNumber( dObj, dId)) end Function Sub SpeakLineText( dObj) 'Speak Text Of Line Cursor is on. On Error Resume Next Speak " " & LineText( dObj, myEditboxName) Sleep 1000 End Sub Function CursorPosition( dObj, dId) On Error Resume Next CursorPosition = dObj.Control( dId).Cursor End Function Function LineNumber( dObj, dId) On Error Resume Next LineNumber = dObj.Control( dId).LineFromChar( CursorPosition( dObj, dId)) End Function Function LinePosition( dObj, dId) On error Resume Next 'Calculate First Position Of Line Specified. LinePosition = dObj.Control( dId).CharFromLine( LineNumber( dObj, dId)) End Function Function PositionInLine( dObj, dId) PositionInLine = CursorPosition( dObj, dId) - LinePosition( dObj, dId) + 1 End Function Function LineLength( dObj, dId) 'Find Length Of Line Cursor is on. On Error Resume Next LineLength = dObj.Control( dId).LineLength( LineNumber( dObj, dId)) end Function Function GetTextFromLine( dObj, line) 'Get text from Line specified. On Error resume Next GetTextFromLine = dObj.Control( myEditboxName).Line( line) End Function Sent: Friday, February 19, 2016 1:54 AM Subject: Auto-read of Editboxes Hey listers, Got a tiny issue here, hoping someone would happen to have an idea for a fix. I have a dialog, with a few controls. One of them, is an ReadOnly Editbox, which will automatically be updated by the app, through its execution. To describe it a bit more, this is in the User's Guide section of my app. I have the treeview at top of the screen, and the edit box holding the actual contents of the chapter just beneath it. This way, the user can scroll through the chapter headings, in the top control, and then simply press Tab, to get to the contents of the chapter. Shift-Tab, and you are back in the Table Of Contents, and can choose your next topic for reading. Everything works just fine, except from this one minor issue. When the cursor lands on the ReadOnly edit box holding the chapter contents, the speech randomly reads all the contents, and sometimes only the first couple of lines of the box. Is there any quick fix for this? Or, should I let the user have to manually either arrow through the text, or press the Read-to-end hotkey. Is there any "Auto-Read" feature for an edit box? Don¨'t know, why the speech sometimes reads all the text, and other times only part of it. But wish there was a way to make it as seamless for the user as possible. If no auto-read feature currently exists, maybe the AISquare staff could consider having such a feature implemented. And, if anyone has a workaround with a few lines of coding, I am all ears. OK, I guess, I could have the app simulate the Read-to-end hotkey, whenever the edit box gets focused. Yet, how could I ensure that this would work, even if the user has changed the standard of Ctrl-Shift-R, for this hotkey? Is there an underlaying instruction in the app coding, for "invoking this feature of the screen reader directly? Thanks for all your feedback on the matter. Not a big deal, but still would be great to have it worked out, if possible. aut -- David _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/lab4me%40fltg.net. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com