N.D
N.D

Reputation: 1049

Autoit script not working

I have an AutoIt script that works. I need to update the script to open an application and to press some buttons in some windows. The only thing that works is running the application: RunWait(exe file). When the application is running I need to click an OK button on the window that pops up and then click another button on the next windows but all of that is not working.

RunWait(exe file)
WinWaitActive("win title","",10)
ControlCommand("win title","",1,"check","")

This is the part that is not working.

Upvotes: 0

Views: 2638

Answers (1)

Milos
Milos

Reputation: 2946

First of, Dot use RunWait() , instead use Run(). RunWait will wait until the application is closed. Use AutoItWindowInfo tool in order to find the info on the control you want to manipulate.

Example:

ControlClick("[CLASS:Notepad]", "", "[CLASS:Edit; INSTANCE:1]")

Also use

Opt("WinSearchChildren", 1) ;0=no, 1=search children also

This will make sure your script can see the child windows.

Upvotes: 1

Related Questions