Dracil Posted January 2, 2010 Posted January 2, 2010 Ok i want my autoit code to check a text on my other application. Now im using autoit v3 Window info and i get this info, theres a specific static field on the application that change values and i want to grab that info. In the WIndow Info it says: >>>> Control <<<< Class: MozillaWindowClass Instance: 5 ClassnameNN: MozillaWindowClass5 Advanced (Class): [CLASS:MozillaWindowClass; INSTANCE:5] ID: Text: Hello Position: 0, 198 Size: 1663, 774 ControlClick Coords: 1186, 395 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x00530652 Now you can see the Text : Hello i want to grab that because that changes, sometimes its Hello sometimes its something else. How do i do that? And i would like to avoid the way to open up the window and use a OCR to find out that value. Thanks in advance!
James Posted January 2, 2010 Posted January 2, 2010 ControlGetText() Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Dracil Posted January 2, 2010 Author Posted January 2, 2010 Thanks alot James! Now what about Class? If i have a window active how to i grab the Class value out of that window?
somdcomputerguy Posted January 2, 2010 Posted January 2, 2010 With the AutoIt Window Info Tool.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Dracil Posted January 2, 2010 Author Posted January 2, 2010 Yes but how to do that in autoit script? since the title changes in this situation i have.
somdcomputerguy Posted January 2, 2010 Posted January 2, 2010 How much does the title change? You could possibly use change WinTitleMatchMode.Window Titles and Text (Advanced) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
AdmiralAlkex Posted January 3, 2010 Posted January 3, 2010 Is that Firefox? Use FF.au3 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Dracil Posted January 3, 2010 Author Posted January 3, 2010 Im trying to get the title of the active window, is there something similair to this i can do ? $hWnd = ControlGetHandle ( "[Active]", "", "Title") or $hWnd = ControlGetHandle ( "[Active]", "", "Class") This wont get me anything.. just an idea
somdcomputerguy Posted January 3, 2010 Posted January 3, 2010 Function WinGetTitle - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Dracil Posted January 3, 2010 Author Posted January 3, 2010 Thanks alot snowmaker! anyway to find out Class value ?
Delta Posted January 3, 2010 Posted January 3, 2010 Thanks alot snowmaker! anyway to find out Class value ?It's right there in your first post.Class: MozillaWindowClass [size="1"]Please stop confusing "how to" with "how do"[/size]
Dracil Posted January 3, 2010 Author Posted January 3, 2010 (edited) Yes but the class changed, its not mozilla im checking, that was just an example. I need a code to check the class, because it changes everytime i start it. Im sorry if im bombing with questions, but i really appreciate the help! Edited January 3, 2010 by Dracil
somdcomputerguy Posted January 4, 2010 Posted January 4, 2010 Function WinGetClassListThe help file is filled with all kinds of useful stuff.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
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