Sign in to follow this  
Followers 0
Bokkie

Automating An Installation And Entering Text.

12 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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!

Share this post


Link to post
Share on other sites

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


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

if it does have a control id, i'd actually suggest ControlSetText(). i think it's quicker because you don't have the sendkeydelay and keydowndelay for each character.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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?

Share this post


Link to post
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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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.

Share this post


Link to post
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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I'd suggest for you to take a look at this script and see if it helps at all.

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