Dracil Posted January 2, 2010 Share 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! Link to comment Share on other sites More sharing options...
James Posted January 2, 2010 Share Posted January 2, 2010 ControlGetText() Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Dracil Posted January 2, 2010 Author Share 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? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 2, 2010 Share 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. Link to comment Share on other sites More sharing options...
Dracil Posted January 2, 2010 Author Share Posted January 2, 2010 Yes but how to do that in autoit script? since the title changes in this situation i have. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 2, 2010 Share 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. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 3, 2010 Share 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 Link to comment Share on other sites More sharing options...
Dracil Posted January 3, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 3, 2010 Share Posted January 3, 2010 Function WinGetTitle - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Dracil Posted January 3, 2010 Author Share Posted January 3, 2010 Thanks alot snowmaker! anyway to find out Class value ? Link to comment Share on other sites More sharing options...
Delta Posted January 3, 2010 Share 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] Link to comment Share on other sites More sharing options...
Dracil Posted January 3, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 4, 2010 Share 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. 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