These are helpful. Feel free to pass along more to spread your immed
appreciation. And is it documented anywhere that it keeps the active and
focused windows stored? I never saw that tidbit, and it opens things up
tremendously on its own.
Jared
Aaron Smith wrote:
Sure thing. The other day, I wanted to find out the class name of the
window that contains the systray icons. So instead of writing several
lines of script to go through all the children of the desktop, then
finding the taskbar window, then drilling down from there, I instead
put the mouse pointer on one of the systray icons, brought up immed,
and typed:
print mouse.window.classname
Bing, bang, boom. ToolbarWindow32. But then I wanted to know it's
parent. So I just did:
print mouse.window.parent.classname
Bingo. SysPager.
And then:
print mouse.window.parent.parent.classname
That got me TrayNotifyWnd.
And then again:
print mouse.window.parent.parent.parent.classname
Which gave me Shell_TrayWnd. One more parent up from that gave me the
desktop, and with just a few lines, I had a complete view of the
window tree that went from the desktop to the system tray with just a
few "immediate" lines.
I use the Mouse.Window feature a lot, and it's easy enough to get the
mouse pointer on something to interrogate it. But immed also keeps
track of what the active and focused windows were before it became
active, and you can then refer to those using the ActiveWindow and
FocusedWindow object names. I've used that method to get the names of
all the buttons in a window, with:
For Each winObj In ActiveWindow.Children : If winObj.Type = wtButton
Then : print winObj.Control : End If : Next
Bring up the run dialog, then bring up immed, do that line above, and
you'll get back:
Ok
Cancel
Browse...
If it's not obvious, I just used colons to replace line breaks. You
can use that trick to do simple loops and such, again without having
to write a whole script and associate it and so on.
Those are the two examples I did recently. I'll post more as I do
them, because I want you guys to love immed like I love immed.
Aaron
Jared Wright wrote:
Aaron, I'd really like a few practical examples of ways you've been
using immed, if you can. Maybe it's just me being an idiot, but I
just haven't gotten the hang of using its realtime feedback properly
and am probably hindering my progress as a result.
Jared
Aaron Smith wrote:
See www.gwmicro.com/scripts/immed.
"The Scripting Immediate Mode Window script provides a way to
develop and test script functionality (or script snippets) in
real-time without having to create and load an entire script."
Aaron
Josh wrote:
what is immed?
email: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
skype: jkenn337
----- Original Message ----- From: "Aaron Smith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 27, 2008 8:01 PM
Subject: Re: harvest window and we event scripts
That depends on what info you're looking for. Both scripts
certainly provide a host of information, so they're definitely
good one-two punch when trying to figure out what an application
is up to. Personally, I think the Immed script is invaluable for
testing ideas before putting them into practice.
Aaron
Life My Way wrote:
witht he above two scripts is it posible to get all of the needed
info to script aps?
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to
the GW
Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development