Hi Jamal, thanks. I am finding scripting quite challanging. VBScript is easy enough but the analysis of what is going on in the DOM and using the various connected window events is tricky. My question about the threading was concerning sending window messages to windows I create or want to mess with, perhaps in the dom. I don't think I need to get into that just yet though. I am still waiting to hear how GW is going to expose the UIA views and Features of the DOM unless they are just going to fold them into the existing WE Object framework to isolate the scriptors from learning the UIA technicals.
Anyway, thanks again.
Rick USA
----- Original Message ----- From: "Jamal Mazrui" <[email protected]>
To: <[email protected]>
Cc: "RicksPlace" <[email protected]>
Sent: Friday, April 29, 2011 9:05 AM
Subject: Re: Can We Use WScript in WindowEyes VBScript App?


FYI, in general, Window-Eyes scripts do not need to be concerned about the issue of updating a GUI from a different thread than the one that created it. The Window-Eyes scripting engine conveniently takes care of that complexity for us behind the scenes.

 Jamal


On 4/28/2011 7:04 PM, RicksPlace wrote:
Hi Chip: I have just read your other post. I didn't see that constant
but I will check it out. As for WScript I was sort of guessing that is
what the WE Objects were doing. The filter with a find to get the
necessary info to perhaps set focus might work but what a messy
work-around. I will try the constant you suggested before I start doing
anything that radical to set focus. I was even thinking of trying to use
a window message sent to the MsgBox window, but then there was a note
that it would not work if the calling thread was diferent and I am
guessing that my script is on a diferent thread than the WordPad app I
am trying to script but I don't know for sure. I have the
OnChildActivate and OnChildDeactivate working to handle a menu opening
and closing due to selecting the Open item under the File Menu in WordPad.
I needed something like that to Reset the ActiveWindow if another file
is loaded into the WordPad editor before checking for duplicates.

    That was the only thing I could think of to determine when the Open
    Dialog was opened and closed.I'll check out that VBScript constant
    tomorrow - really fried tonight.
    Thanks for the help.
    Rick USA
    ----- Original Message -----
    *From:* Chip Orange <mailto:[email protected]>
    *To:* [email protected] <mailto:[email protected]>
    *Sent:* Thursday, April 28, 2011 5:59 PM
    *Subject:* RE: Can We Use WScript in WindowEyes VBScript App?

    Yes, I think so Rick. wScript was designed to be used in the windows
    scripting host, and GW has tried to replace all of it's
    functionality by giving us their script object.
    If the additional message box constant I gave in another email does
    not help this situation, then you could find your message box's
    windows using the various "filter" methods of the "windows" object,
    and then activate it using the window activate method of the window
    you found.
    hth,
    Chip

    *From:* RicksPlace [mailto:[email protected]]
    *Sent:* Thursday, April 28, 2011 5:49 PM
    *To:* [email protected]
    *Subject:* Can We Use WScript in WindowEyes VBScript App?

    Hi Guys:
    I was getting a MsgBox not getting focus and, i think, not on top of
    my target program's main window.
    I used the following statements and they worked except...
    When I click OK I get an error message saying WScript Variable is
    not defined.
    Is there a problem using the root object, WScript with a WE App in
    VBScript?
    Here is the code that works but throws an error:
    BeginCopiedCode:
    WScriptCreateObject ( "WScript.Shell" )
    Sleep   100
    WshShell.AppActivate   "MyMessageBox"
    EndCopiedCode:
    Again, the MsgBox is now getting focus and is on top as I want but I
    get the error message after I click the OK Button. Do you know of
    any WE scripts that use WScript I might
    look at?
    Rick USA


Reply via email to