ivan Posted August 17, 2006 Share Posted August 17, 2006 (edited) Hi!There are times when the Autoit Window Info is not sufficient to ensure a control is in fact the control reported. This occured to me particularly while trying to automate wizards (add new software, hardware, update, etc).I got so sick of wizards that I developed grabber, to help me automate wizards.requirements:1) preferably latest autoit beta or new release v3.2.0.12) Captdll v2.zip (Thanks to Lazycat)Instructions:1) download Grabber.au32) place it on the same folder as captdll.dll3) run Grabber.au34) clic the Data button AND THEN click the window you want to grab. The info of active button and active static controls is reported to the main edit on grabber and saved as a text file to a captured folder on the desktop. 5) click the All button AND THEN click on the window you want to grab. This saves both the data and a jpg of the active window.6) There's also an exit button, except that it's called Chao! Just adding some humour here.PS: Grabber can be used with any window, not just those stated aboveModifications: clarified the instructions on the main edithope you like itGrabber.au3 Edited August 18, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
ivan Posted August 18, 2006 Author Share Posted August 18, 2006 (edited) Not a single comment, 6 downloads and 50 odd views?Shame, it probably looks poor, but if you don't believe me, try launching an "Add new hardware wizard" Run("rundll32.exe shell32.dll,Control_RunDLL hdwwiz.cpl")and place the mouse over the next button. What does AutoIt Wininfo read? Answer: The Finish button. That's why I hate wizards! Grabber will report a list of control handles, control text and control ids from the entire window, as locng as they are active (visible and enabled). I limited the report to button and static controls on purpose, so that I would have sufficient but not excessive data to ensure a window+control match to perform the automation tasks.IVAN Edited August 18, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
sandyd Posted August 18, 2006 Share Posted August 18, 2006 Hi Ivan, Just tried it and it seems to work fine. Next time I need to automate something, I'll try it out and let you know ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
ivan Posted August 18, 2006 Author Share Posted August 18, 2006 sandyd: thanks for the comment. I think I've found a minor bug if the window that is being grabbed ceases to exist before all the data is collected in a 2 dim array. I'll fix this by testing the window variable for type handle. Otherwise, it does what it's supposed to. Any ideas would be forthcoming. IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
deltron Posted August 18, 2006 Share Posted August 18, 2006 I'm getting an error: >Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\rjg2152\Desktop\Grabber.au3" C:\Documents and Settings\rjg2152\Desktop\Grabber.au3 (75) : ==> Subscript used with non-Array variable.: DllCall("captdll.dll", "int", "CaptureRegion", "str", $lPicFileName, "int", $lWinPos[0], "int", $lWinPos[1], "int", $lWinPos[2], "int", $lWinPos[3], "int", 100) DllCall("captdll.dll", "int", "CaptureRegion", "str", $lPicFileName, "int", $lWinPos^ ERROR was trying to get some window info in internet explorer Link to comment Share on other sites More sharing options...
eynstyne Posted August 18, 2006 Share Posted August 18, 2006 I get the same if you click on a non-window item, (icon) Add If not isarray($array) then continueloop somewhere so that when you click on something accidentally, the program doesn't terminate F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
deltron Posted August 18, 2006 Share Posted August 18, 2006 I gotta say though, this is pretty sweet Link to comment Share on other sites More sharing options...
ivan Posted August 19, 2006 Author Share Posted August 19, 2006 (edited) @eynstyne & @Ryan Grelck: I am quite aware of this error, as it occurs on the matching procedure. I am working on a handler for this error, which basically indicates no window or controls to match. eynstyne I'll set the array test and continue the loop. The other stuff I'm working on is a friendlier gui and a menu, so you can select the folder where you want to store your text and jpg files. Above all, thanks for taking a look at it and for providing comments, criticisms or suggestions. IVAN Edited August 19, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
bo8ster Posted January 9, 2009 Share Posted January 9, 2009 Hi Ivan Thanks for uploaded your code. I am trying to compile your code and I get the following error. \autoitscript\grabber\Grabber.au3(24,85) : ERROR: $DS_SETFOREGROUND: undeclared global variable. $IpSpyGui = GUICreate("Grabber", 400, 300, @DesktopWidth - 400, 0, $DS_SETFOREGROUND, I have the three files, captdll.dll, capture_demo.au3 and Grabber.au3 in the same folder. I am using version 3.2.12.1 of AutoIt, am I missing something? Thanks Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
ivan Posted January 23, 2009 Author Share Posted January 23, 2009 Hi bo8ster, I stopped working on this ages ago, as I found a much better script on this forum. Unfortunately, my memory is not as od as it never was.. If you still need it I'll take a look and update the code, but it's hardly worthwhile. Regards, IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
bo8ster Posted January 27, 2009 Share Posted January 27, 2009 (edited) Ivan Thanks for the reply, that won't be necessary. I have manage to solve that problem that required me to have a more in depth Info tool. Thanks Edited January 27, 2009 by bo8ster Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now