Gui Menü

  • wiso lassen sich meine menüitems net drücken ??


    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: M.K.

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Rock'n'Roll Formtationen Saver

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 747, 628, 193, 125)
    $Rock = GUICtrlCreateLabel("Rock'n'Roll", 224, 32, 284, 78)
    GUICtrlSetFont(-1, 40, 400, 0, "Comic Sans MS")
    GUICtrlSetBkColor(-1, 0x800000)
    $Group1 = GUICtrlCreateGroup("Formation1", 48, 176, 313, 233)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlCreateCombo("Kick", 464, 184, 193, 25)
    $Label1 = GUICtrlCreateLabel("By M.K.", 656, 592, 89, 25)
    GUICtrlSetFont(-1, 15, 400, 0, "BankGothic Md BT")
    $MenuItem1 = GUICtrlCreateMenu("&Datei")
    $new=GUICtrlCreateMenuItem("Neu",$MenuItem1)
    $save=GUICtrlCreateMenuItem("Speichern",$MenuItem1)
    $savein=GUICtrlCreateMenuItem("Speichern unter",$MenuItem1)
    $MenuItem2 = GUICtrlCreateMenu("&Exit",-1,1)
    $ende=GUICtrlCreateMenuItem("Ende",$MenuItem2)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)
    GUISetState(@SW_DISABLE)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]
    • Offizieller Beitrag

    Deshalb :

    [autoit]

    GUISetState(@SW_DISABLE)

    [/autoit]
  • nun wie kann ich den "x" exitbutton rechstoben im fenster abschalten


    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: M.K.

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Rock'n'Roll Formtationen Saver

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Rock'n'Roll Formtationen Saver", 747, 628, 193, 125,)
    $Rock = GUICtrlCreateLabel("Rock'n'Roll", 224, 32, 284, 78)
    GUICtrlSetFont(-1, 40, 400, 0, "Comic Sans MS")
    GUICtrlSetBkColor(-1, 0x800000)
    $Group1 = GUICtrlCreateGroup("Formation1", 48, 176, 313, 233)
    GUICtrlCreateGroup("Test", -99, -99, 1, 1)
    $combo=GUICtrlCreateCombo("Kick", 464, 184, 193, 25)
    GUICtrlSetData($combo,"KickVollChange|Rein und Raus|Schlaufe|Platzwechsel|Spin")
    $Label1 = GUICtrlCreateLabel("By M.K.", 656, 592, 89, 25)
    GUICtrlSetFont(-1, 15, 400, 0, "BankGothic Md BT")
    $MenuItem1 = GUICtrlCreateMenu("&Datei")
    $savein=GUICtrlCreateMenuItem("Speichern unter",$MenuItem1)
    $MenuItem2 = GUICtrlCreateMenu("&Exit")
    $ende=GUICtrlCreateMenuItem("Ende",$MenuItem2)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $Msg = GUIGetMsg()

    [/autoit] [autoit][/autoit] [autoit]

    If $msg = $savein Then
    $file = FileSaveDialog("Wählen Sie den Speicherort aus...", @DesktopDir, "Textdateien (*.txt)" )
    FileOpen($file,2)
    FileWrite ($file,$Group1)
    If @error Then MsgBox(64,"Fehler","Fehler: Line 40")
    EndIf

    If $msg = $ende Then

    $warn=MsgBox(4,"Ende?","Nichtgespeicerte Daten gehen verloren! Ende?")

    If $warn = 6 then exit


    EndIf

    [/autoit] [autoit][/autoit] [autoit]



    Switch $Msg

    Case $GUI_EVENT_CLOSE

    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]
  • Hallo bandido1.

    Nun wieso sich die Menüitems net drücken lassen hast Du nun heraus gefunden. ;)

    Wieso hast Du das gar nicht gesehen? Hast du denn die Hilfe durchgelesen? ;)

    Und nun hast du es auch mit dem "X" rechts oben geschafft. ;)
    Das hättest Du auch alleine geschafft, wenn Du versucht hättest, das Script zu verstehen und Geduld gehabt hättest.

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    k3mrwmIBHejryPvylQSFieDF5f3VOnk6iLAVBGVhKQegrFuWr3iraNIblLweSW4WgqI0SrRbS7U5jI3sn50R4a15Cthu1bEr

  • wiso funktionirt der button net also wenn ich was makire und ok drücke erscheint nur eine 6


    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: M.K.

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Rock'n'Roll Formtationen Saver

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Rock'n'Roll Formtationen Saver", 747, 628, 193, 125)
    $Rock = GUICtrlCreateLabel("Rock'n'Roll", 224, 32, 284, 78)
    GUICtrlSetFont(-1, 40, 400, 0, "Comic Sans MS")
    GUICtrlSetBkColor(-1, 0x800000)
    $Button1 = GUICtrlCreateButton("Ok", 448, 376, 113, 33, 0)
    $Group1 = GUICtrlCreateLabel("Formation1", 48, 176, 313, 233)
    $combo=GUICtrlCreateCombo("Kick", 464, 184, 193, 25)
    GUICtrlSetData($combo,"KickVollChange|Rein und Raus|Schlaufe|Platzwechsel|Spin")
    $Label1 = GUICtrlCreateLabel("By M.K.", 656, 592, 89, 25)
    GUICtrlSetFont(-1, 15, 400, 0, "BankGothic Md BT")
    $MenuItem1 = GUICtrlCreateMenu("&Datei")
    $savein=GUICtrlCreateMenuItem("Speichern unter",$MenuItem1)
    $MenuItem2 = GUICtrlCreateMenu("&Exit")
    $ende=GUICtrlCreateMenuItem("Ende",$MenuItem2)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $Msg = GUIGetMsg()

    [/autoit] [autoit][/autoit] [autoit]

    If $msg = $savein Then
    $file = FileSaveDialog("Wählen Sie den Speicherort aus...", @DesktopDir, "Textdateien (*.txt)" )
    FileOpen($file,2)
    FileWrite ($file,$Group1)
    If @error Then MsgBox(64,"Fehler","Fehler: Line 40")
    EndIf

    If $msg = $ende Then

    $warn=MsgBox(4,"Ende?","Nichtgespeicerte Daten gehen verloren! Ende?")

    If $warn = 6 then exit


    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    if $msg = $Button1 then

    $readcombo=GUICtrlRead ($combo)
    GUICtrlSetData($Group1,$Combo)
    GUISetState(@SW_SHOW)

    endif

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit]
  • die richtige variable verwenden dann klappt auch mim nachbarn ;)

    Spoiler anzeigen
    [autoit]


    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: M.K.

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Rock'n'Roll Formtationen Saver

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Rock'n'Roll Formtationen Saver", 747, 628, 193, 125)
    $Rock = GUICtrlCreateLabel("Rock'n'Roll", 224, 32, 284, 78)
    GUICtrlSetFont(-1, 40, 400, 0, "Comic Sans MS")
    GUICtrlSetBkColor(-1, 0x800000)
    $Button1 = GUICtrlCreateButton("Ok", 448, 376, 113, 33, 0)
    $Group1 = GUICtrlCreateLabel("Formation1", 48, 176, 313, 233)
    $combo=GUICtrlCreateCombo("Kick", 464, 184, 193, 25)
    GUICtrlSetData($combo,"KickVollChange|Rein und Raus|Schlaufe|Platzwechsel|Spin")
    $Label1 = GUICtrlCreateLabel("By M.K.", 656, 592, 89, 25)
    GUICtrlSetFont(-1, 15, 400, 0, "BankGothic Md BT")
    $MenuItem1 = GUICtrlCreateMenu("&Datei")
    $savein=GUICtrlCreateMenuItem("Speichern unter",$MenuItem1)
    $MenuItem2 = GUICtrlCreateMenu("&Exit")
    $ende=GUICtrlCreateMenuItem("Ende",$MenuItem2)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $Msg = GUIGetMsg()

    [/autoit] [autoit][/autoit] [autoit]

    If $msg = $savein Then
    $file = FileSaveDialog("Wählen Sie den Speicherort aus...", @DesktopDir, "Textdateien (*.txt)" )
    FileOpen($file,2)
    FileWrite ($file,$Group1)
    If @error Then MsgBox(64,"Fehler","Fehler: Line 40")
    EndIf

    If $msg = $ende Then

    $warn=MsgBox(4,"Ende?","Nichtgespeicerte Daten gehen verloren! Ende?")

    If $warn = 6 then exit


    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    if $msg = $Button1 then

    $readcombo=GUICtrlRead ($combo)
    GUICtrlSetData($Group1,$readcombo)
    GUISetState(@SW_SHOW)

    endif

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit]
  • Du definierst erst die Variable $Readcombo, aber benutzt sie nicht. Warum nimmst du die nicht einfach ?

    [autoit]

    GUICtrlSetData($Group1,$readcombo)

    [/autoit]

    Edit: Zu langsam mal wieder