Jump to content

Help with script


Recommended Posts

Can anyone look at this and point me in the right direction to get it right.

The windows keep opening, when the buttons pressed.

I only want one instance. Like a tab thing at the top.

GUICreate("Recipe Management v1.3", 1280, 1054)
    GUISetState()



    
    $button1= GUICtrlCreateButton("Planner", 1, 0, 160, 160)
    $button2=GUICtrlCreateButton("Recipes", 160, 00, 160, 160)
    $button3=GUICtrlCreateButton("Shopping", 320, 00, 160, 160)
    $button4=GUICtrlCreateButton("Inventory", 480, 00, 160, 160)
    $button5=GUICtrlCreateButton("Phonebook", 640, 00, 160, 160)
    $button6=GUICtrlCreateButton("System Settings", 800, 00, 160, 160)
    $buttonclose=GUICtrlCreateButton("Shutdown", 960, 00, 160, 160)
    
    GUICtrlCreateDate("Hello", 333, 333, 192, 122)
    

; Run the GUI until the dialog is closed
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

                

    
Case $button1

GUICreate("Planner", 1100, 890, 122, 126, $WS_POPUPWINDOW)

GUISetFont(20, 400, 2, $font)   ; will display underlined characters
GUICtrlCreateLabel("New Week", 222, 222)
GUICtrlCreateLabel("View Weekly Plan", 222, 292)
GUICtrlCreateLabel("Swap & Replace", 222, 342)
GUICtrlCreateLabel("View Calander", 222, 422)
$buttonremind=GUICtrlCreateButton("Add Reminder", 222, 382);





    GUISetState()
;
    

    
    

    

;
    


    

                

            Case $button2

    GUICreate("Recipe Screen", 1100, 890, 122, 126, $WS_POPUPWINDOW)
GUISetFont(20, 400, 2, $font)   ; will display underlined characters
GUICtrlCreateLabel("Add Recipe To Database", 222, 222)
GUICtrlCreateLabel("Make Today's Recipe", 222, 292)
GUICtrlCreateLabel("Search For Recipe", 222, 342)
GUICtrlCreateLabel("Print A Recipe", 222, 392)
GUICtrlCreateButton("Print A Recipe", 222, 392)

    GUISetState(@SW_SHOW)



                
                
            Case $button3
                
                GUICreate("Background", 1100, 890, 122, 126, $WS_POPUPWINDOW)

    GUISetState(@SW_SHOW)
            ;
            Case $button4
            ;
            Case $button5
                
                    GUICreate("Phonebook", 1100, 890, 122, 126, $WS_POPUPWINDOW)
GUISetFont(20, 400, 2, $font)   ; will display underlined characters
GUICtrlCreateLabel("Add Contact", 222, 222)
GUICtrlCreateLabel("Search For Contact", 222, 292)


    GUISetState(@SW_SHOW)
            ;
                
            Case $button6
                
GUICreate("settings", 1100, 890, 122, 126, $WS_POPUPWINDOW)
GUISetFont(20, 400, 2, $font)   ; will display underlined characters
GUICtrlCreateLabel("Item Management", 222, 222)
GUICtrlCreateLabel("Video Surveillance ", 222, 292)
GUICtrlCreateLabel("Backup/Restore Database ", 222, 342)
GUICtrlCreateLabel("Email Settings", 222, 392)
GUICtrlCreateLabel("Date & Time", 222, 432)

    GUISetState(@SW_SHOW)
;

            Case $buttonclose
                ExitLoop
            Case Else
        EndSwitch
    WEnd

    GUIDelete()
EndFunc  ;==>_Main
Link to comment
Share on other sites

So you want the new window to be included in the old GUI, through a tab? Or do you want it to be a popup window but it opens over-9000 of them? Also please run tidy on your scripts before you post them. Took me about five minuets to find the Select keyword.

Edited by BillLuvsU

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...