gadzail Posted November 30, 2006 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?
gadzail Posted November 30, 2006 Author 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!
AutoChris Posted November 30, 2006 Posted November 30, 2006 You could throw up a GUI or a SplashText to cover the close button until after you are done testing.
Valuater Posted November 30, 2006 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
gadzail Posted November 30, 2006 Author 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.
gadzail Posted November 30, 2006 Author 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
herewasplato Posted November 30, 2006 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]
gadzail Posted December 1, 2006 Author 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.
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