Jump to content

how to wait a process to finish before next recorded click


Recommended Posts

hi

i had recorded a installation of Foobar

my first question is .i want to wait before last two recorded clicks as it runs correctly on slow windows i dont want to use sleep().

second question. how can i pack exe file of script and app. file that i see one file and when i click, it install foobar silently

thanku

here is the script

Opt("WinWaitDelay",100)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Run('foobar2000_v1.0.2.1.exe')

_WinWaitActivate("foobar2000 v1.0.2.1 Setup","")

MouseClick("left",379,361,1)

_WinWaitActivate("foobar2000 v1.0.2.1 Setup ","")

MouseClick("left",379,361,1)

_WinWaitActivate("foobar2000 v1.0.2.1 Setup","")

MouseClick("left",379,361,1)

_WinWaitActivate("foobar2000 v1.0.2.1 Setup ","")

MouseClick("left",379,361,1)

MouseClick("left",379,361,1)

MouseClick("left",379,361,1)

MouseClick("left",190,180,1)

MouseClick("left",373,368,1)

#region --- Internal functions Au3Recorder Start ---

Func _WinWaitActivate($title,$text,$timeout=0)

WinWait($title,$text,$timeout)

If Not WinActive($title,$text) Then WinActivate($title,$text)

WinWaitActive($title,$text,$timeout)

Link to comment
Share on other sites

To wait for a process to end use function "ProcessWaitClose".

I would suggest to replace the "MouseClick" calls with "Controlclick" as this is independant of the GUI position.

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

To wait for a process to end use function "ProcessWaitClose".

I would suggest to replace the "MouseClick" calls with "Controlclick" as this is independant of the GUI position.

thanks

it works

but controlclick is still troubling plz give me syntax for the last mouseclick where i have to click on finish button

Link to comment
Share on other sites

In short:

You need the Window title and the ControlId. To get the ControlId use AutoITs Window Info Tool.

Edited by water

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

In short:

You need the Window title and the ControlId. To get the ControlId use AutoITs Window Info Tool.

thanx dud

u r great

it works fine in all windows now :-)

plz help me to work with If .

if the program is not installed the program window shows only buttoN QUIT and APPLY,if program is installed it shows UNINSTALL , QUIT , APPLY in same sequence

i want to check that if the program is allready installed then click on QUIT otherwirs APPLY(install),

PLZ show me how IF can do it or i have to add some thing else?

Link to comment
Share on other sites

thanx dud

u r great

it works fine in all windows now :-)

plz help me to work with If .

if the program is not installed the program window shows only buttoN QUIT and APPLY,if program is installed it shows UNINSTALL , QUIT , APPLY in same sequence

i want to check that if the program is allready installed then click on QUIT otherwirs APPLY(install),

PLZ show me how IF can do it or i have to add some thing else?

I can't check it at the moment (no PC with AutoIT available) but I would do the following. Get the position of the UNINSTALL control using function ControlGetPos. If @error = 1 then the control could not be found and you can do the installation.

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

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