Sign in to follow this  
Followers 0
usera

send

8 posts in this topic

#1 ·  Posted (edited)

Greating,

I am going to create a new script for install automatically the application. I have got follwing screen, all the processes in the same windows title `Window title`

once, you enter some informaion then click on next then you go to next step ( step 2. step 3). Until finish.

I want to use `send` to automatical the installation processing

+-------------------------------------------------------------------------------------------------------------------------------------------

| Window title

+-----------+--------------------------------------------------------------------------------------------------------------------------------

| Step 1 | Username _________ Password__________ (CheckBox) I Ageee

+-----------+------------------------------------------------------------------------------------------------------------------------------------

| Step 2 |

+-----------+------------------------------------------------------------------------------------------------------------------------------------

| Step 3 |

+-----------+----------------

| .......

+-----------------------------

| .......

+ --------------------------------------------------------------------------------------------------------------------------------------------

| Previous Next cancle

+--------------------------------------------------------------------------------------------------------------------------------------------

I got some questions here:

1. How to make sure the windows change is what I need, how I know right now is in step 1 or step 2 because the same window title.

2. Once installation is finished, then there is a button called "Finish" I need to click on it to finish the full process, how can I know when the "Finish" shows up. for some machine the full process take about 15 minutes some of machine only take 4 minutes.

3. in the full process, some action I have to use mouse(like agee checkbox), how can I get the exact location (position) of the mouse, if the screen resolution are different

thanks

usera

Edited by usera

Share this post


Link to post
Share on other sites



Did you check if the software can be installed using command line parameters?

What kind of installer does the program use?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Did you check if the software can be installed using command line parameters?

What kind of installer does the program use?

Thanks Water, do Not have silent install option. from HP

Share this post


Link to post
Share on other sites

1. How to make sure the windows change is what I need, how I know right now is in step 1 or step 2 because the same window title.

Use function WinWait to wait for the window displayed when you move to step 2 or 3 (even when the window title doesn't change). Use parameter "text" to wait for a text which is unique for step 2 or 3.

2. Once installation is finished, then there is a button called "Finish" I need to click on it to finish the full process, how can I know when the "Finish" shows up. for some machine the full process take about 15 minutes some of machine only take 4 minutes.

Use AutoIts Window Info Tool to get the ControlID of the finish button and then use ControlClick to click this button.

3. in the full process, some action I have to use mouse(like agee checkbox), how can I get the exact location (position) of the mouse, if the screen resolution are different

Again, use AutoIts Window Info tool to get the ControlID of the checkbox etc. and use Control* functions to click the control or input some data.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you can do a lot of things with the Control functions. in the helpfile, type in "Control", and you will see things like "ControlClick", "ControlCommand", "ControlDisable" and other things below those. You can use all of those instead of using the Send function.

to answer you other questions:

1. in the Control functions, most of them have the first two parameters as "title", "text". so you can use text from the window you want to use instead of just the name of it. otherwise, you might be able to pull something off by using other properties of the window. use the "AutoIt Window Info" tool to get properties you can use (look up "Window Titles and Text (Advanced)" in the help file. use that instead of the window name.

2. use something like

Local $isEnabled
Do
      $isEnabled = ControlCommand ( "title", "text", controlID, "IsEnabled")
Until $isEnabled = 1

3. if you still want to use the mouse, you could do something like

ControlGetPos ( "title", "text", controlID )

which would tell you the mouse position of a control relative to its window. then use the WinGetPos function, and add the x and y from the control position to the window position.

or you could just use the ControlClick function :)

but you could easily do everything you need to by using the control functions, and just use the "AutoIt Window Info" tool to get all the control IDs and whatnot.

Edit: looks like my post was a little late, water got there before me ;)

Edited by mischieftoo

Share this post


Link to post
Share on other sites

Use function WinWait to wait for the window displayed when you move to step 2 or 3 (even when the window title doesn't change). Use parameter "text" to wait for a text which is unique for step 2 or 3.

Use AutoIts Window Info Tool to get the ControlID of the finish button and then use ControlClick to click this button.

Again, use AutoIts Window Info tool to get the ControlID of the checkbox etc. and use Control* functions to click the control or input some data.

Thanks water, Learning now

Share this post


Link to post
Share on other sites

you can do a lot of things with the Control functions. in the helpfile, type in "Control", and you will see things like "ControlClick", "ControlCommand", "ControlDisable" and other things below those. You can use all of those instead of using the Send function.

to answer you other questions:

1. in the Control functions, most of them have the first two parameters as "title", "text". so you can use text from the window you want to use instead of just the name of it. otherwise, you might be able to pull something off by using other properties of the window. use the "AutoIt Window Info" tool to get properties you can use (look up "Window Titles and Text (Advanced)" in the help file. use that instead of the window name.

2. use something like

Local $isEnabled
Do
      $isEnabled = ControlCommand ( "title", "text", controlID, "IsEnabled")
Until $isEnabled = 1

3. if you still want to use the mouse, you could do something like

ControlGetPos ( "title", "text", controlID )

which would tell you the mouse position of a control relative to its window. then use the WinGetPos function, and add the x and y from the control position to the window position.

or you could just use the ControlClick function :)

but you could easily do everything you need to by using the control functions, and just use the "AutoIt Window Info" tool to get all the control IDs and whatnot.

Edit: looks like my post was a little late, water got there before me ;)

Thanks, Learning now

Share this post


Link to post
Share on other sites

you can do a lot of things with the Control functions. in the helpfile, type in "Control", and you will see things like "ControlClick", "ControlCommand", "ControlDisable" and other things below those. You can use all of those instead of using the Send function.

to answer you other questions:

1. in the Control functions, most of them have the first two parameters as "title", "text". so you can use text from the window you want to use instead of just the name of it. otherwise, you might be able to pull something off by using other properties of the window. use the "AutoIt Window Info" tool to get properties you can use (look up "Window Titles and Text (Advanced)" in the help file. use that instead of the window name.

thanks for the help, but i found that i was realy hard to understand the title and text.

for example, I open notepad then key in "ABC" then keep it open; I open another notepad key in "DEF", how can I use control function to get which one is ABC, and which one is DEF?

Thanks

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