Sign in to follow this  
Followers 0
Yaelh

how to check if save is prompted for

7 posts in this topic

Hi All,

I was wondering if anyone can help me - I have a situation where when running a program

from a script before exiting the program I need to check if the save message will popup or not

and if so then to save.

I know I can always save before exiting but this seems not to be good enough.

I use

send("{alt}")

send("f")

send("x")

and then somethimes I'm prompted for a save and sometimes not.

So how can I check if I was prompted for a save or not ?

Thanks in Advance

Share this post


Link to post
Share on other sites



Hi All,

I was wondering if anyone can help me - I have a situation where when running a program

from a script before exiting the program I need to check if the save message will popup or not

and if so then to save.

I know I can always save before exiting but this seems not to be good enough.

I use

send("{alt}")

send("f")

send("x")

and then somethimes I'm prompted for a save and sometimes not.

So how can I check if I was prompted for a save or not ?

Thanks in Advance

What App is it?

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Hi All,

I was wondering if anyone can help me - I have a situation where when running a program

from a script before exiting the program I need to check if the save message will popup or not

and if so then to save.

I know I can always save before exiting but this seems not to be good enough.

I use

send("{alt}")

send("f")

send("x")

and then somethimes I'm prompted for a save and sometimes not.

So how can I check if I was prompted for a save or not ?

Thanks in Advance

Get the characteristics of the message window that asks for the save (title, text) and use it with the WinExists() function:

If WinExists("Save File", "Do you want to save?") Then
; Handle if it did pop up
Else
; Handle if it did not
EndIf

:o


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

heres what i use with notepad

WinClose($LOG_TITLE)
If WinExists("Notepad", "&Yes") Then ControlClick("Notepad", "&Yes", "Button1")

edit: add attachment

Edited by pecloe

Share this post


Link to post
Share on other sites

What App is it?

addobe premier elements

Share this post


Link to post
Share on other sites

Get the characteristics of the message window that asks for the save (title, text) and use it with the WinExists() function:

If WinExists("Save File", "Do you want to save?") Then
; Handle if it did pop up
Else
; Handle if it did not
EndIf

:o

Thanks, ill try it out an hopefully it will work

Share this post


Link to post
Share on other sites

heres what i use with notepad

WinClose($LOG_TITLE)
If WinExists("Notepad", "&Yes") Then ControlClick("Notepad", "&Yes", "Button1")

edit: add attachment

Thanks, ill try it out an hopefully it will work

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  
Followers 0