sandin Posted August 18, 2007 Share Posted August 18, 2007 (edited) I have smth like this: expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode", True) GuiCreate("MyGUI", 312, 227,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Button_1 = GuiCtrlCreateButton("Button1", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminate") GUICtrlSetOnEvent($Button_1, "NewGui") GuiSetState() func terminate () Exit EndFunc func NewGui () Guicreate("MyGUI 2", 300, 200, 0, 0) $Button_2 = GUICtrlCreateButton("Button2", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminateNewGUI") GUICtrlSetOnEvent($Button_2, "test") GuiSetState() EndFunc func terminateNewGUI () ;NOW, IF I WANT TO CLOSE ONLY NEW GUI WINDOW, WHAT SHOULD I WRITE HERE??? "EXIT" WON'T WORK COUSE IT WILL CLOSE THE FIRST GUI WINDOW TOO... EndFunc func test () MsgBox(0, "test", "button works") EndFunc While 1 sleep (10) WEnd Can some tells me how can I close only 2nd gui window, without closing the first one? Oh, and yeah, in my script I have many, many, many functions, and everytime I open SciTE they are all expanded, is there a way (one click, or similar) for me to shrink ("-") them all? Edited August 18, 2007 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
ChrisL Posted August 18, 2007 Share Posted August 18, 2007 This is one way include <guiConstants.au3> $gui1 = GuiCreate("Gui1",100,100,20,20) GuiSetState() $gui2 = GuiCreate("Gui2",100,100,140,20) GuiSetState() While 1 $msg = GuiGetMsg(1) Switch $msg[0] Case $GUI_EVENT_CLOSE GuiDelete( $msg[1] ) If NOT WinExists($gui1) and NOT WinExists($gui2) then Exitloop Case Else EndSwitch WEnd [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
cramaboule Posted August 18, 2007 Share Posted August 18, 2007 expandcollapse popup#include <GuiConstants.au3> Global $gui1, $gui2 Opt("GUIOnEventMode", True) $gui1=GuiCreate("MyGUI", 312, 227,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Button_1 = GuiCtrlCreateButton("Button1", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminate") GUICtrlSetOnEvent($Button_1, "NewGui") GuiSetState() func terminate () Exit EndFunc func NewGui () $gui2=Guicreate("MyGUI 2", 300, 200, 0, 0) $Button_2 = GUICtrlCreateButton("Button2", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminateNewGUI") GUICtrlSetOnEvent($Button_2, "test") GuiSetState() EndFunc func terminateNewGUI () GUIDelete($gui2) EndFunc func test () MsgBox(0, "test", "button works") EndFunc While 1 sleep (10) WEnd easy..... My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Kiesp Posted August 18, 2007 Share Posted August 18, 2007 (edited) U will have to call the two gui somthing.. fx gui1 and gui2 expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode", True) $gui1 = GuiCreate("MyGUI", 312, 227,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Button_1 = GuiCtrlCreateButton("Button1", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminate") GUICtrlSetOnEvent($Button_1, "NewGui") GuiSetState() func terminate () Exit EndFunc func NewGui () $gui2 = Guicreate("MyGUI 2", 300, 200, 0, 0) $Button_2 = GUICtrlCreateButton("Button2", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminateNewGUI") GUICtrlSetOnEvent($Button_2, "test") GuiSetState() EndFunc func terminateNewGUI () GUICtrlDelete($gui2) EndFunc func test () MsgBox(0, "test", "button works") EndFunc While 1 sleep (10) WEnd Edited August 18, 2007 by Kiesp http://www.autoitscript.com/forum/index.php?showtopic=69911 <-- Best hacker ever :D Link to comment Share on other sites More sharing options...
ChrisL Posted August 18, 2007 Share Posted August 18, 2007 (edited) This is how to do it in your code expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode", True) GuiCreate("MyGUI", 312, 227,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Button_1 = GuiCtrlCreateButton("Button1", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminate") GUICtrlSetOnEvent($Button_1, "NewGui") GuiSetState() func terminate () Exit EndFunc func NewGui () Guicreate("MyGUI 2", 300, 200, 0, 0) $Button_2 = GUICtrlCreateButton("Button2", 70, 20, 180, 40) GUISetOnEvent($GUI_EVENT_CLOSE, "terminateNewGUI") GUICtrlSetOnEvent($Button_2, "test") GuiSetState() EndFunc func terminateNewGUI () GuiDelete(@GUI_WINHANDLE ) ;NOW, IF I WANT TO CLOSE ONLY NEW GUI WINDOW, WHAT SHOULD I WRITE HERE??? "EXIT" WON'T WORK COUSE IT WILL CLOSE THE FIRST GUI WINDOW TOO... EndFunc func test () MsgBox(0, "test", "button works") EndFunc While 1 sleep (10) WEnd Edited August 18, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
sandin Posted August 18, 2007 Author Share Posted August 18, 2007 oh lol, thank you what about my other issuie? Shrinking all func. on 1 click? is it posible? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 18, 2007 Share Posted August 18, 2007 oh lol, thank you what about my other issuie? Shrinking all func. on 1 click? is it posible?WinMinimizeAll() and WinMinimizeAllUndo(). 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...
ChrisL Posted August 18, 2007 Share Posted August 18, 2007 (edited) WinMinimizeAll() and WinMinimizeAllUndo(). I think he means in Scite where you can click the minus sign next to a function or a loop and close that group up he wants to close them all up with 1 click or default open an au3 script with them all closed up. Jdeb is the man for this question I think Edited August 18, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
martin Posted August 18, 2007 Share Posted August 18, 2007 oh lol, thank you what about my other issuie? Shrinking all func. on 1 click? is it posible?Scite View menu|Toggle all folds Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 18, 2007 Share Posted August 18, 2007 I think he means in Scite where you can click the minus sign next to a function or a loop and close that group up he wants to close them all up with 1 click or default open an au3 script with them all closed up. Jdeb is the man for this question I think Yep, didn't read closely enough... 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...
ChrisL Posted August 18, 2007 Share Posted August 18, 2007 Scite View menu|Toggle all foldsWow cool I never new that [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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