Sign in to follow this  
Followers 0
Herb191

Looking for some program automation Ideas.

4 posts in this topic

I have a graphing program I would like to automate in a reliable way and I am trying to come up with the best way of going about it. I was hoping to use COM functions but they are not supported by the program and there are few controls in the main program so I don’t think I will be able to use much of the control commands. So, I think I’m stuck using the mouse/send functions?

The program displays the depth that the mouse cursor is at and i would like to use this in my script. Something like:

If $Depth = $X Then $Do_Something

The problem is I can’t get the depth info from the window. It doesn’t display the text in the controller. I’m including the window information and screen shot so you can see what I am talking about. Any ideas would be appreciated.

The Window info:

>>>> Window <<<<

Title: MUD.LOG 6.2a - [not saved]

Class: TDiagramForm

Position: 127, -7

Size: 671, 738

Style: 0x16CF0000

ExStyle: 0x00010100

Handle: 0x006E0682

>>>> Control <<<<

Class: TStatusBar

Instance: 1

ClassnameNN: TStatusBar1

Advanced (Class): [CLASS:TStatusBar; INSTANCE:1]

ID: 2754410

Text:

Position: 0, 661

Size: 663, 23

ControlClick Coords: 207, 23

Style: 0x54000100

ExStyle: 0x00000000

Handle: 0x002A076A

>>>> Mouse <<<<

Position: 338, 727

Cursor ID: 0

Color: 0x7586DC

>>>> StatusBar <<<<

>>>> Visible Text <<<<

>>>> Hidden Text <<<<

Screen shot.bmp

Share this post


Link to post
Share on other sites



Anyone? All suggestions welcome. :)

Share this post


Link to post
Share on other sites

Try this to see if you can read the status bar parts:

#Include <GuiStatusBar.au3>

$hWin = WinGetHandle("[CLASS:TDiagramForm; TITLE:MUD.LOG 6.2a", "")
ConsoleWrite("$hWin = " & $hWin & @LF)
$hStatus = ControlGetHandle($hWin, "", "[CLASS:TStatusBar; INSTANCE:1]")
ConsoleWrite("$hStatus = " & $hStatus & @LF)
$iParts = _GUICtrlStatusBar_GetCount($hStatus)
ConsoleWrite("$iParts = " & $iParts & @LF)
For $n = 0 To $iParts - 1
    $sText = _GUICtrlStatusBar_GetText($hStatus, $n)
    ConsoleWrite("Part " & $n & ":  " & $sText & @LF)
Next

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Try this to see if you can read the status bar parts:

#Include <GuiStatusBar.au3>

$hWin = WinGetHandle("[CLASS:TDiagramForm; TITLE:MUD.LOG 6.2a", "")
ConsoleWrite("$hWin = " & $hWin & @LF)
$hStatus = ControlGetHandle($hWin, "", "[CLASS:TStatusBar; INSTANCE:1]")
ConsoleWrite("$hStatus = " & $hStatus & @LF)
$iParts = _GUICtrlStatusBar_GetCount($hStatus)
ConsoleWrite("$iParts = " & $iParts & @LF)
For $n = 0 To $iParts - 1
    $sText = _GUICtrlStatusBar_GetText($hStatus, $n)
    ConsoleWrite("Part " & $n & ":  " & $sText & @LF)
Next

:)

That worked great thank you.

Share this post


Link to post
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
Sign in to follow this  
Followers 0