Sign in to follow this  
Followers 0
pegmanm

Interact with window

4 posts in this topic

Hi,

I have an application chooser window that I would like to interact with. The financial application Sage Line 50 starts with a splash screen and the loads a c window to choose which company you would like to load. However this chooser list does not appear to have selectable text.

Nor is the list stable (for want of a better word) the option from the list selected is always the company that was last used not the top or first added etc.

The Window info for this page and a screen shot are below.

What I would like to do is since I am given the company names select these from the list and enter the program and run the rest of my script in some kind of order so I do not fail based on last entered company or indeed if the user adds a new option to the list that I am not aware of.

If you could point me in the right direction I would greatly appreciate it.

Regards and Thanks

Martin P

>>>> Window <<<<

Title: Select Company

Class: #32770

Position: 574, 348

Size: 531, 354

Style: 0x94C800C4

ExStyle: 0x00050101

Handle: 0x00BA063A

>>>> Control <<<<

Class: __03Grid__

Instance: 1

ClassnameNN: __03Grid__1

ID: 1610

Text:

Position: 21, 39

Size: 480, 227

ControlClick Coords: 243, 57

Style: 0x50010610

ExStyle: 0x00000204

Handle: 0x00B80578

>>>> Mouse <<<<

Position: 267, 125

Cursor ID: 2

Color: 0x316AC5

>>>> StatusBar <<<<

>>>> Visible Text <<<<

&Browse

OK

Cancel

Company List

>>>> Hidden Text <<<<

post-31793-1202485358_thumb.png

Share this post


Link to post
Share on other sites



The class of the control implies it is a Grid control. There hasn't been any success using those in the few posts I've seen on this forum about them. They don't respond to standard Windows API calls because they are custom controls. Whoever coded them determined how their interface would work, and there's no way for AutoIt to know how ahead of time.

:)


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

Ok so I may need to try another way around this.

If I know the number of companies and I wish to use something like

$Run = 2
Run("" & $SageExe & "", "" & $SageDir & "")
    Sleep(2000)

    ;If WinExists("Select Company") Then
    WinActivate("Select Company")
    WinWaitActive("Select Company")
    Sleep(2000)
    Send("{HOME}")
    Send($Run * {DOWN})

Can i place a variable in a Send control like this? Or is there a better way of doing this.?

Regards and Thanks for your help.

Martin P

The class of the control implies it is a Grid control. There hasn't been any success using those in the few posts I've seen on this forum about them. They don't respond to standard Windows API calls because they are custom controls. Whoever coded them determined how their interface would work, and there's no way for AutoIt to know how ahead of time.

:)

Share this post


Link to post
Share on other sites

Ok so I may need to try another way around this.

If I know the number of companies and I wish to use something like

$Run = 2
Run("" & $SageExe & "", "" & $SageDir & "")
    Sleep(2000)

    ;If WinExists("Select Company") Then
    WinActivate("Select Company")
    WinWaitActive("Select Company")
    Sleep(2000)
    Send("{HOME}")
    Send($Run * {DOWN})

Can i place a variable in a Send control like this? Or is there a better way of doing this.?

Regards and Thanks for your help.

Martin P

Straight from the help file under Send():

If you wish to use a variable for the count, try

$n = 4

Send("+{TAB " & $n & "}")

:)

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

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