tsukun03 Posted July 5, 2012 Share Posted July 5, 2012 Hi All, I need some help locating a tab in a allegro file using autoit. I am trying to open the tab and use function in this tab. Once the mouse is over the tab, the tab opens and I can use the function however, I can't figure out a good robust way of doing it. I have tried controlClick function however I just came to the realization that i don't need a click. I need the mouse to hover over the tab. ;ControlClick($title,"Visibility","[CLASS:AfxWnd806; INSTANCE:6]","",1341,57) ;ControlClick($title,"Visibility","[CLASS:AfxWnd806; INSTANCE:6]") I have tried mouseGetPos function to get the position and used mousemove and got the position of the mouse. However, This program needs to be able to open in diff computers and I am not sure if the program will have the same dimensions on a diff computer. I have also tried _GUICTRLTab funciton not sure this worked for me in this case but I thought I would give it a shot. ;$conID = 1045659 ;$vis = "Visibility" ;$tVis = _GUICtrlTab_FindTab($handle,$vis) Here is some info from the window info. >>>> Window <<<< Title: Allegro Free Physical Viewer: HSW_ULT_PROTO_0521pm.brd Project: C:.../Files for text/allegro Class: AfxFrameOrView80 Position: 78, 14 Size: 1379, 743 Style: 0x14CFC000 ExStyle: 0x00000110 Handle: 0x00400F3A >>>> Control <<<< Class: AfxWnd80 Instance: 6 ClassnameNN: AfxWnd806 Name: Advanced (Class): [CLASS:AfxWnd80; INSTANCE:6] ID: 325695 Text: Visibility Position: 1341, 57 Size: 20, 68 ControlClick Coords: 8, 34 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x000310DE >>>> Mouse <<<< Position: 1435, 158 Cursor ID: 2 Color: 0x000000 Thanks a lot for the help. Juan Link to comment Share on other sites More sharing options...
tsukun03 Posted July 9, 2012 Author Share Posted July 9, 2012 Can anyone help me out? Link to comment Share on other sites More sharing options...
jaberwacky Posted July 10, 2012 Share Posted July 10, 2012 I guess you could just use the dimensions of the window to tell the mouse where to go? Find the location of the top left of the window (assume that it's 20 and 20 -- 20px in and 20px down) That's your offset. Then if the tab is 10px down from the top of the window and 100px to the right then 30px and 120px should do it. I dunno. I'm no expert but you gotta try some things on your own sometimes ya know? Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? 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