Hi Rick, Keep at it, you are doing a great job of hacking away it it. when you connect an event via connectevent, connectevent watches for the event, and executes a function/sub. if you look at the last parameter you will see a call to a function or sub. Now, the accObj is the object created in the function or sub's initialization, and this is what is used to monipulate the data with in the function/sub. Hope that helps.
_____ From: Ricks Place [mailto:[email protected]] Sent: Tuesday, February 24, 2009 8:50 AM To: [email protected] Subject: Audition Script Question I am slogging through some GW scripts trying to figure out what is going on. In Audition and a couple of others they seem to be connecting to the running application by connecting to some of it's MSAA Events I guess. In the Audition script they seem to be using a variable called accObject as a reference to something in the Running Application. First, where are they getting the reference and defining the accObject variable value? Second, I want to set and change properties in a DataGridView in the Running Application That means modify the existing instance of the control So, how do I get a reference to the control so I can access it's properties and methods? In VBS I think the Create or GetObject would be used but what about in Windoweyes? I do not see anything like that in several GW scripts I looked at. The closest thing in the Audition Script seems to be a variable they call accObject. Where do the define that variable and where do they load it's value with a CreateObject or GetObject or even just create a new instance with the New keyword or what? I've spent days trying to figure this stuff out, no books, no documentation other than cryptic object definitions and scripts that don't seem to follow the VBScript as I have read up on in the MS manuals. Also, I found one of the commands ConnectEvent. Not a command nor subroutine but a method under the Script Object. But, you would never know that as there is no object where the method is being applied. It should be MyScript.ConnectEvent(Whatever) Or something like that. Also, the ConnectObject talks about connecting multiple events, what? Doesn't the ConnectObject Method, if that is what they want to call it, suppose to, well, connect an Object? So, anyway, if you know where they define the accObject, where they it's value and if that is some object running in the Running Application could you let me know? One more thing, what is an Overlp? From what I learned it was something on a screen overlapping another item, here it looks like they mean the Running Application. Is this the case? I'm tired, want to make a little progress and get away from anything to do with Windoweyes sometime today. Thanks if you can help. Rick USA
