moderated trying to write a jaws script
Josh Kennedy
hi
I am trying to write a jaws script to read the status line in windows11 notepad. I called FS and they said they would pass this issue on to their developers but I thought I could get it done faster. But I guess I am unfamiliar with UI automation and I get an error when compiling. Here is the code I have so far. I just need jaws to go over two windows from the document window, down two child windows grab the text and read it. pasted below is the script so far but it does not compile and gives an error. so if anyone can give me hints as to what I am doing wrong please let me know thanks. Compile Error
Error: Unexpected word SayString
OK
Script ReadStatusLine ()
var
handle hgrip,
string SayLineAndColumn
var
object Status_Line = CreateObjectEx ("FreedomSci.UIA", false, "UIAScriptAPI.x.manifest" );
let hgrip = GetFocus()
let hgrip = GetRealWindow ((hgrip))
let Status_Line = GetUIAObjectTree()
return (SayLineAndColumn)
SayString (SayLineAndColumn)
EndScript
|
|
Jeff Christiansen
This is probably a better question for the scripting list. I am not very experienced with UIA but the line
let Status_Line = GetUIAObjectTree()
it appears that you are attempting to have an object or collection returned to a string variable. You are using the reserved word, var twice, I would write as
Var Handle hWnd, String SayColumnAndLine, Object oFind, Int iCount
Hope you are successful!
From: main@jfw.groups.io <> On Behalf Of Josh Kennedy
hi Compile Error Error: Unexpected word SayString OK Script ReadStatusLine ()
var handle hgrip, string SayLineAndColumn var object Status_Line = CreateObjectEx ("FreedomSci.UIA", false, "UIAScriptAPI.x.manifest" );
let hgrip = GetFocus() let hgrip = GetRealWindow ((hgrip)) let Status_Line = GetUIAObjectTree() return (SayLineAndColumn) SayString (SayLineAndColumn)
EndScript
|
|
Josh Kennedy
thanks for trying to help. I still get:
Compile Error
Error: Unexpected word SayString
OK when I try to compile the partial script. Is it just me or does UI automation seem to make things more complicated than they used to be?
|
|