Jump to content
Sign in to follow this  

Gui Yes Response

Recommended Posts



I just found out about AutoIT-v3, and downloaded a copy. I have checked the documentation and forums, and did not find anything similar to my problem. Before I spend some the time to learn AutoIT, I thought I would ask, if it might solve the problem I have.

We have a Visual FoxPro database application running. Some of the users forget to exit the program at the end of the day. This is causing problems backing up the files at night.

My first idea was to write a script file to close the application. The plan was to use the XP utility Scheduled Tasks to run the script file every night before my backup program runs.

Here is the script file that was used:

@echo off

taskkill /im program.exe /f

This worked, but /f switch forced the program closed and caused other problems. When the /f switch is removed the application prompts with a GUI dialog box Close Program, and Yes and No buttons. I found out that it is not possible to respond to a GUI prompt with a script file. My question is it possible with AutoIT to respond Yes to a GUI prompt?



Share this post

Link to post
Share on other sites

first off, i believe that that's batch code...


Use au3info.exe to get the controlID of the gui prompt & then use ControlClick (read about it in the helpfile)


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post

Link to post
Share on other sites

If you are new to AutoIT and would like to get the basics down quicker, check out this awesome new coaching tool...

And if you find it useful ...vote :)


~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post

Link to post
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
Sign in to follow this