Shanheavel Posted January 17, 2010 Share Posted January 17, 2010 Hello,I've problem with "going from window 1# to window 2#"I want to have a script looks like it:- two windows,- first windows has button to: close first window and open second window,- second window has button to: close second window and open first window,Look at the picture:Click------------------Sorry for my bad English. I'm waiting for posts. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 Adrian777,Welcome to the AutoIt forum. Do you know the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever"? We try to be net makers and repairers here, not fishmongers. So, what have you tried so far? What code have you produced to try to do this?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Shanheavel Posted January 17, 2010 Author Share Posted January 17, 2010 (edited) Adrian777,Welcome to the AutoIt forum. Do you know the old saying: "Give a man a fish, you feed him for a day; give a man a net and you feed him forever"? We try to be net makers and repairers here, not fishmongers. So, what have you tried so far? What code have you produced to try to do this?M23Thanks for fast reply. I know it."Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."My menu:ClickI want to make menu looks like this. I don't want to make menu with functions GUICtrlCreateContextMenu or GUICtrlCreateMenu.So how I can going from window to window? Edited January 17, 2010 by Adrian777 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 Adrian777,When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. Now, that was a nice picture of a menu GUI, but where is your code that you wrote to produce it? M23P.S. Please use Code tags when you show us what you have done. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Shanheavel Posted January 17, 2010 Author Share Posted January 17, 2010 expandcollapse popup#include <GUIConstantsEx.au3> Menu() Func Menu() Local $parent1, $ok1, $cancel1 Opt("GUICoordMode", 2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) $parent1 = GUICreate("Nazwa", 235, 175) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") $Rozpocznij = GUICtrlCreateButton("Start.", 40, 10, 150, 30) GUICtrlSetOnEvent(-1, "Rozpocznij") $Zasady = GUICtrlCreateButton("Rules.",-1, 10, 150, 30) $adc = GUICtrlCreateButton("BUTTON.",-1, 10, 150, 30) GUICtrlSetOnEvent(-1, "CancelPressed") $Wyjscie = GUICtrlCreateButton("Wyjście.",-30, 15, 70, 40) GUICtrlSetOnEvent(-1, "WyjscieEvents") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd EndFunc Func Rozpocznij() EndFunc Func WyjscieEvents() $Wyjscie = MsgBox(4, "Zamykanie...", "Tak czy nie?' ") If $Wyjscie = 6 then Exit Else EndIf EndFunc Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE $Wyjscie = MsgBox(4, "Zamykanie...", "Tak czy nie?' ") If $Wyjscie = 6 then Exit Else EndIf EndSelect EndFunc This is my code. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 17, 2010 Moderators Share Posted January 17, 2010 (edited) Adrian777, This should give you the idea: expandcollapse popup#include <GUIConstantsEx.au3> Global $parent1, $Rozpocznij_child Menu() Func Menu() Local $ok1, $cancel1 Opt("GUICoordMode", 2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) $parent1 = GUICreate("Nazwa", 235, 175) GUISetOnEvent($GUI_EVENT_CLOSE, "WyjscieEvents") ; you can call the one exit function twice - see below $Rozpocznij = GUICtrlCreateButton("Start.", 40, 10, 150, 30) GUICtrlSetOnEvent(-1, "Rozpocznij") ; <<<<<<<<<<<<<<<<<< this is the new function $Zasady = GUICtrlCreateButton("Rules.", -1, 10, 150, 30) $adc = GUICtrlCreateButton("BUTTON.", -1, 10, 150, 30) ;GUICtrlSetOnEvent(-1, "CancelPressed") $Wyjscie = GUICtrlCreateButton("Wyjscie.", -30, 15, 70, 40) GUICtrlSetOnEvent(-1, "WyjscieEvents") ; calling the same function again here! GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd EndFunc ;==>Menu Func Rozpocznij() ; Hide the parent GUI GUISetState(@SW_HIDE, $parent1) ; Cretae the child $Rozpocznij_child = GUICreate("Rozpocznij", 235, 175) GUISetOnEvent($GUI_EVENT_CLOSE, "Rozpocznij_WyjscieEvents") ; This gets us back to the parent $Rozpocznij = GUICtrlCreateButton("Child 1", 40, 10, 150, 30) $Zasady = GUICtrlCreateButton("Child 2", -1, 10, 150, 30) $adc = GUICtrlCreateButton("Child 3", -1, 10, 150, 30) $Wyjscie = GUICtrlCreateButton("Wyjscie.", -30, 15, 70, 40) GUICtrlSetOnEvent(-1, "Rozpocznij_WyjscieEvents") ; As does this GUISetState(@SW_SHOW) EndFunc ;==>Rozpocznij Func Rozpocznij_WyjscieEvents() ; Delete the child and show the parent again! GUIDelete($Rozpocznij_child) GUISetState(@SW_Show, $parent1) EndFunc Func WyjscieEvents() $Wyjscie = MsgBox(4, "Zamykanie...", "Tak czy nie?' ") If $Wyjscie = 6 Then Exit EndFunc ;==>WyjscieEvents If you are going to use the other windows often it would be best to create all the GUIs at the beginning and then just hide/show them as required. Please ask if anything is unclear. M23 Edit: Pressed "Post" too soon! Edited January 17, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Shanheavel Posted January 17, 2010 Author Share Posted January 17, 2010 (edited) Melba23It works! Thanks a lot for help! Now I can fishing =) Edited January 17, 2010 by Adrian777 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