Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

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.
  • 2 weeks later...
Posted

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?

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