hover Funktion

  • Hallo, ich bin vor kurzem in die Welt von Autoit eingestiegen und stehe nun vor einem Problem. Ich möchte eine "hover-funktion" einbauen, sodass also beispielsweise ein button seine Farbe ändert, sobald ich mit der Maus über diesen schwebe. Ich weiß, dass es schon viele Einträge zu diesem Thema gibt, jedoch mache ich anscheinend irgendetwas falsch..
    Ich hoffe ihr könnt mir weiterhelfen!  :)

    Hier ist mein Quellcode:

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ColorConstants.au3>

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

    Global $GREEN = 0x00FF00
    Global $RED= 0xFF0000

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

    Opt("GUIOnEventMode", 1)

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

    $Fav = GUICreate("Fav", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Pic = GUICtrlCreatePic("../Bilder/archiv.jpg", 0, -50, 1200, 801) ;Hintergrundbild
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Games = GUICtrlCreateLabel("Games", 507.5, 60, 185, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 40, 1000, 0, "Century Gothic")
    $Button_f = GUICtrlCreateButton("Favoriten", 195, 180, 130, 41,$WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button_s = GUICtrlCreateButton("Shooter", 331, 180, 130, 41,$BS_BITMAP, $WS_GROUP)
    GUICtrlSetImage(-1, "../Bilder/button_shooter.bmp")
    GUICtrlSetOnEvent(-1, "_shows")

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

    $Button_r = GUICtrlCreateButton("RPG's", 467, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 603, 180, 130, 41,$WS_GROUP)
    ;$GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 739, 180, 130, 41,$WS_GROUP)
    ;GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 875, 180, 130, 41,$WS_GROUP)
    ;GUICtrlSetOnEvent(-1, "_showo")
    $Favoriten = GUICtrlCreateLabel("Favoriten", 104, 320, 135, 30)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1,$color_White)
    GUISetState(@SW_SHOW)

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

    $shoot = GUICreate("shoot", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Games = GUICtrlCreateLabel("Games", 545, 48, 110, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Shooter = GUICtrlCreateLabel("Shooter", 104, 320, 82, 28)
    GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif")
    $Button_f = GUICtrlCreateButton("Favoriten", 208, 160, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 344, 160, 130, 41,$WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button_r = GUICtrlCreateButton("RPG's", 480, 160, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 616, 160, 130, 41,$WS_GROUP)
    ;$GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 752, 160, 130, 41,$WS_GROUP)
    ;GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 888, 160, 130, 41,$WS_GROUP)
    ;GUICtrlSetOnEvent(-1, "_showo")
    GUISetState(@SW_HIDE)

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

    $rp = GUICreate("rpg", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Games = GUICtrlCreateLabel("Games", 545, 48, 110, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $RPG = GUICtrlCreateLabel("RPG's", 104, 320, 82, 28)
    GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif")
    $Button_f = GUICtrlCreateButton("Favoriten", 208, 160, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 344, 160, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_shows")
    $Button_r = GUICtrlCreateButton("RPG's", 480, 160, 130, 41,$WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button_ra = GUICtrlCreateButton("Racing", 616, 160, 130, 41,$WS_GROUP)
    ; $GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 752, 160, 130, 41,$WS_GROUP)
    ; GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 888, 160, 130, 41,$WS_GROUP)
    ; GUICtrlSetOnEvent(-1, "_showo")
    GUISetState(@SW_HIDE)

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

    While 1
    Sleep(100)
    WEnd

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

    $Button = 0
    while 1
    $Maus_pos = GUIGetCursorInfo()
    Select
    case $Maus_pos[4] = $Button_r And $Button <> 1
    GUICtrlSetBkColor($Button_r,$RED)
    $Button = 1
    case $Maus_pos[4] <> $Button_r And $Button = 1
    GUICtrlSetBkColor($Button_r, $GREEN)
    $Button = 0

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

    EndSelect

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

    WEnd

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

    Func _showf()
    GUISetState(@SW_HIDE, $shoot)
    GUISetState(@SW_HIDE, $rp)
    GUISetState(@SW_SHOW, $Fav)
    EndFunc ;==>_show1

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

    Func _shows()
    GUISetState(@SW_HIDE, $Fav)
    GUISetState(@SW_HIDE, $rp)
    GUISetState(@SW_SHOW, $shoot)
    EndFunc ;==>_show2

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

    Func _showr()
    GUISetState(@SW_HIDE, $Fav)
    GUISetState(@SW_HIDE, $shoot)
    GUISetState(@SW_SHOW, $rp)
    EndFunc ;==>_show3

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

    Func _exit()
    Exit
    EndFunc ;==>_exit

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
  • Ich habe es zwar nicht ausprobiert, würde aber sagen, dass du die erste Endlosschleife entfernen solltest, da das Script sonst gar nicht bis zu der Mausabfrage kommt.
    Ansonsten könnte es daran liegen, dass $Button_r immer überschrieben wird, und es somit nur in $rp funktioniert.

  • Hey
    Hab lange nichts mehr mit Autoit gemacht aber hier mal eine Version der Schleife die Funktionieren sollte:

    [autoit]

    while 1
    $Maus_pos = GUIGetCursorInfo()
    sleep(50)
    If $Maus_pos <> 0 Then
    Select
    case $Maus_pos[4] = $Button_r And $Button = 0
    GUICtrlSetBkColor($Button_r,$RED)
    $Button = 1
    case $Maus_pos[4] <> $Button_r And $Button = 1
    GUICtrlSetBkColor($Button_r, $GREEN)
    $Button = 0
    EndSelect
    EndIf
    WEnd

    [/autoit]

    Das Problem was du allerdings haben wirst ist, dass du die Variable $Button_r einfach mehfach überschreibst. Also funktioniert die Hoverfunktion nur im RPG-Tab weil da das letzte mal $Button_r definiert wurde.


    Edit:
    Erklärung Code:
    GUIGetCursorInfo() kann nicht in allen Controls eine Info bekommen sondern nur in welchen auf die AutoIt zugriff hat (Glaub ich. Steht leider nicht in der Hilfe).
    Wenn also die Maus über irgendwas ist was nicht per GUIGetCursorInfo() erfasst werden kann, dann ist $Maus_pos = 0.
    Wenn du in der alten While Schleife die du hattest dann auf Case $maus_pos[4] zugreifen willst crasht das Programm weil die Variable kein Array ist sondern nur dem Wert 0 entspricht.
    Also einfach vorher überprüfen ob $maus_pos nicht 0 ist und dann den gewünschten Code ausführen.

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]

    2 Mal editiert, zuletzt von Blubkuh (6. März 2014 um 20:12)

  • Ich würde an deiner Stelle anders vorgehen als für jeden Menüpunkt ein eigenes GUI zu erstellen.
    Benutze lieber ein Haupt-GUI und lösche die Daten des vorherigen Tabs einfach beim Klick auf einen Menüpunkt und schreibe dann neue Daten ins GUI.
    Habe hier mal nen Beispiel:

    Ich hoffe das hilft dir weiter.
    Wenn du Fragen zu dem Code hast dann frag einfach hier oder per Privaten Nachricht hier im Forum.
    Mag sein das das alles nicht optimal ist aber ich hab 7 Jahre nix mehr mit AutoIt gecodet ;D

    Code
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ColorConstants.au3>

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

    Global $GREEN = 0x00FF00
    Global $RED= 0xFF0000

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

    ;~ Hier müssen die Variabeln rein, die in den Content_ Funktionen erstellt werden(Alle die auch in der Delete_Content() Funktion sein müssen
    Local $Header, $Text

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

    Opt("GUIOnEventMode", 1)

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

    $Fav = GUICreate("Fav", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Pic = GUICtrlCreatePic("../Bilder/archiv.jpg", 0, -50, 1200, 801) ;Hintergrundbild
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Games = GUICtrlCreateLabel("Games", 507.5, 60, 185, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 40, 1000, 0, "Century Gothic")
    $Button_f = GUICtrlCreateButton("Favoriten", 195, 180, 130, 41,$WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 331, 180, 130, 41,$BS_BITMAP, $WS_GROUP)
    GUICtrlSetImage(-1, "../Bilder/button_shooter.bmp")
    GUICtrlSetOnEvent(-1, "_shows")
    $Button_r = GUICtrlCreateButton("RPG's", 467, 180, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 603, 180, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 739, 180, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 875, 180, 130, 41,$WS_GROUP)
    GUICtrlSetOnEvent(-1, "_showo")
    Content_Fav()
    GUISetState(@SW_SHOW)

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

    $Active_Menu = "$Button_f"
    $fState = 1
    While 1
    $Pos = GuiGetCursorInfo()
    If $Pos <> 0 Then
    Select
    Case ($Pos[4] = $Button_f) Or ($Pos[4] = $Button_s) Or ($Pos[4] = $Button_r) Or ($Pos[4] = $Button_ra) Or ($Pos[4] = $Button_o) Or ($Pos[4] = $Button_st)
    If Not $fState Then
    GUICtrlSetBkColor($Pos[4], $RED)
    $fState = True
    EndIf
    Case Else
    If $fState Then
    GUICtrlSetBkColor($Button_f, $GREEN)
    GUICtrlSetBkColor($Button_s, $GREEN)
    GUICtrlSetBkColor($Button_r, $GREEN)
    GUICtrlSetBkColor($Button_ra, $GREEN)
    GUICtrlSetBkColor($Button_o, $GREEN)
    GUICtrlSetBkColor($Button_st, $GREEN)
    $fState = False
    EndIf
    EndSelect
    EndIf
    WEnd

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

    Func _showf()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_f, $GUI_DisABLE)
    $Active_Menu = "$Button_f"
    Delete_Content()
    Content_Fav()
    EndFunc

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

    Func _shows()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_s, $GUI_DisABLE)
    $Active_Menu = "$Button_s"
    Delete_Content()
    Content_Shooter()
    EndFunc

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

    Func _showr()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_r, $GUI_DisABLE)
    $Active_Menu = "$Button_r"
    Delete_Content()
    Content_RPG()
    EndFunc

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

    Func _showra()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_ra, $GUI_DisABLE)
    $Active_Menu = "$Button_ra"
    Delete_Content()
    Content_Racing()
    EndFunc

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

    Func _showst()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_st, $GUI_DisABLE)
    $Active_Menu = "$Button_st"
    Delete_Content()
    Content_Strategy()
    EndFunc

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

    Func _showo()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_o, $GUI_DisABLE)
    $Active_Menu = "$Button_o"
    Delete_Content()
    Content_Other()
    EndFunc

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

    ;~ Hier alle ControlID's rein die in den Content_ Funktionen erstellt werden
    Func Delete_Content()
    GUICtrlDelete($Header)
    GUICtrlDelete($Text)
    EndFunc

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

    Func Content_Fav()
    Delete_Content()
    $Header = GUICtrlCreateLabel("Favoriten", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Hier steht ein Text", 104, 360)
    EndFunc

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

    Func Content_Shooter()
    Delete_Content()
    $Header = GUICtrlCreateLabel("Shooter", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Hier steht ein anderer Text", 104, 360)
    EndFunc

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

    Func Content_RPG()
    Delete_Content()
    $Header = GUICtrlCreateLabel("RPG's", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    EndFunc

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

    Func Content_Racing()
    Delete_Content()
    $Header = GUICtrlCreateLabel("Racing", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    EndFunc

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

    Func Content_Strategy()
    Delete_Content()
    $Header = GUICtrlCreateLabel("Strategy", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    EndFunc

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

    Func Content_Other()
    Delete_Content()
    $Header = GUICtrlCreateLabel("Other", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    EndFunc

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

    Func _exit()
    Exit
    EndFunc ;==>

    [/autoit]

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]

    2 Mal editiert, zuletzt von Blubkuh (7. März 2014 um 08:49)

  • Sorry für Dopperlpost aber da du nicht geantwortet hast wusste ich ned ob du nen Edit im vorherigen Beitrag überhaupt bemerken würdest.

    Habe das Script ein wenig verändert, sodass das aktive Menu nun immer rot hinterlegt ist.
    Habe außerdem die Buttons ein bischen weiter auseinander geschoben, weil es sonst passieren kann, dass, wenn man die Maus ganz schnell von einem Button zum anderen schiebt, das Programm es nicht mitbekommt,dass man garnichtmehr über dem Button hovert sondern über einem anderen

    Code
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ColorConstants.au3>

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

    Global $GREEN = 0x00FF00
    Global $RED= 0xFF0000

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

    ;~ Hier müssen die Variabeln rein, die in den Content_ Funktionen erstellt werden(Alle die auch in der _Delete_Content() Funktion sein müssen
    Local $Header, $Text

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

    Opt("GUIOnEventMode", 1)

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

    $Fav = GUICreate("Games-Manager", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Pic = GUICtrlCreatePic("../Bilder/archiv.jpg", 0, -50, 1200, 801) ;Hintergrundbild
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Games = GUICtrlCreateLabel("Games", 507.5, 60, 185, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 40, 1000, 0, "Century Gothic")
    $Button_f = GUICtrlCreateButton("Favoriten", 195, 180, 130, 41,$WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlSetBkColor(-1, $RED)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 335, 180, 130, 41,$BS_BITMAP, $WS_GROUP)
    GUICtrlSetImage(-1, "../Bilder/button_shooter.bmp")
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_shows")
    $Button_r = GUICtrlCreateButton("RPG's", 475, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 615, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 755, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 895, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showo")
    _Content_Fav()
    GUISetState(@SW_SHOW)

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

    ;~ ControlGetHandle

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

    $Active_Menu = $Button_f
    $fState = 0
    Local $Last_Hover
    While 1
    $Pos = GuiGetCursorInfo()
    If $Pos <> 0 Then
    Select
    Case ($Pos[4] = $Button_f) Or ($Pos[4] = $Button_s) Or ($Pos[4] = $Button_r) Or ($Pos[4] = $Button_ra) Or ($Pos[4] = $Button_o) Or ($Pos[4] = $Button_st)
    If $fState = 0 Then
    If $Pos[4] <> $Active_Menu Then
    GUICtrlSetBkColor($Pos[4], $RED)
    $fState = 1
    $Last_Hover = $Pos[4]
    EndIf
    EndIf
    Case Else
    If $fState Then
    If $Last_Hover <> $Active_Menu Then
    GUICtrlSetBkColor($Last_Hover, $GREEN)
    $fState = 0
    Else
    MsgBox(0,"","Lasthover = Activemenu")
    EndIf
    EndIf
    EndSelect
    EndIf
    WEnd

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

    Func _showf()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_f, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_f
    $fState = 0
    GUICtrlSetBkColor($Button_f, $RED)
    _Delete_Content()
    _Content_Fav()
    EndFunc

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

    Func _shows()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_s, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_s
    $fState = 0
    GUICtrlSetBkColor($Button_s, $RED)
    _Delete_Content()
    _Content_Shooter()
    EndFunc

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

    Func _showr()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_r, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_r
    $fState = 0
    GUICtrlSetBkColor($Button_r, $RED)
    _Delete_Content()
    _Content_RPG()
    EndFunc

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

    Func _showra()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_ra, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_ra
    $fState = 0
    GUICtrlSetBkColor($Button_ra, $RED)
    _Delete_Content()
    _Content_Racing()
    EndFunc

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

    Func _showst()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_st, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_st
    $fState = 0
    GUICtrlSetBkColor($Button_st, $RED)
    _Delete_Content()
    _Content_Strategy()
    EndFunc

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

    Func _showo()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_o, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_o
    $fState = 0
    GUICtrlSetBkColor($Button_o, $RED)
    _Delete_Content()
    _Content_Other()
    EndFunc

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

    ;~ Hier alle ControlID's rein die in den Content_ Funktionen erstellt werden
    Func _Delete_Content()
    GUICtrlDelete($Header)
    GUICtrlDelete($Text)
    EndFunc

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

    Func _Content_Fav()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Favoriten", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Hier steht ein Text", 104, 360)
    EndFunc

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

    Func _Content_Shooter()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Shooter", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Hier steht ein anderer Text", 104, 360)
    EndFunc

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

    Func _Content_RPG()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("RPG's", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Und so weiter....", 104, 360)
    EndFunc

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

    Func _Content_Racing()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Racing", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Blabla", 104, 360)
    EndFunc

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

    Func _Content_Strategy()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Strategy", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    ;~ $Text = GUICtrlCreateLabel("Man kann die Variable auch einfaach garnicht benutzen", 104, 360)
    EndFunc

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

    Func _Content_Other()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Other", 104, 320, 135, 37)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateLabel("Hoffe dir hilft das weiter", 104, 360)
    EndFunc

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

    Func _exit()
    Exit
    EndFunc ;==>

    [/autoit]

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]

    3 Mal editiert, zuletzt von Blubkuh (7. März 2014 um 08:54)

  • Blubkuh:
    Ja ist ne funktionierende Lösung aber zwei Dinge sind doch eher unschön.
    1. Controls immer wieder zur Laufzeit erstellen und löschen ist unnötig. Einfach den Wert mit GuiCtrlSetData setzen spart Zeit und Schreibaufwand :thumbup:
    2. Execute($Active_Menu) ist auch unschön. Lieber @GUI_CtrlID verwenden ;)

    PS: mit nem Schönen Array für die Controls spart man sich sicher 2/3tel des Codes ;)

  • Super! Danke :thumbup:
    Jetzt bekomme ich es nur irgendwie nicht mehr hin neue Buttons in einem "tab" eine Funktion zuzuweisen, sodass beispielsweise ein Programm beim drücken des Buttons geöffnet wird..

  • Super! Danke :thumbup:
    Jetzt bekomme ich es nur irgendwie nicht mehr hin neue Buttons in einem "tab" eine Funktion zuzuweisen, sodass beispielsweise ein Programm beim drücken des Buttons geöffnet wird..


    dann poste doch mal deinen code und dann gucken wir woran es liegt. ohne Code kann man dir schlecht helfen :)
    Aber eigentlich brauchst du nur GUICtrlSetOnEvent ( controlID, "function" ).
    Als Control ID den Button oder was auch immer du zum starten nimmst und in die Funktion schreibst du deinen Execute command des Spiels

    Blubkuh:
    Ja ist ne funktionierende Lösung aber zwei Dinge sind doch eher unschön.
    1. Controls immer wieder zur Laufzeit erstellen und löschen ist unnötig. Einfach den Wert mit GuiCtrlSetData setzen spart Zeit und Schreibaufwand :thumbup:
    2. Execute($Active_Menu) ist auch unschön. Lieber @GUI_CtrlID verwenden ;)

    PS: mit nem Schönen Array für die Controls spart man sich sicher 2/3tel des Codes ;)

    Haha ja du hast natürlich recht. Das mit dem GuiCtrlSetData ist mir heute nacht auch eingefallen und ich hab mich selbst im Bett gefacepalmed ;D
    Mit dem @Gui_CtrlID kann ich nicht wirklich was anfangen. Er will ja den vorherigen Buton wieder aktivieren und nicht den momentan gedrückten.
    Das mit dem Execute habe ich so gemacht weil mir einfach nichts anderes eingefallen ist. Wenn du nen anderen Lösungsvorschlag hast wäre es super wenn du den mal posten könntest damit ich dazulernen kann :)

    PS: Mit Arrays ist natürlich alles einfacher. aber ich wollte wenigstens ein bisschen des original codes behalten und nicht gleich nen komplett anderes Script schreiben :P

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]
  • Ups ok da hab ich mich verwirren lassen ^^
    in $Active_Menu steht natürlich das zuvor aktive Control. Die Frage ist nur warum du überhaupt Execute verwendest :P

    @GUI_CTRLID würde dir den Vorteil bringen dass du all diese _showx() Funktionen zu einer konsolidieren kannst.
    Sofern du die _Content() Funktionen etwas anpasst. Z.B. mit einem Parameter oder wie bereits erwähnt mit Guictrlsetdata und nem Array in dem die jeweiligen Daten stehen.

  • Ups ok da hab ich mich verwirren lassen ^^
    in $Active_Menu steht natürlich das zuvor aktive Control. Die Frage ist nur warum du überhaupt Execute verwendest :P

    @GUI_CTRLID würde dir den Vorteil bringen dass du all diese _showx() Funktionen zu einer konsolidieren kannst.
    Sofern du die _Content() Funktionen etwas anpasst. Z.B. mit einem Parameter oder wie bereits erwähnt mit Guictrlsetdata und nem Array in dem die jeweiligen Daten stehen.

    Oo
    Also entweder hatte ich gestern Halluzinationen oder ich hab mich irgendwo vertippt.
    Ich bin mir ziemlich sicher das "GUICtrlSetState($Active_Menu, $GUI_ENABLE)" gestern nicht funktioniert hat x)

    Naja heute funktioniert es und somit ist das geklärt. :P

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]
  • So jetzt funktioniert soweit alles :) danke :thumbup:
    (ich hab jetzt einfach mit einzelnen Variablen weiter gemacht, weil ich das nicht nochmal neu machen wollte.)

    Wie müsste ich jetzt vorgehen, wenn ich "hover-funktionen" auf die neuen buttons auf den einzelnen Seiten hinzufügen möchte, sodass sich zb die Größe des Buttons ändert ?

    Hier nochmal der aktuelle Quellcode:

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ColorConstants.au3>

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

    Global $GREEN =0x0099FF
    Global $RED=0x707070

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

    ;~ Hier müssen die Variabeln rein, die in den Content_ Funktionen erstellt werden(Alle die auch in der _Delete_Content() Funktion sein müssen
    Local $Header, $Text, $Text2, $Text3, $Text4, $Text5, $Text6, $Text7, $Text8

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

    Opt("GUIOnEventMode", 1)

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

    $Fav = GUICreate("Games-Manager", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Pic = GUICtrlCreatePic("../Bilder/archiv.jpg", 0, -50, 1200, 801)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Games = GUICtrlCreateLabel("Games", 507.5, 60, 185, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetFont(-1, 40, 1000, 0, "Century Gothic")
    $Button_f = GUICtrlCreateButton("Favorites", 195, 180, 130, 41,$BS_BITMAP,$WS_GROUP)
    GUICtrlSetImage(-1,"../Bilder/button_shooter.bmp")
    ;GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlSetBkColor(-1, $RED)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 335, 180, 130, 41,$BS_BITMAP, $WS_GROUP)
    GUICtrlSetImage(-1, "../Bilder/button_shooter.bmp")
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_shows")
    $Button_r = GUICtrlCreateButton("RPG's", 475, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 615, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 755, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 895, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showo")
    _Content_Fav()
    GUISetState(@SW_SHOW)

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

    ;~ ControlGetHandle

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

    $Active_Menu = $Button_f
    $fState = 0
    Local $Last_Hover
    While 1
    $Pos = GuiGetCursorInfo()
    If $Pos <> 0 Then
    Select
    Case ($Pos[4] = $Button_f) Or ($Pos[4] = $Button_s) Or ($Pos[4] = $Button_r) Or ($Pos[4] = $Button_ra) Or ($Pos[4] = $Button_o) Or ($Pos[4] = $Button_st)
    If $fState = 0 Then
    If $Pos[4] <> $Active_Menu Then
    GUICtrlSetBkColor($Pos[4], $RED)
    ;GUICtrlSetImage($Pos[4],"../Bilder/button.bmp")
    $fState = 1
    $Last_Hover = $Pos[4]
    EndIf
    EndIf
    Case Else
    If $fState Then
    If $Last_Hover <> $Active_Menu Then
    GUICtrlSetBkColor($Last_Hover, $GREEN)
    $fState = 0
    Else
    MsgBox(0,"","Lasthover = Activemenu")
    EndIf
    EndIf
    EndSelect
    EndIf
    WEnd

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

    Func _showf()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_f, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_f
    $fState = 0
    GUICtrlSetBkColor($Button_f, $RED)
    _Delete_Content()
    _Content_Fav()
    EndFunc

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

    Func _shows()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_s, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_s
    $fState = 0
    GUICtrlSetBkColor($Button_s, $RED)
    _Delete_Content()
    _Content_Shooter()
    EndFunc

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

    Func _showr()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_r, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_r
    $fState = 0
    GUICtrlSetBkColor($Button_r, $RED)
    _Delete_Content()
    _Content_RPG()
    EndFunc

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

    Func _showra()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_ra, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_ra
    $fState = 0
    GUICtrlSetBkColor($Button_ra, $RED)
    _Delete_Content()
    _Content_Racing()
    EndFunc

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

    Func _showst()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_st, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_st
    $fState = 0
    GUICtrlSetBkColor($Button_st, $RED)
    _Delete_Content()
    _Content_Strategy()
    EndFunc

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

    Func _showo()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_o, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_o
    $fState = 0
    GUICtrlSetBkColor($Button_o, $RED)
    _Delete_Content()
    _Content_Other()
    EndFunc

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

    ;~ Hier alle ControlID's rein die in den Content_ Funktionen erstellt werden
    Func _Delete_Content()
    GUICtrlDelete($Header)
    GUICtrlDelete($Text)
    GUICtrlDelete($Text2)
    GUICtrlDelete($Text3)
    GUICtrlDelete($Text4)
    GUICtrlDelete($Text5)
    GUICtrlDelete($Text6)
    GUICtrlDelete($Text7)
    GUICtrlDelete($Text8)
    EndFunc

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

    Func _Content_Fav()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Favorites", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\titanfall.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav1")
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetOnEvent ( -1, "_fav2")
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\trials.bmp", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\bf3.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav3")
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\gw2.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav4")
    $Text5 = GUICtrlCreateButton("", 160, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav5")
    $Text6 = GUICtrlCreateButton("", 381, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetOnEvent ( -1, "_fav6")
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    $Text7 = GUICtrlCreateButton("", 603, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav7")
    $Text8 = GUICtrlCreateButton("", 823, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav8")
    EndFunc

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

    Func _fav1()
    ShellExecute("")
    EndFunc
    Func _fav2()
    ShellExecute("")
    EndFunc
    Func _fav3()
    ShellExecute("")
    EndFunc
    Func _fav4()
    ShellExecute("")
    EndFunc
    Func _fav5()
    ShellExecute("")
    EndFunc
    Func _fav6()
    ShellExecute("")
    EndFunc
    Func _fav7()
    ShellExecute("")
    EndFunc
    Func _fav8()
    ShellExecute("")
    EndFunc

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

    Func _Content_Shooter()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Shooter", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\titanfall.bmp", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\bf3.bmp", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\mw3.bmp", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\css.bmp", -1)
    EndFunc

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

    Func _Content_RPG()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("RPG's", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Racing()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Racing", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Strategy()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Strategy", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Other()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Other", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _exit()
    Exit
    EndFunc ;==>

    [/autoit]
  • So jetzt funktioniert soweit alles :) danke :thumbup:
    (ich hab jetzt einfach mit einzelnen Variablen weiter gemacht, weil ich das nicht nochmal neu machen wollte.)

    Wie müsste ich jetzt vorgehen, wenn ich "hover-funktionen" auf die neuen buttons auf den einzelnen Seiten hinzufügen möchte, sodass sich zb die Größe des Buttons ändert ?

    Du musst in der While Schleife die Position und Größe des Buttons über dem du Hoverst erfassen[ControlGetPos()] und dann mit diesen Werten GUICtrlSetPos() benutzen um die Position und Größe des Buttons zu ändern. Sobald man nichtmehr über dem Button hovert muss der Button dann natürlich wieder an die alte Position mit alter Größe zurück.

    Wenn du was dazulernen willst dann versuch es erstmal selbst mit den von mir genannten Funktionen.

    Ansonsten hast du hier das Script was ja fast komplett von mir geschrieben wurde ;):

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <ColorConstants.au3>

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

    Global $GREEN =0x0099FF
    Global $RED=0x707070

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

    ;~ Hier müssen die Variabeln rein, die in den Content_ Funktionen erstellt werden(Alle die auch in der _Delete_Content() Funktion sein müssen
    Local $Header, $Text, $Text2, $Text3, $Text4, $Text5, $Text6, $Text7, $Text8

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

    Opt("GUIOnEventMode", 1)

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

    $Fav = GUICreate("Games-Manager", 1200, 700, 300, 200)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    $Pic = GUICtrlCreatePic("../Bilder/archiv.jpg", 0, -50, 1200, 801)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Games = GUICtrlCreateLabel("Games", 507.5, 60, 185, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetFont(-1, 40, 1000, 0, "Century Gothic")
    $Button_f = GUICtrlCreateButton("Favorites", 195, 180, 130, 41,$BS_BITMAP,$WS_GROUP)
    GUICtrlSetImage(-1,"../Bilder/button_shooter.bmp")
    ;GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlSetBkColor(-1, $RED)
    GUICtrlSetOnEvent(-1, "_showf")
    $Button_s = GUICtrlCreateButton("Shooter", 335, 180, 130, 41,$BS_BITMAP, $WS_GROUP)
    GUICtrlSetImage(-1, "../Bilder/button_shooter.bmp")
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_shows")
    $Button_r = GUICtrlCreateButton("RPG's", 475, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showr")
    $Button_ra = GUICtrlCreateButton("Racing", 615, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showra")
    $Button_st = GUICtrlCreateButton("Strategy", 755, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showst")
    $Button_o = GUICtrlCreateButton("Other", 895, 180, 130, 41,$WS_GROUP)
    GUICtrlSetBkColor(-1, $GREEN)
    GUICtrlSetOnEvent(-1, "_showo")
    _Content_Fav()
    GUISetState(@SW_SHOW)

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

    $Active_Menu = $Button_f
    $fState = 0
    $bState = 0
    Local $Last_Hover, $Last_Hover_button

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

    ;~ HotKeySet("{UP}", "Debug")

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

    ;~ Func Debug()
    ;~ MsgBox(0,"","Pos[4]: "&$Pos[4])
    ;~ EndFunc

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

    While 1
    $Pos = GuiGetCursorInfo()
    If $Pos <> 0 Then
    Select
    Case ($Pos[4] = $Button_f) Or ($Pos[4] = $Button_s) Or ($Pos[4] = $Button_r) Or ($Pos[4] = $Button_ra) Or ($Pos[4] = $Button_o) Or ($Pos[4] = $Button_st)
    If $fState = 0 Then
    If $Pos[4] <> $Active_Menu Then
    GUICtrlSetBkColor($Pos[4], $RED)
    ;GUICtrlSetImage($Pos[4],"../Bilder/button.bmp")
    $fState = 1
    $Last_Hover = $Pos[4]
    EndIf
    EndIf

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

    Case ($Pos[4] = $Text) Or ($Pos[4] = $Text2) Or ($Pos[4] = $Text3) Or ($Pos[4] = $Text4) Or ($Pos[4] = $Text5) Or ($Pos[4] = $Text6) Or ($Pos[4] = $Text7) Or ($Pos[4] = $Text8)
    If $bState = 0 Then
    ;~ Hier werden die Positionsdaten der Buttons abgefragt
    $array = ControlGetPos("","",$Pos[4])
    ;~ Hier wird die Position und Größe des Buttons verändert über dem man gerade mit der Maus hovered
    GUICtrlSetPos($Pos[4],$array[0]-10,$array[1]-5,$array[2]+20 ,$array[3]+10)
    $bState = 1
    $Last_Hover_button = $Pos[4]
    EndIf

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

    Case ($Pos[4] <> $Button_f) Or ($Pos[4] <> $Button_s) Or ($Pos[4] <> $Button_r) Or ($Pos[4] <> $Button_ra) Or ($Pos[4] <> $Button_o) Or ($Pos[4] <> $Button_st) Or ($Pos[4] <> $Text) Or ($Pos[4] <> $Text2) Or ($Pos[4] <> $Text3) Or ($Pos[4] <> $Text4) Or ($Pos[4] <> $Text5) Or ($Pos[4] <> $Text6) Or ($Pos[4] <> $Text7) Or ($Pos[4] <> $Text8)
    If $fState Then
    If $Last_Hover <> $Active_Menu Then
    GUICtrlSetBkColor($Last_Hover, $GREEN)
    $fState = 0
    EndIf
    ElseIf $bState Then
    ;~ Hier wird die Position und Größe des Buttons zurückgesetzt auf die vorher erfassten Werte
    GUICtrlSetPos($Last_Hover_button,$array[0],$array[1],$array[2] ,$array[3])
    $bState = 0
    EndIf
    EndSelect
    EndIf
    WEnd

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

    Func _showf()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_f, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_f
    $fState = 0
    GUICtrlSetBkColor($Button_f, $RED)
    _Delete_Content()
    _Content_Fav()
    EndFunc

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

    Func _shows()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_s, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_s
    $fState = 0
    GUICtrlSetBkColor($Button_s, $RED)
    _Delete_Content()
    _Content_Shooter()
    EndFunc

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

    Func _showr()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_r, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_r
    $fState = 0
    GUICtrlSetBkColor($Button_r, $RED)
    _Delete_Content()
    _Content_RPG()
    EndFunc

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

    Func _showra()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_ra, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_ra
    $fState = 0
    GUICtrlSetBkColor($Button_ra, $RED)
    _Delete_Content()
    _Content_Racing()
    EndFunc

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

    Func _showst()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_st, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_st
    $fState = 0
    GUICtrlSetBkColor($Button_st, $RED)
    _Delete_Content()
    _Content_Strategy()
    EndFunc

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

    Func _showo()
    GUICtrlSetState(Execute($Active_Menu), $GUI_ENABLE)
    GUICtrlSetState($Button_o, $GUI_DisABLE)
    GUICtrlSetBkColor($Active_Menu, $GREEN)
    $Active_Menu = $Button_o
    $fState = 0
    GUICtrlSetBkColor($Button_o, $RED)
    _Delete_Content()
    _Content_Other()
    EndFunc

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

    ;~ Hier alle ControlID's rein die in den Content_ Funktionen erstellt werden
    Func _Delete_Content()
    GUICtrlDelete($Header)
    GUICtrlDelete($Text)
    GUICtrlDelete($Text2)
    GUICtrlDelete($Text3)
    GUICtrlDelete($Text4)
    GUICtrlDelete($Text5)
    GUICtrlDelete($Text6)
    GUICtrlDelete($Text7)
    GUICtrlDelete($Text8)
    EndFunc

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

    Func _Content_Fav()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Favorites", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\titanfall.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav1")
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetOnEvent ( -1, "_fav2")
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\trials.bmp", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\bf3.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav3")
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\gw2.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav4")
    $Text5 = GUICtrlCreateButton("", 160, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav5")
    $Text6 = GUICtrlCreateButton("", 381, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetOnEvent ( -1, "_fav6")
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    $Text7 = GUICtrlCreateButton("", 603, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav7")
    $Text8 = GUICtrlCreateButton("", 823, 515, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\favorites\.bmp", -1)
    GUICtrlSetOnEvent ( -1, "_fav8")
    EndFunc

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

    Func _fav1()
    ShellExecute("")
    EndFunc
    Func _fav2()
    ShellExecute("")
    EndFunc
    Func _fav3()
    ShellExecute("")
    EndFunc
    Func _fav4()
    ShellExecute("")
    EndFunc
    Func _fav5()
    ShellExecute("")
    EndFunc
    Func _fav6()
    ShellExecute("")
    EndFunc
    Func _fav7()
    ShellExecute("")
    EndFunc
    Func _fav8()
    ShellExecute("")
    EndFunc

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

    Func _Content_Shooter()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Shooter", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\titanfall.bmp", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\bf3.bmp", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\mw3.bmp", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder\shooter\css.bmp", -1)
    EndFunc

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

    Func _Content_RPG()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("RPG's", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Racing()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Racing", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Strategy()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Strategy", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _Content_Other()
    _Delete_Content()
    $Header = GUICtrlCreateLabel("Other", 104, 320, 135, 37)
    GUICtrlSetColor(-1, $COLOR_WHITE)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetFont(-1, 29, 400, 0, "MS Sans Serif")
    $Text = GUICtrlCreateButton("", 160, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text2 = GUICtrlCreateButton("", 381, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text3 = GUICtrlCreateButton("", 603, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    $Text4 = GUICtrlCreateButton("", 823, 385, 195, 105, $BS_BITMAP)
    GUICtrlSetImage(-1, "D:\'Projekte'\Programm\Bilder", -1)
    EndFunc

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

    Func _exit()
    Exit
    EndFunc ;==>

    [/autoit]

    Dieser Beitrag wurde 9521 mal editiert, zum letzten Mal von Blubkuh: Morgen, 02:28.

    [autoit]

    If Not $Elephant Then $Irelephant = True

    [/autoit]