Jump to content
ITMan2001

Can AutoIT do this?

Recommended Posts

ITMan2001

Hello,

I have an application that does not have a top tool bar drop down menu with an EXIT (close the program) option, the proper way to close the program is by clicking on the red X in the upper right of the window. The program can have 1 or may windows open, each of those windows are closed one by one (by clicking on the red X in the upper right) until no more windows are open, at this point the program is closed. Can AUTOIT automatically close that program whether it has 1 or many windows open after a certain amount of inactivity? Not sure AUTOIT can create a scrip that will accomplish this. The script should simulate clicking on the red X on each window until no more windows from that program are left open. Please help

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Hi @ITMan2001 :)

Take a look at Au3Info tool, and Control* functions :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
ViciousXUSMC

WinList() and go through the list WinClose() anything with a title pattern would be one way to simulate closing each window.

If it will not cause issues, you can just kill the whole process like Danp2 mentioned.

Share this post


Link to post
Share on other sites
ITMan2001

Thanks guys, I am not looking to close (terminate) the process the way Task manager would. Replicating clicking on the red X in upper right would be best

Share this post


Link to post
Share on other sites
Earthshine

did you do what @FrancescoDiMuro suggested?

  • Like 1

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
jdelaney
Posted (edited)

Use winclose on the main window.

 

That does the same functionality as pressing the x on the window.

 

Example, open notepad, enter in text, processclose on the process: process closes without going through the softwares exit processes (prompt user to save changes is not present)

 

Do the same with winclose...user IS prompted to save changes (just like if the x was passed)

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
ITMan2001

Hello Experts WinCLose works great, just one issue......sometimes when WinClose is applied the window being closed asks if you want to "save changes", I am then presented with   2 options, yes/no. Is there a way to configure the script so that if a follow pop up window shows up after WinClose, "yes" is selected?

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

×