Hi Tom, It does H indeed <Smile>. Thank you for this excellent post.
All the best Steve -- Computer Room Services 77 Exeter Close Stevenage Hertfordshire SG1 4PW Tel: +44(0)1438-742286 Mob: +44(0)7956-334938 Fax: +44(0)1438-759589 Email: [email protected] Web: http://www.comproom.co.uk -----Original Message----- From: Tom Kingston [mailto:[email protected]] Sent: 28 December 2012 12:57 To: [email protected] Subject: Re: Beginner question on Immediate Mode Welcome 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’s happening here. I would have thought the > mouse object would hold the window property and give me some result, > whether it is numeric or a string, but looks like the window property > isn’t supported. > > Interestingly, this example is also referenced in the Immediate Mode help. > > Any thoughts please? > > Thanks. > > All the best > > Steve > > -- > > Computer Room Services > > 77 Exeter Close > > Stevenage > > Hertfordshire > > SG1 4PW > > Tel: +44(0)1438-742286 > > Mob: +44(0)7956-334938 > > Fax: +44(0)1438-759589 > > Email: [email protected] <mailto:[email protected]> > > Web: http://www.comproom.co.uk >
