Jump to content

Automating An Installation And Entering Text.


Recommended Posts

I think I know enough about running an installation setup and waiting for various windows to become active using a window title and text for example. I'm reasonably ok to be able to pass key strokes such Alt-N etc.

One of the installation dialogs of the 3rd party installer allows a change to the installation directory. I'm not sure though how I enter that text in that input field. I might want to change it to say, C:\Program Files\Wherever.

Can someone tell me how's the best way to do that. From my limited knowledge do I need to send N number of tabs until the textbox has the focus and then send the necessary text?

Link to comment
Share on other sites

Look at ControlSend() in the help file, get the controlID from the Au3Info.exe tool.

}{

Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

  • Moderators

Does the "Input" box have a Control ID? Maybe ControlSend() then.

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

Look at ControlSend() in the help file, get the controlID from the Au3Info.exe tool.

}{

I have 3.1.1 installed and the beta but I can't find the tool you are referring to. Is that somewhere else?

Edit: Never mind. I found it in the installation directory. I was confused for a moment as I was expecting to see it in the Programs list.

Edited by Peter Hamilton-Scott
Link to comment
Share on other sites

Attached screenshot shows what AU3Info displays when I run it. I positioned the cursor into the text field but AU3Info does not display the control ID. This leaves me wondering how I can position the cursor into the text field?

If go back to the previous dialog in the installation and then click Next I notice that tabbing twice takes me into the text field so that seems to work ok. I'd like to have used the control ID as that seems more absolute and precise.

Link to comment
Share on other sites

Attached screenshot shows what AU3Info displays when I run it. I positioned the cursor into the text field but AU3Info does not display the control ID. This leaves me wondering how I can position the cursor into the text field?

If go back to the previous dialog in the installation and then click Next I notice that tabbing twice takes me into the text field so that seems to work ok. I'd like to have used the control ID as that seems more absolute and precise.

i would Send("!r") then do a controlsettext on the filename field of the openfiledialog that comes up Edited by cameronsdad
Link to comment
Share on other sites

Attached screenshot shows what AU3Info displays when I run it. I positioned the cursor into the text field but AU3Info does not display the control ID. This leaves me wondering how I can position the cursor into the text field?

If go back to the previous dialog in the installation and then click Next I notice that tabbing twice takes me into the text field so that seems to work ok. I'd like to have used the control ID as that seems more absolute and precise.

It appears ALT-D will works. Am I missing something?

Link to comment
Share on other sites

It appears ALT-D will works. Am I missing something?

that would work also, but i'm not sure what that hotkey would do. i'd imagine you'd get a pic folder list, aka a treelistview, IMHO it's faster and easier to automate interaction with the common file open dialog.
Link to comment
Share on other sites

It appears ALT-D will works. Am I missing something?

Well spotted both of you bloodhounds!

Alt-D and Alt-R do work. Alt-D is better as it goes straight into the edit field and I will be setting the text field to a specific location.

Coming back to AU3Info I notice the control ID does change on some of the dialogs but not consistently so. If I select Notepad or hove around the Explorer the control ID seems to change all the time. Maybe the installation package I'm running uses 3rd party controls? Anyway, I know enough to start the automation sequence.

Link to comment
Share on other sites

Well spotted both of you bloodhounds!

Alt-D and Alt-R do work. Alt-D is better as it goes straight into the edit field and I will be setting the text field to a specific location.

Coming back to AU3Info I notice the control ID does change on some of the dialogs but not consistently so. If I select Notepad or hove around the Explorer the control ID seems to change all the time. Maybe the installation package I'm running uses 3rd party controls? Anyway, I know enough to start the automation sequence.

glad to help.
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...