1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. chRoNiix

Beiträge von chRoNiix

  • hover Funktion

    • chRoNiix
    • 11. März 2014 um 20:32

    okay, werde es erstmal selber versuchen, danke für die vielen Hilfen!! :thumbup:

  • hover Funktion

    • chRoNiix
    • 10. März 2014 um 18:49

    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]
  • hover Funktion

    • chRoNiix
    • 7. März 2014 um 19:04

    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..

  • hover Funktion

    • chRoNiix
    • 6. März 2014 um 20:26

    yeah! danke :))
    So funktioniert es schon mal im rpg Reiter. Wie müsste ich jetzt vorgehen, damit es auch in den anderen funktioniert?

  • hover Funktion

    • chRoNiix
    • 6. März 2014 um 19:34

    Das Problem ist nur, dass sich das Programm sofort beendet, wenn ich die Schleife rausnehme..

  • hover Funktion

    • chRoNiix
    • 6. März 2014 um 18:18

    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]

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™