Jump to content

Recommended Posts

Posted

I have a simple script that automates button clicks. My application sends an email, but outlook has two warning windows to alert automated email sending. The first simply states that a program is trying to send email. The secont says the same thing but has a progress bar that must finish before the buttons become active. I've handled this with a Sleep command, but wondered if there was a way for AutoIt to sense that the buttons have become active so that I can send the commands. Here is the script:

;Wait for the first window then activate the OK button and then ENTER

WinWaitActive("Microsoft Office Outlook")

Send("{LEFT}")

Sleep(10)

Send("{ENTER}")

;Wait for the second window, then wait 6 seconds for the buttons to become active.

WinWaitActive("Microsoft Office Outlook")

SLEEP(6000)

Send("{LEFT}")

Send("{ENTER}")

  • Moderators
Posted

Look at ControlCommand() and IsEnabled.. maybe that might help.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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