Jump to content

Search the Community

Showing results for tags 'gui change tab'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi everyone, I'm trying to make a menu which changes with the icons at the bottom of the gui, as in it changes "pages" my idea was simple, i would delete everything from the old page and make a new one with differnt stuff on it, how ever. I've run in to a problem with trying to make buttons on differnt pages, it will run them because the button does not yet exsist. I've added a zip file with the script and all the pictures so the script won't fail all to horribly Does anyone have a smart idea on how to make this work? or a work around? or in general just improve my coding? any help is very appreciated! #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> #include <GUIListBox.au3> Global Const $SC_DRAGMOVE = 0xF012 Global $icn_dll = @ScriptDir & "\hat.dll" global $Printerlist, $Brugernavnstext, $Brugernavn, $kodeordstext, $PasswordEdit, $Networktext, $Combo1, $Button1, $BClose, $BAddPrinter global $Drive1, $Drive1text, $Drive2, $Drive2text, $Drive3, $Drive3text, $Drive4, $Drive4text, $Drive5, $Drive5text, $Drive6, $Drive6text $Th1 = GUICreate("Th 3.0.0", 220, 320, 429, 285,BitOR($WS_POPUP,$WS_BORDER)) $Label1 = GUICtrlCreateLabel("Th 3.0.0", 5, 5, 160, 25) GUICtrlSetFont($Label1, 14, 1400, 0, "Verdana") GUICtrlSetColor($Label1, 0xFFFFFF) ;~ GUICtrlCreateGraphic(0, 30, 600, 3) ;~ GUICtrlSetBkColor(-1, 0xFFFFFF) ;~ GUICtrlCreateGraphic(0, 270, 300, 2) ;~ GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetBkColor(0x333333) $Label2 = GUICtrlCreateLabel("X", 205, 5, 130, 25) GUICtrlSetFont($Label2, 12, 1000, 0, "Verdana") GUICtrlSetColor($Label2, 0xffffff) $Icon0 = GUICtrlCreatePic("lock2.jpg", 15, 280, 32, 32) $Icon1 = GUICtrlCreatePic("print.jpg", 55, 280, 32, 32) $Icon2 = GUICtrlCreatePic("disk.jpg", 95, 280, 32, 32) $Icon3 = GUICtrlCreatePic("link.jpg", 135, 280, 32, 32) $Icon5 = GUICtrlCreatePic("indstillinger.jpg", 175, 280, 32, 32) GUICtrlSetTip($Icon0, "Login") GUICtrlSetTip($Icon1, "Tilføj printer") GUICtrlSetTip($Icon2, "Tilføj drev") GUICtrlSetTip($Icon3, "Links") GUICtrlSetTip($Icon5, "Indstillingere") GUICtrlSetCursor($Icon0, 0) GUICtrlSetCursor($Icon1, 0) GUICtrlSetCursor($Icon2, 0) GUICtrlSetCursor($Icon3, 0) GUICtrlSetCursor($Icon5, 0) _Logingui() $img_top_and_bottom = GUICtrlCreatePic(@ScriptDir & "\top and bottom.bmp", 0, 0, 600, 30, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $img_top = GUICtrlCreatePic(@ScriptDir & "\top bar.jpg", 0, 30, 600, 12, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $img_low = GUICtrlCreatePic(@ScriptDir & "\low bar.jpg", 0, 270, 600, 12, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BClose, $Label2;, $Close Exit Case $GUI_EVENT_PRIMARYDOWN _SendMessage($Th1, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $Icon0 _Cleargui() GUICtrlSetImage($Icon0, "lock2.jpg", 8) _Logingui() Case $Icon1 _Cleargui() GUICtrlSetImage($Icon1, "print2.jpg", 8) _Printgui() Case $Icon2 _Cleargui() GUICtrlSetImage($Icon2, "disk2.jpg", 8) _Drevgui() Case $Icon3 _Cleargui() GUICtrlSetImage($Icon3, "link2.jpg", 8) Case $Icon5 _Cleargui() GUICtrlSetImage($Icon5, "indstillinger2.jpg", 8) ;~ ************************************** Remove this part to see how it works as intended (tho the button of course won't work) Case $BAddPrinter $testthis = _GUICtrlListBox_GetSelItems($Printerlist) MsgBox(0, "", "You Chose " & $testthis[0] & " items.") ;~;~ ************************************** End EndSwitch WEnd func _Cleargui() GUICtrlSetImage($Icon0, "lock.jpg", 8) GUICtrlSetImage($Icon1, "print.jpg", 8) GUICtrlSetImage($Icon2, "disk.jpg", 8) GUICtrlSetImage($Icon3, "link.jpg", 8) GUICtrlSetImage($Icon5, "indstillinger.jpg", 8) GUICtrlDelete($Brugernavnstext) GUICtrlDelete($Brugernavn) GUICtrlDelete($kodeordstext) GUICtrlDelete($PasswordEdit) GUICtrlDelete($Combo1) GUICtrlDelete($Button1) GUICtrlDelete($BClose) GUICtrlDelete($Networktext) GUICtrlDelete($Printerlist) GUICtrlDelete($BAddPrinter) GUICtrlDelete($Drive1) GUICtrlDelete($Drive1text) GUICtrlDelete($Drive2) GUICtrlDelete($Drive2text) GUICtrlDelete($Drive3) GUICtrlDelete($Drive3text) GUICtrlDelete($Drive4) GUICtrlDelete($Drive4text) GUICtrlDelete($Drive5) GUICtrlDelete($Drive5text) GUICtrlDelete($Drive6) GUICtrlDelete($Drive6text) EndFunc Func _Logingui() $Brugernavnstext = GUICtrlCreateLabel("Brugernavn", 8, 48, 150, 20, 0) GUICtrlSetFont($Brugernavnstext, 12, 1000, 0, "Verdana") GUICtrlSetColor($Brugernavnstext, 0xFFFFFF) $Brugernavn = GUICtrlCreateInput("", 8, 70, 200, 21) $kodeordstext = GUICtrlCreateLabel("Kodeord", 8, 104, 150, 17, 0) GUICtrlSetFont($kodeordstext, 12, 1000, 0, "Verdana") GUICtrlSetColor($kodeordstext, 0xFFFFFF) $PasswordEdit = GUICtrlCreateInput("", 8, 124, 200, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $Networktext = GUICtrlCreateLabel("Forbind til netværk", 8, 160, 200, 20, 0) GUICtrlSetFont($Networktext, 12, 1000, 0, "Verdana") GUICtrlSetColor($Networktext, 0xFFFFFF) $Combo1 = GUICtrlCreateCombo("", 8, 180, 201, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData($Combo1, "Automatisk|Trådløst Herningsholm|Trådløst Eksamen|VPN|Manuel", "Automatisk") GUICtrlSetFont(-1, 10, 1000, 0, "Arial") $Button1 = GUICtrlCreateButton("Tilslut", 8, 225, 90, 25) GUICtrlSetFont(-1, 10, 1000, 0, "Arial") $BClose = GUICtrlCreateButton("Luk", 118, 225, 90, 25) GUICtrlSetFont(-1, 10, 1000, 0, "Arial") EndFunc Func _Printgui() $Printerlist = GUICtrlCreateList("", 8, 48, 200, 97,BitOR($LBS_SORT, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER, $LBS_HASSTRINGS, $LBS_MULTIPLESEL)) GUICtrlSetData($Printerlist, "U-01-0-064-HP2015|U-01-0-084-HP2700C|U-01-0-086-HP2700C|U-01-0-088-HP2700C|U-01-1-018-HP4015|U-01-1-054-HP4015|U-01-1-073-HP2055|U-01-1-073-HP4700C|U-01-2-018-HP4250|U-01-2-018-HP4700C|U-01-2-052-HP4015|U-01-2-052-OKI561C") $BAddPrinter = GUICtrlCreateButton("Tilføj Printer", 8, 225, 90, 25) GUICtrlSetFont(-1, 10, 1000, 0, "Arial") EndFunc Func _Drevgui() $Drive1 = GUICtrlCreateCheckbox("", 8, 49, 15, 15) $Drive1text = GUICtrlCreateLabel("H-Drev", 27, 48, 70, 20, 0) GUICtrlSetFont($Drive1text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive1text, 0xFFFFFF) $Drive2 = GUICtrlCreateCheckbox("", 8, 74, 15, 15) $Drive2text = GUICtrlCreateLabel("O-Drev", 27, 73, 70, 20, 0) GUICtrlSetFont($Drive2text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive2text, 0xFFFFFF) $Drive3 = GUICtrlCreateCheckbox("", 8, 99, 15, 15) $Drive3text = GUICtrlCreateLabel("Q-Drev", 27, 98, 70, 20, 0) GUICtrlSetFont($Drive3text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive3text, 0xFFFFFF) $Drive4 = GUICtrlCreateCheckbox("", 8, 124, 15, 15) $Drive4text = GUICtrlCreateLabel("G-Drev", 27, 123, 70, 20, 0) GUICtrlSetFont($Drive4text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive4text, 0xFFFFFF) $Drive5 = GUICtrlCreateCheckbox("", 8, 149, 15, 15) $Drive5text = GUICtrlCreateLabel("J-drev", 27, 148, 70, 20, 0) GUICtrlSetFont($Drive5text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive5text, 0xFFFFFF) $Drive6 = GUICtrlCreateCheckbox("", 8, 174, 15, 15) $Drive6text = GUICtrlCreateLabel("I-Drev", 27, 173, 70, 20, 0) GUICtrlSetFont($Drive6text, 12, 1000, 0, "Verdana") GUICtrlSetColor($Drive6text, 0xFFFFFF) EndFunc
×
×
  • Create New...