bennyvo Posted February 26, 2005 Posted February 26, 2005 (edited) hi, I figure it out for my last question. my new question, how do i make it so when i click on the "X' it close the interface and click "_" to minimize it. thanks ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 262, 70,(@DesktopWidth-262)/2, (@DesktopHeight-70)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Label_1 = GuiCtrlCreateLabel("Hello", 10, 10, 270, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WinWaitActive("Untitled - Notepad") while 1=1 send ("z") wEnd WEnd Exit Edited February 26, 2005 by bennyvo
Developers Jos Posted February 26, 2005 Developers Posted February 26, 2005 (edited) hi,I figure it out for my last question.my new question, how do i make it so when i click on the "X' it close the interface and click "_" to minimize it.thanks<{POST_SNAPBACK}>X and _ work fine when you remove these lines:WinWaitActive("Untitled - Notepad") while 1=1 send ("z") wEnd Edited February 26, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
bennyvo Posted February 27, 2005 Author Posted February 27, 2005 lol...thanks for trying. I already know that...i need those line and it doesn't work that's why i need help here.
Developers Jos Posted February 27, 2005 Developers Posted February 27, 2005 (edited) lol...thanks for trying.<{POST_SNAPBACK}>I already know that...i need those line and it doesn't work that's why i need help here.<{POST_SNAPBACK}>As soon as you put in the WinWaitActive("Untitled - Notepad"), your script makes a hard stop and wait for Notepad to become active.Then when it does it ends up in an endless loop.Maybe have a look and see if you can get it to work with GUISetOnEvent() ....Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") Edited February 27, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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