Jump to content

Where are the default functions (withou include any thing) located?


h711
 Share

Recommended Posts

Ok, I found the reason. For a 6 page installer, it has one dialog box as main, and 6 sub-dialog box as each page. The ControlClick will locate the main dialog by title and text, then it will search the control ID from dialog layer 1 to 6. So if it find a button whoes ID is 1025 on layer 1, it will stop there. If not found, then it will search layer 2 then 3.... Some installer will auto bring current page to the most top layer, but mine won't. This is why it would be nice to have functions such as ControlClick to check if the dialog box is visible or not. In my case, the current page is the only visible page, but not the top most page.

Link to comment
Share on other sites

Yes, I gave you an idea. Check the visibility state with ControlCommand(). If it's visible, click it.

I can, but it won't help. Let's say, I reached page 5, and checked this button (id 1025) is visible. Then the script will controlclick the button (id 1025). The problem is, the controlclick will located another button (id 1025) on page 4 becasue page 4 is always on a higher layer than page 5, even when the page 4 is hided.

Link to comment
Share on other sites

  • Moderators

I can, but it won't help. Let's say, I reached page 5, and checked this button (id 1025) is visible. Then the script will controlclick the button (id 1025). The problem is, the controlclick will located another button (id 1025) on page 4 becasue page 4 is always on a higher layer than page 5, even when the page 4 is hided.

For the love of god. Then what in the world do you do then?

Loop through all the controls with WinGetClassList and check them if they are on top/visible/enabled whatever.

_CtrlGetByPos()

Or

_WinGetCtrlInfo() may be handy as well.

I hate guessing, especially with someone so determined to make us think they've tried it all, and are looking for some magic cure.

I personally never try to do this, installers almost always have command line parameters that you can run silently and never even concern yourself with this.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I can, but it won't help. Let's say, I reached page 5, and checked this button (id 1025) is visible. Then the script will controlclick the button (id 1025). The problem is, the controlclick will located another button (id 1025) on page 4 becasue page 4 is always on a higher layer than page 5, even when the page 4 is hided.

"Hided"? You mean hidden don't you? If you're so resolved to do this the hard way why don't you just use coordinates in relation to the screen width/height? The installer should more or less stay stationary and you can just come up with a formula to click where the button that you need is.

Link to comment
Share on other sites

  • Moderators

If I know there is an easier way, trust me, I won't even post here.

My goal is not just run the simple installation.......

Any way, thanks for spending time to help me.

Pretty much anything you can do with an installation manually, you can do with command lines.

So to be blunt, what are you really working on and what is giving you the issues?

Anyway, I'm done... gave you all I can think of and some extra tools to work with... GL.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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