Jump to content

Newbie needing Simple script to click "ok" on a warning


Recommended Posts

Hello,

AutoIT has been recommended to me to solve a problem with a 3rd party app (legacy) which uses a windows scheduled task to process some documents.

Occasionally an unknown error occurs, the 3rd party software company are aware and its low down on their fix list.

in the interim, the system administrator has to remote log in to a server and check if the error has occured, and clicks OK.

ONe of the other companies in the user group said they have the same problem and use AutoIT to click the offending dialogue.

Posted Image

So, AutoIT looks cool, but I am lazy, where do i need to go and look in order to quickly find out how to use AUtoIT to check if the dialogue is open, and if so send it {enter} or click..

I have used Nawk, windows records macro's etc in the past, and always googled, so I googled and found this:

http://www.autoitscript.com/autoit3/docs/intro/controls.htm

ControlClick("My Window", "", 254)
looks like what I am after, but I don't see or understand how to identify the dialogue box

I looked in the Window info exe but the dialogue box name does not seem to be showing.

where should i be looking for info on solving this problem?

many thanks

Sudonim

Link to comment
Share on other sites

excellent.

i made an au3 file with your code in it, saved it, compiled it, and copied it to the desktop of the server.

I ran it and nothing happened, other than the warning dialogue filckered.

i ran it again and it did indeed click Ok for me.

do you think i need to amend the script to tell it to run the same line twice because of the initial failure, then i can schedule it to run every 30 minutes while the other task is running.

Many thanks again for the super fast support!

Sudo

Link to comment
Share on other sites

Add a WinActivate("Warning", "") before that line and you will be just fine... that just made up a good rhyme. Yo!!!

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

Add a WinActivate("Warning", "") before that line and you will be just fine... that just made up a good rhyme. Yo!!!

Awesome,

many thanks.

Testing it with the main user, hoping to add the compiled script on the server as another scheduled task. Superb!

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