Jump to content

Recommended Posts

Posted (edited)

I'm trying to get the following code to work. I just want to press the "OK" button, but it won't happen. I've use ControlSend as well as the following code. Ive also tried ControlClick but every time I use the Window Info tool, the control (the OK button) has a different control number.

Run("spybotsd15he-beta1.exe")
WinWaitActive("Open File - Security Warning")
ControlClick("Open File - Security Warning", "run this file", "[ID:4423]")
WinWaitActive("Select Setup Language", "&Select the language")
ControlFocus("Select Setup Language", "Select the language", "")
Send("{ENTER}")

It just hangs at the screenshot I've included.

thanks for your help.

Posted Image

Posted Image

Edited by axslinger
Posted

I'm trying to get the following code to work. I just want to press the "OK" button, but it won't happen. I've use ControlSend as well as the following code. Ive also tried ControlClick but every time I use the Window Info tool, the control (the OK button) has a different control number.

Run("spybotsd15he-beta1.exe")

WinWaitActive("Open File - Security Warning")

ControlClick("Open File - Security Warning", "run this file", "[iD:4423]")

WinWaitActive("Select Setup Language", "&Select the language")

ControlFocus("Select Setup Language", "Select the language", "")

Send("{ENTER}")

It just hangs at the screenshot I've included.

thanks for your help.

Probably because it's waiting on the highlighted line above to appear.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Posted

Probably because it's waiting on the highlighted line above to appear.

I guess I should have pointed out, by then its already past that line. Its the first thing that appears after the run line.

Brian

Posted (edited)

I've never had much luck using WinWaitActive in scripts such as this. Try using just WinWait if Danwilli's observations don't resolve your issue.

Edit: Poor wording.

Edited by ksmith247

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Posted

That version of my code had been butchered from trying numerous things. This is the latest thing I've tried:

Run("spybotsd15he-beta1.exe")
WinWaitActive("Open File - Security Warning")
ControlClick("Open File - Security Warning", "run this file", "[ID:4423]")
WinWait("Select Setup Language","")
Send("{ENTER}")

It seems to me that should work but it just pauses with the icon in the tray. All I want to do is click "OK"...at this rate it'll be 2050 before I can make anything useful from AutoIT. (I do however appreciate everyones help!).

Brian

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...