Yaelh Posted February 14, 2006 Share Posted February 14, 2006 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 More sharing options...
blademonkey Posted February 14, 2006 Share Posted February 14, 2006 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 AdvanceWhat App is it? ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 14, 2006 Share Posted February 14, 2006 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 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 More sharing options...
pecloe Posted February 15, 2006 Share Posted February 15, 2006 (edited) heres what i use with notepad WinClose($LOG_TITLE) If WinExists("Notepad", "&Yes") Then ControlClick("Notepad", "&Yes", "Button1") edit: add attachment Edited February 15, 2006 by pecloe Link to comment Share on other sites More sharing options...
Yaelh Posted February 15, 2006 Author Share Posted February 15, 2006 What App is it?addobe premier elements Link to comment Share on other sites More sharing options...
Yaelh Posted February 15, 2006 Author Share Posted February 15, 2006 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 Thanks, ill try it out an hopefully it will work Link to comment Share on other sites More sharing options...
Yaelh Posted February 15, 2006 Author Share Posted February 15, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now