Witmarquzot Posted May 7, 2013 Share Posted May 7, 2013 Looked through the forums and there is nothing about what this means, but i think it is what I need to hit a Windos.Form button, but I am unclear how I get that info. Info below >>>> Window <<<< Title: Route Manager - Wildman Facility Services Class: WindowsForms10.window.8.app.0.29e8405 Position: -8, -8 Size: 1382, 754 Style: 0x17CF0000 ExStyle: 0x00050100 Handle: 0x0000000000081CA4 >>>> Control <<<< Class: Instance: ClassnameNN: Name: MenuStrip1 Advanced (Class): [NAME:MenuStrip1] ID: 1448290 Text: MenuStrip1 Position: 0, 0 Size: 1366, 24 ControlClick Coords: 148, 11 Style: 0x56000000 ExStyle: 0x00010000 Handle: 0x0000000000161962 from XML config <Menu name="Inventory" assembly="" id="Inv" autoActivate="true"> <MenuList text="Inventory" id="InvMain"> <MenuItem text="Inventory" objName="Inventory" listfirst="true" icon="Inventory" id="InvMain010"/> I am trying to hit the "Inventory" Button(Greenbox on attachment but after trying every form of GetList i could think of nothing came back. So if some one could point me in the right direction, or even better explain the REGEXPCLASS: for this example would be awesome. I have a feeling I may have to do it with mouse coordinates Link to comment Share on other sites More sharing options...
JohnOne Posted May 7, 2013 Share Posted May 7, 2013 What have you tried? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Witmarquzot Posted May 7, 2013 Author Share Posted May 7, 2013 Well first I tried this WinMenuSelectItem well that did not work(obviously) ControlTreeView(GetItemCount), returned 0, so then I though, i will just make a little program that will just pull the button info for me While 1 IF(_IsPressed(1) = 1) Then DIM $msg = GUIGetMsg(1) MsgBox(0,$msg[0],$msg[1] & @CR & $msg[2]& @CR & $msg[3]& @CR & $msg[4]);,$msg[1] & @CRLF & $msg[2] & @CRLF] & $msg[3] & @CRLF & $msg[4] & @CRLF,5); EndIF WEnd thinking well maybe I am missing something obvious like the handle for the window I want no good, so then I thought, well duh, wrong command again ControlListView should work returns nothing I also tried the above again using the HANDLE with WinGetHandle thinking I was choosing the wrong window by name, same results then I kind of went crazy and sleep deprived, and tried random things, like ControlClick(ID2319) when I realized that i was shooting air, I looked in the forms and found REGEXPCLASS should work with what I want to do, after searching, there was nothing leading me where I could get that info, so I that brings us to the present. Link to comment Share on other sites More sharing options...
BrewManNH Posted May 7, 2013 Share Posted May 7, 2013 It's not a treeview control, so using the treeview UDF functions is pointless. It's not a Listview control, so using the Listview UDF functions is pointless. Have you tried using the ControlClick function, using the Window title and the control ID as shown in the Help file? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Bowmore Posted May 7, 2013 Share Posted May 7, 2013 (edited) From the AutoItInfo information you have supplied this should work reliably. ControlClick("Route Manager","","[NAME:MenuStrip1]","left",1,148,11) Adjust the X coord ,148, to click on different items on the menu strip. Edited May 7, 2013 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Witmarquzot Posted May 7, 2013 Author Share Posted May 7, 2013 From the AutoItInfo information you have supplied this should work reliably. ControlClick("Route Manager","","[NAME:MenuStrip1]","left",1,148,11) Adjust the X coord ,148, to click on different items on the menu strip. Yeah, never would have though of that, I had tried using MouseClick, but you can see how that would be problematic. You deserve a virtual high five 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