Jump to content

how to check if save is prompted for


Yaelh
 Share

Recommended Posts

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

Link to comment
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

Link to comment
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
Link to comment
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
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...