gadzail Posted November 30, 2006 Share Posted November 30, 2006 Hi, I would like to prevent an accidentally mouseclick on the close button of a window program. I have a program to test and it is quite slow so if I accidentally close the program it takes a lot of time to restart. It could be helpful a messagebox that ask me if I am sure to do that. Do you know how? Link to comment Share on other sites More sharing options...
gadzail Posted November 30, 2006 Author Share Posted November 30, 2006 I forgot to say that I have to open a lot of window child of this program so when I close all the window to start a new test It can happen that I also close the main program. That's why I need to do that! Link to comment Share on other sites More sharing options...
AutoChris Posted November 30, 2006 Share Posted November 30, 2006 You could throw up a GUI or a SplashText to cover the close button until after you are done testing. Link to comment Share on other sites More sharing options...
Valuater Posted November 30, 2006 Share Posted November 30, 2006 (edited) maybe try "ANYGUI.au3" in Example scripts maybe place a label or something over the exit button and when it is clicked it will bring up a message box just one idea/direction 8) EDIT: great minds think alike... but i was too slow!!! Edited November 30, 2006 by Valuater Link to comment Share on other sites More sharing options...
gadzail Posted November 30, 2006 Author Share Posted November 30, 2006 You could throw up a GUI or a SplashText to cover the close button until after you are done testing. It could be done... I'll try.Thanks. Link to comment Share on other sites More sharing options...
gadzail Posted November 30, 2006 Author Share Posted November 30, 2006 You could throw up a GUI or a SplashText to cover the close button until after you are done testing. maybe try "ANYGUI.au3" in Example scripts maybe place a label or something over the exit button and when it is clicked it will bring up a message box just one idea/direction 8) EDIT: great minds think alike... but i was too slow!!! It works... a Splashtext is perfect. Thanks all. I wrote this code (about the msgbox I will do it): OPT ("WinTitleMatchMode" , 2 ) TrayTip ("xx", " some text " & @CRLF, 10 , 1) HotKeySet("+!d", "F_exit") AdlibEnable("F_checkClose") while 1 sleep(100) wend Func F_checkClose() ConsoleWrite(@CRLF&"check") If WinExists("titlewindow") Then $size = WinGetPos("titlewindow") $xs=$size[0]+$size[2]-21 $ys=$size[1]-1 if WinActive("titlewindow") Then SplashTextOn("", " X ", 18, 18, $xs, $ys, 1+32, "") Else SplashOff() EndIf Else SplashOff() EndIf EndFunc Func F_exit() Exit EndFunc Link to comment Share on other sites More sharing options...
herewasplato Posted November 30, 2006 Share Posted November 30, 2006 perhaps another option:http://www.autoitscript.com/forum/index.ph...ost&p=66766 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
gadzail Posted December 1, 2006 Author Share Posted December 1, 2006 perhaps another option:http://www.autoitscript.com/forum/index.ph...ost&p=66766Nothing to say.. It is perfect...Thanks All for you fast reply. 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