Jump to content

Is there a page id for dialog box?


h711
 Share

Recommended Posts

Hi, I try to auto a five page installer. The problem is, there are multiple buttons have the same button id. Those buttons located on different pages of installer dialog box, so the same id does not cause problem for Windows. I guess there must be a way to id them by something like page id + button id, but I couldn't find it by AutoIt Window Info. All I see is the class: #32770 + instance. Yes instance# changes from page to page, but I cannot rely on instance# because the page instance# is not fixed due to page order change.

Is there a way to uniquely id the buttons based their id + location? Or is there a better way to do this? I should not use button text to id the button.

Thanks for the help!

Link to comment
Share on other sites

Hi, I try to auto a five page installer. The problem is, there are multiple buttons have the same button id. Those buttons located on different pages of installer dialog box, so the same id does not cause problem for Windows. I guess there must be a way to id them by something like page id + button id, but I couldn't find it by AutoIt Window Info. All I see is the class: #32770 + instance. Yes instance# changes from page to page, but I cannot rely on instance# because the page instance# is not fixed due to page order change.

Is there a way to uniquely id the buttons based their id + location? Or is there a better way to do this? I should not use button text to id the button.

Thanks for the help!

you can try several things to identify on what page you r

WinGetText

is the first solution and maby the bestone, to determan on what part of the page you r

the second solution is with

ControlFocus

to try to set focus on something and with some logic you can probably finde on what page you r

enaiman is faster :)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

I try not to use UI text to id any thing. I need my script to work on all native language OSes, not just English OSes.

Could you give me an example of ControlFocus? I still need to ID the object before I can do any thing.

Any way, my objects are two checkboxes that I need to first find them, then uncheck them. I even tried use Style and ExStyle to help id them, but it still didn't work.

ControlCommand("(CLASS:#32770)", "", "[ID:1077; Style:0x50016403; ExStyle:0x00000004]", "UnCheck")
Edited by h711
Link to comment
Share on other sites

ControlCommand("(CLASS:#32770)", "", "[ID:1077; Style:0x50016403; ExStyle:0x00000004]", "UnCheck")
ControlCommand trying to detect on what page im (focus or not IsVisible is to see if it exsist, i tought that itl b beter to focus on something, i whas wrong in this case)

I try on autoit instaler and had simular problems as you

4 me this is working, im trying to see something diffrent on every page (one page have button with instance other dont, other have edit) so that i can identify them, combining all that i thing that with alot of "if then" on instance and class you can probably solve your problem, to detect on what page your on. So im not looking to buttons next and back to detect the page, im looking to all except that buttons.

$pg = "unknown"
While 1
    Sleep(20)
    $focus1 = ControlCommand("AutoIt v3.2.4.9 Setup", "", "[INSTANCE:14; CLASS:Static]", "IsVisible", "")
    If $focus1 = "1" Then
        $pg = "1"
    EndIf
    $focus1 = ControlCommand("AutoIt v3.2.4.9 Setup", "", "[INSTANCE:1; CLASS:RichEdit20A]", "IsVisible", "")
    If $focus1 = "1" Then
        $pg = "2"
    EndIf
    $focus1 = ControlCommand("AutoIt v3.2.4.9 Setup", "", "[INSTANCE:4; CLASS:Button]", "IsVisible", "")
    If $focus1 = "1" Then
        $pg = "3"
    EndIf
    $focus1 = ControlCommand("AutoIt v3.2.4.9 Setup", "", "[INSTANCE:1; CLASS:Edit]", "IsVisible", "")
    If $focus1 = "1" Then
        $pg = "4"
    EndIf
    ToolTip("PG"&$pg,0,0)
WEnd

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
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...