AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any possibility of smoother transfers from Windowspy?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
S_R
Guest





PostPosted: Thu Apr 01, 2004 4:37 am    Post subject: Any possibility of smoother transfers from Windowspy? Reply with quote

Smarter folks may have already figured out better ways--or I may have just missed something--but I find I have to manually transfer pixel values, window names and so on from Windowspy to AHK routines.
If that's so, I have some suggestions for alternatives--any or all of which Chris or others may already have come up with.
First, a menu item in the AHK tray icon right-click menu that would 'freeze' Windowspy -- thus allowing us to highlight and copy any selected value to the clipboard (obviously, you can't highlight a value now, because it changes the Windowspy content).
Alternatively, the menu item could just dump the entire current Windowspy content to the clipboard (from which you'd paste, and then delete the excess).
Another possibility would be to allow the definition of hot keys that would capture each type of Windowspy info (i.e, mouseposition, windowname, etc).
Finally, on the topic, I hope any solution would be one that works on both Windows 98 and XP -- me being one of many who's now working with a mix of both.

--SR
Back to top
Beastmaster
Guest





PostPosted: Thu Apr 01, 2004 8:29 am    Post subject: Reply with quote

Valid point.
I've tried to detect some Controls on a VB GUI but while moving to the spy to select and copy its label, the content changed cause window spy is still focused on the area behind its own frontend.

Once you reset the focus to the window which you want to scan, window spy scrolls back to its topmost row. So you won't be able to see the bottommost info if necessary (unless you change its size to 200, 600).

But isn't WindowSpy an AutoIt3 tool ? So I expect Jon Bennett and the A3 crew should have to deal with the same issues and be willing to support you ???
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Thu Apr 01, 2004 1:04 pm    Post subject: Reply with quote

I don't think having a tray menu item would work since clicking on the tray icon activates the (possibly hidden) AHK main window, since that's part of how tray icon menus operate. Edit: Maybe this can work if it waits a short time for the original window to become active again, I'll look into it. Actually this would be a problem anyway since you have to move the mouse to the tray icon, thus your mouse coordinates and pixel color would be lost (though some of the other info might still be useful).

The following is already in my to-do list: "In the AHK main window, show the wintitle, win pos, mouse coordinates and pixel color (maybe the control too, but perhaps not the wintext) of the active window. Like Window spy, only more of an instantaneous snapshot." I was also thinking of assigning a default hotkey to this feature (if the user didn't assign one in the script), but that has some drawbacks. Suggestions to improve this idea are welcome.

In the meantime, a single shift-alt-tab to activate Window Spy will stop it from updating (freezing the current control name and pixel color, unless the pixel happens to be inside the alt-tab menu's area).

Alternatively, assigning a hotkey such as the following should do the trick, since Window Spy stops updating when it becomes the active window:

#z::WinActivate, AutoIt3 Active Window

You can also instantly grab all of the text in the window this way:

#t::
WinGetText, clipboard, AutoIt3 Active Window
MsgBox, The text is:`n`n%clipboard%
return


And of course you can grab most of the data Window Spy shows by using a direct script command:

#t::
MouseGetPos, xpos, ypos
PixelGetColor, color, %xpos%, %ypos%
MsgBox, The color at coord %xpos%,%ypos% is %color%.
return
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group