softhunterdevil Posted March 21, 2007 Share Posted March 21, 2007 This is no a problem. This is a query yo satisfy the burning mind. Why I need to write 'exit' for close button, while minimize button works automatically? I know that more code can be added to close,minimize,maximize,restore events ... but the default action of each should be as normal windows behave. Minimize button functions as normal without writing a single line of code ... but I have to write codes to make the close button effective. Why ? Link to comment Share on other sites More sharing options...
Uten Posted March 21, 2007 Share Posted March 21, 2007 Although it has been a while since I wrote anything in AutoIt, I think you have something else going on in your script. I usually did not write any exit statements for the close button. So please post a simple sample proving your point. Happy scripting .. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
PantZ4 Posted March 21, 2007 Share Posted March 21, 2007 To give you the opportunity to make a function to run when you click the close button. Like save settings, note, files, etc. Link to comment Share on other sites More sharing options...
theguy0000 Posted March 21, 2007 Share Posted March 21, 2007 (edited) probably for convenience because some people may want their program to act differently when the X is pressed. For example, some people might want the whole program to Exit when it's pressed, while others might just want to hide the gui while still keeping the program running in the background. So users are able to do this because AutoIt has them write their own $GUI_MSG_CLOSE function. Edited March 21, 2007 by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
softhunterdevil Posted March 21, 2007 Author Share Posted March 21, 2007 (edited) To give you the opportunity to make a function to run when you click the close button. Like save settings, note, files, etc. Didnot I tell you that I know user can write custom functions on these events ? Check my first post. I asked a different thing. Why I need to write 'exit' for close button, while minimize button works automatically? It means ... I need to write ... GUISetOnEvent($GUI_EVENT_CLOSE, "close_fnc") and added two buttons .. which on click show two different message... just that. Edited March 21, 2007 by softhunterdevil Link to comment Share on other sites More sharing options...
PantZ4 Posted March 21, 2007 Share Posted March 21, 2007 (edited) Didnot I tell you that I know user can write custom functions on these events ? Check my first post.Did I not tell you why? The Opportunity! Why I need to write 'exit' for close button, while minimize button works automatically? It means ... I need to write ... GUISetOnEvent($GUI_EVENT_CLOSE, "close_fnc") Edited March 21, 2007 by Mr. Zero Link to comment Share on other sites More sharing options...
softhunterdevil Posted March 21, 2007 Author Share Posted March 21, 2007 Did I not tell you why? The Opportunity! Because: Func close_fnc() _RunMySaveFunction() Exit EndFunc You will never understand what you are not capable of. One can add custom script to minimize or maximize button... and he/she dont write code for minimizing or maximizing as they function by default. Similarly ... instead of writing close script for close button ... close button should behave normally. User will only write their own functions to close button before exit. May God help you ! Link to comment Share on other sites More sharing options...
jvanegmond Posted March 21, 2007 Share Posted March 21, 2007 (edited) Lmao! You might as well ask why bananas are curved. Your question serves no purpose! Edited March 21, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
SadBunny Posted March 21, 2007 Share Posted March 21, 2007 Lmao! You might as well ask why bananas are curved. Your question serves no purpose!(offtopic but informative mode)Though I agree with your literally and figuratively bold statement, I feel an uncontrollable urge to answer your first question. I have learned a long time ago that bananas are curved because the turgor in the banana shell (is shell the correct term?). Just like in all other growing plants, trees etc., the turgor contracts the cells when sun shines on it. But because a banana is too heavy to stand upright (like a plant or tree), it's own weight keeps it hanging down. The turgor in the banana shell is enough though to keep fruit itself curved. When bananas are grown by using artificial sunlight that comes from beneath, the bananas remain perfectly straight... BTW I guess this should be a sticky support topic! (/offtopic but informative mode) Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
seandisanti Posted March 21, 2007 Share Posted March 21, 2007 (offtopic but informative mode)Though I agree with your literally and figuratively bold statement, I feel an uncontrollable urge to answer your first question. I have learned a long time ago that bananas are curved because the turgor in the banana shell (is shell the correct term?). Just like in all other growing plants, trees etc., the turgor contracts the cells when sun shines on it. But because a banana is too heavy to stand upright (like a plant or tree), it's own weight keeps it hanging down. The turgor in the banana shell is enough though to keep fruit itself curved. When bananas are grown by using artificial sunlight that comes from beneath, the bananas remain perfectly straight... BTW I guess this should be a sticky support topic! (/offtopic but informative mode)cool, thanks for the info. 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