Jump to content

Recommended Posts

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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 ;)

Edited by mischieftoo
Link to comment
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

Link to comment
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
Link to comment
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

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