The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.
From:
Tom Kingston <tom.kingston@charter.net>Subject:
Re: Beginner question on Immediate ModeDate:
Fri, Dec 28, 2012 7:56:47 amWelcome to the wonderful world of COM. Mouse is indeed an object
representing the mouse. And Window is a property of that object. But
Window is also an object. So Mouse.Window is only referencing the Window
object that the mouse is on. The same holds true for Cursor.Window.
You're just referencing the window the cursor is in. So you need to do
something with that window object.
If you look in the scripting manual you'll see Window as an object, and
within that you'll find the properties, methods, and events for the
Window object. So try the following.
Print Mouse.Window.Title
Print Mouse.Window.Name
Print Mouse.Window.ClassName
When you look at the help for the Mouse.Window property it says it
returns a window object and window is a link you can activate to see
what that object is about, how it works, and what properties, methods,
and events are available for it.
Hth,
Tom
On 12/28/2012 7:05 AM, Steve Nutt wrote:
> Hi guys and gals?
>
> I read with interest that in Immediate Mode, you can for example, print
> out the mouse window as a variable. I checked the reference guide and
> Mouse is an object, and Window is a property.
>
> So I opened a program, interested in what I would get, Outlook 2007 as
> my example and loaded my inbox.
>
> I then hit the Control-Shift-Q window to bring up Immediate Mode, and
> typed:-
>
> Print mouse.window
>
> I get the error:-
>
> Error object does not support this property or method.
>
> So where am I going wrong?
>
> This is not important to any project, it is just experimentation and I
> want to understand whatâ
representing the mouse. And Window is a property of that object. But
Window is also an object. So Mouse.Window is only referencing the Window
object that the mouse is on. The same holds true for Cursor.Window.
You're just referencing the window the cursor is in. So you need to do
something with that window object.
If you look in the scripting manual you'll see Window as an object, and
within that you'll find the properties, methods, and events for the
Window object. So try the following.
Print Mouse.Window.Title
Print Mouse.Window.Name
Print Mouse.Window.ClassName
When you look at the help for the Mouse.Window property it says it
returns a window object and window is a link you can activate to see
what that object is about, how it works, and what properties, methods,
and events are available for it.
Hth,
Tom
On 12/28/2012 7:05 AM, Steve Nutt wrote:
> Hi guys and gals?
>
> I read with interest that in Immediate Mode, you can for example, print
> out the mouse window as a variable. I checked the reference guide and
> Mouse is an object, and Window is a property.
>
> So I opened a program, interested in what I would get, Outlook 2007 as
> my example and loaded my inbox.
>
> I then hit the Control-Shift-Q window to bring up Immediate Mode, and
> typed:-
>
> Print mouse.window
>
> I get the error:-
>
> Error object does not support this property or method.
>
> So where am I going wrong?
>
> This is not important to any project, it is just experimentation and I
> want to understand whatâ




