Jump to content

Help with locating tab in a external File.


Recommended Posts

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

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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...