Guictrlcreatepic problem...

  • Hey,

    habe folgendes problem.
    mache ne serverabfrage und der status soll mir dann per pic angezeigt werden.
    funktioniert soweit auch, aber das bild wird nicht angezeigt.
    erst wenn ich das fenster minimier und wieder maximiere wird es richtig angezeigt, voher ist da nichts.


    Die Abfrage ist:

    Spoiler anzeigen
    [autoit]

    $rueck = ping("85.131.2037.229")
    if $rueck then
    GuicTRlcreatepic("up.bmp",245,260,20,20)
    else
    GuicTRlcreatepic("down.bmp",245,260,20,20)
    Endif

    [/autoit]

    Full Script:

    Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.4.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

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

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUICtrlSetOnHover_UDF.au3>

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

    Global $std_Hover_Image = @ScriptDir & "\rgt.bmp"
    Global $sBack_Hover_Image = @ScriptDir & "\rg.bmp"
    Global $std_Hover_Image2 = @ScriptDir & "\art.bmp"
    Global $sBack_Hover_Image2 = @ScriptDir & "\ar.bmp"
    Global $std_Hover_Image3 = @ScriptDir & "\ret.bmp"
    Global $sBack_Hover_Image3 = @ScriptDir & "\re.bmp"
    Global $std_Hover_Image4 = @ScriptDir & "\cat.bmp"
    Global $sBack_Hover_Image4 = @ScriptDir & "\ca.bmp"
    Global $std_Hover_Image5 = @ScriptDir & "\wot.bmp"
    Global $sBack_Hover_Image5 = @ScriptDir & "\wo.bmp"
    Global $std_Hover_Image6 = @ScriptDir & "\bet.bmp"
    Global $sBack_Hover_Image6 = @ScriptDir & "\be.bmp"
    Global $std_Hover_Image7 = @ScriptDir & "\set.bmp"
    Global $sBack_Hover_Image7 = @ScriptDir & "\set.bmp"

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

    GUICreate("Test", 600, 400)
    $Flash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
    $FlashObj = GUICtrlCreateObj($Flash, 350, 0, 250, 490)
    $Flash.Movie = "C:\loader.swf?mainfile=C:\main.swf"
    $Flash.loop = true
    GUISetState(@SW_SHOW)
    $pic = GUICtrlCreatePic("C:\image1.bmp",0,-27,350,530,0)
    GUICtrlSetSTate($pic,$GUI_DISABLE)
    $button = GUICtrlCreateButton("test", 30, 160, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button2 = GUICtrlCreateButton("test2", 30, 200, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image2)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button3 = GUICtrlCreateButton("test3", 30, 240, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image3)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button4= GUICtrlCreateButton("test4", 30, 280, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image4)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button5= GUICtrlCreateButton("test5", 30, 320, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image5)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button6= GUICtrlCreateButton("test6", 30, 360, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image6)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button7= GUICtrlCreateButton("test7", 180, 220, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image7)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    GUISetState(@SW_SHOW)

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

    $rueck = ping("85.131.2037.229")
    if $rueck then
    GuicTRlcreatepic("up.bmp",245,260,20,20)
    else
    GuicTRlcreatepic("down.bmp",245,260,20,20)
    Endif

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $button
    ShellExecute("http://www.rising-gods.de")
    case $button2
    ShellExecute("http://arsenal.rising-gods.de")
    case $button3
    run("notepad.exe " & "" & @scriptdir & "\Data\deDE\realmlist.wtf")
    case $button4
    DirRemove(@scriptdir & "\Cache\",1)
    if True then
    msgbox(4096,"Status","Cache erfolgreich gelöscht")
    if False then
    msgbox(4096,"Status","Error - Falsches Verzeichnis?")
    EndIf
    EndIf
    case $button5
    ShellExecute(@ScriptDir & "\wow.exe")
    case $Button6
    exit
    EndSwitch
    WEnd

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

    Func _Hover_Image_Proc($iCtrlID, $iParam)
    Local $picbutton1 = $sBack_Hover_Image
    Local $picbutton2 = $sBack_Hover_Image2
    Local $picbutton3 = $sBack_Hover_Image3
    Local $picbutton4 = $sBack_Hover_Image4
    Local $picbutton5 = $sBack_Hover_Image5
    Local $picbutton6 = $sBack_Hover_Image6
    Local $picbutton7 = $sBack_Hover_Image7
    If $iParam = 2 Then
    $picbutton1 = $std_Hover_Image
    $picbutton2 = $std_Hover_Image2
    $picbutton3 = $std_Hover_Image3
    $picbutton4 = $std_Hover_Image4
    $picbutton5 = $std_Hover_Image5
    $picbutton6 = $std_Hover_Image6
    $picbutton7 = $std_Hover_Image7

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

    EndIf
    Switch $iCtrlID
    Case $button
    GUICtrlSetImage($iCtrlID, $picbutton1)
    Case $button2
    GUICtrlSetImage($iCtrlID, $picbutton2)
    Case $button3
    GUICtrlSetImage($iCtrlID, $picbutton3)
    Case $button4
    GUICtrlSetImage($iCtrlID, $picbutton4)
    Case $button5
    GUICtrlSetImage($iCtrlID, $picbutton5)
    Case $button6
    GUICtrlSetImage($iCtrlID, $picbutton6)
    Case $button7
    GUICtrlSetImage($iCtrlID, $picbutton7)
    Case $button8
    GUICtrlSetImage($iCtrlID, $picbutton8
    Case $button9
    GUICtrlSetImage($iCtrlID, $picbutton9)
    EndSwitch
    EndFunc

    [/autoit]

    Einmal editiert, zuletzt von Kev (17. Februar 2010 um 23:35)

  • so sollts gehn.

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    $Form1 = GUICreate("", 200, 200)
    GUISetState(@SW_SHOW)

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

    If Ping("85.131.2037.229") Then
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20)
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20)
    EndIf

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

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

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

    EndSwitch
    WEnd

    [/autoit]
  • ach ich idiot. versuch mal das :D

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("", 200, 200)

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

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20)
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20)
    EndIf
    GUISetState(@SW_SHOW)

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

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

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

    EndSwitch
    WEnd

    [/autoit]
  • Hi,

    probiere es mal so in etwa ...

    [autoit]


    ; ...
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button7= GUICtrlCreateButton("test7", 180, 220, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image7)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")

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

    $ID_PICTURE = GuicTRlcreatepic("",245,260,20,20)

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

    GUISetState(@SW_SHOW)

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

    if ping("85.131.2037.229") then
    GUICtrlSetImage($ID_PICTURE, "up.bmp")
    else
    GUICtrlSetImage($ID_PICTURE, "down.bmp")
    Endif
    ; ...

    [/autoit]


  • du führst nur das hier aus und hast 2 fenster?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("", 200, 200)

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

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20)
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20)
    EndIf
    GUISetState(@SW_SHOW)

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

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

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

    EndSwitch
    WEnd

    [/autoit]


    dann würd ich an deiner stelle autoit neu installieren^^

  • wenn ichn extra gui erstelle dann gibs auchn extra gui, sprich 2tes fenster.
    mein fehler^^

    wie bau ichn das ding jetzt bei mir ein?
    weil wenn ich das jetzt übernehme ohne den gui...


    [autoit]

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20)
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20)
    EndIf
    GUISetState(@SW_SHOW)

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

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

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

    EndSwitch
    WEnd

    [/autoit]

    dann hab ich immernoch das gleiche problem.

    wenn ichs mit deinem gui übernehme:

    [autoit]

    #include <GUIConstantsEx.au3>

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

    $Form1 = GUICreate("", 200, 200)

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

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20)
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20)
    EndIf
    GUISetState(@SW_SHOW)

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

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

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

    EndSwitch
    WEnd

    [/autoit]

    geht das wunderbar

  • Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.4.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

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

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUICtrlSetOnHover_UDF.au3>

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

    Global $std_Hover_Image = @ScriptDir & "\rgt.bmp"
    Global $sBack_Hover_Image = @ScriptDir & "\rg.bmp"
    Global $std_Hover_Image2 = @ScriptDir & "\art.bmp"
    Global $sBack_Hover_Image2 = @ScriptDir & "\ar.bmp"
    Global $std_Hover_Image3 = @ScriptDir & "\ret.bmp"
    Global $sBack_Hover_Image3 = @ScriptDir & "\re.bmp"
    Global $std_Hover_Image4 = @ScriptDir & "\cat.bmp"
    Global $sBack_Hover_Image4 = @ScriptDir & "\ca.bmp"
    Global $std_Hover_Image5 = @ScriptDir & "\wot.bmp"
    Global $sBack_Hover_Image5 = @ScriptDir & "\wo.bmp"
    Global $std_Hover_Image6 = @ScriptDir & "\bet.bmp"
    Global $sBack_Hover_Image6 = @ScriptDir & "\be.bmp"
    Global $std_Hover_Image7 = @ScriptDir & "\set.bmp"
    Global $sBack_Hover_Image7 = @ScriptDir & "\set.bmp"

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

    GUICreate("Test", 600, 400)
    $Flash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
    $FlashObj = GUICtrlCreateObj($Flash, 350, 0, 250, 490)
    $Flash.Movie = "C:\loader.swf?mainfile=C:\main.swf"
    $Flash.loop = true
    GUISetState(@SW_SHOW)
    $pic = GUICtrlCreatePic("C:\image1.bmp",0,-27,350,530,0)
    GUICtrlSetSTate($pic,$GUI_DISABLE)
    $button = GUICtrlCreateButton("test", 30, 160, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button2 = GUICtrlCreateButton("test2", 30, 200, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image2)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button3 = GUICtrlCreateButton("test3", 30, 240, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image3)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button4= GUICtrlCreateButton("test4", 30, 280, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image4)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button5= GUICtrlCreateButton("test5", 30, 320, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image5)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button6= GUICtrlCreateButton("test6", 30, 360, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image6)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button7= GUICtrlCreateButton("test7", 180, 220, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image7)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")

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

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp", 40, 40, 20, 20); positionen und größe anpassen
    Else
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\down.bmp", 40, 40, 20, 20); positionen und größe anpassen
    EndIf
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $button
    ShellExecute("http://www.rising-gods.de")
    case $button2
    ShellExecute("http://arsenal.rising-gods.de")
    case $button3
    run("notepad.exe " & "" & @scriptdir & "\Data\deDE\realmlist.wtf")
    case $button4
    DirRemove(@scriptdir & "\Cache\",1)
    if True then
    msgbox(4096,"Status","Cache erfolgreich gelöscht")
    if False then
    msgbox(4096,"Status","Error - Falsches Verzeichnis?")
    EndIf
    EndIf
    case $button5
    ShellExecute(@ScriptDir & "\wow.exe")
    case $Button6
    exit
    EndSwitch
    WEnd

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

    Func _Hover_Image_Proc($iCtrlID, $iParam)
    Local $picbutton1 = $sBack_Hover_Image
    Local $picbutton2 = $sBack_Hover_Image2
    Local $picbutton3 = $sBack_Hover_Image3
    Local $picbutton4 = $sBack_Hover_Image4
    Local $picbutton5 = $sBack_Hover_Image5
    Local $picbutton6 = $sBack_Hover_Image6
    Local $picbutton7 = $sBack_Hover_Image7
    If $iParam = 2 Then
    $picbutton1 = $std_Hover_Image
    $picbutton2 = $std_Hover_Image2
    $picbutton3 = $std_Hover_Image3
    $picbutton4 = $std_Hover_Image4
    $picbutton5 = $std_Hover_Image5
    $picbutton6 = $std_Hover_Image6
    $picbutton7 = $std_Hover_Image7

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

    EndIf
    Switch $iCtrlID
    Case $button
    GUICtrlSetImage($iCtrlID, $picbutton1)
    Case $button2
    GUICtrlSetImage($iCtrlID, $picbutton2)
    Case $button3
    GUICtrlSetImage($iCtrlID, $picbutton3)
    Case $button4
    GUICtrlSetImage($iCtrlID, $picbutton4)
    Case $button5
    GUICtrlSetImage($iCtrlID, $picbutton5)
    Case $button6
    GUICtrlSetImage($iCtrlID, $picbutton6)
    Case $button7
    GUICtrlSetImage($iCtrlID, $picbutton7)
    Case $button8
    GUICtrlSetImage($iCtrlID, $picbutton8
    Case $button9
    GUICtrlSetImage($iCtrlID, $picbutton9)
    EndSwitch
    EndFunc

    [/autoit]
  • [autoit]

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

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

    AutoIt Version: 3.3.4.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

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

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUICtrlSetOnHover_UDF.au3>

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

    Global $std_Hover_Image = @ScriptDir & "\rgt.bmp"
    Global $sBack_Hover_Image = @ScriptDir & "\rg.bmp"
    Global $std_Hover_Image2 = @ScriptDir & "\art.bmp"
    Global $sBack_Hover_Image2 = @ScriptDir & "\ar.bmp"
    Global $std_Hover_Image3 = @ScriptDir & "\ret.bmp"
    Global $sBack_Hover_Image3 = @ScriptDir & "\re.bmp"
    Global $std_Hover_Image4 = @ScriptDir & "\cat.bmp"
    Global $sBack_Hover_Image4 = @ScriptDir & "\ca.bmp"
    Global $std_Hover_Image5 = @ScriptDir & "\wot.bmp"
    Global $sBack_Hover_Image5 = @ScriptDir & "\wo.bmp"
    Global $std_Hover_Image6 = @ScriptDir & "\bet.bmp"
    Global $sBack_Hover_Image6 = @ScriptDir & "\be.bmp"
    Global $std_Hover_Image7 = @ScriptDir & "\set.bmp"
    Global $sBack_Hover_Image7 = @ScriptDir & "\set.bmp"

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

    GUICreate("SnaX v.2.0.0 - by Anubiz ©2010", 600, 400)
    $Flash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
    $FlashObj = GUICtrlCreateObj($Flash, 350, 0, 250, 490)
    $Flash.Movie = "C:\loader.swf?mainfile=C:\main.swf"
    $Flash.loop = true
    GUISetState(@SW_SHOW)
    $pic = GUICtrlCreatePic("C:\image1.bmp",0,-27,350,530,0)
    GUICtrlSetSTate($pic,$GUI_DISABLE)
    $button = GUICtrlCreateButton("test", 30, 160, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button2 = GUICtrlCreateButton("test2", 30, 200, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image2)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button3 = GUICtrlCreateButton("test3", 30, 240, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image3)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button4= GUICtrlCreateButton("test4", 30, 280, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image4)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button5= GUICtrlCreateButton("test5", 30, 320, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image5)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button6= GUICtrlCreateButton("test6", 30, 360, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image6)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    $button7= GUICtrlCreateButton("test7", 180, 220, 140, 30, $BS_BITMAP)
    GUICtrlSetImage(-1, $std_Hover_Image7)
    _GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
    GUISetState(@SW_SHOW)

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

    If Ping("85.131.2037.229") Then ;
    $Pic1 = GUICtrlCreatePic(@Scriptdir & "\up.bmp",245,260,20,20); positionen und größe anpassen
    Else
    $Pic2 = GUICtrlCreatePic(@Scriptdir & "\down.bmp",245,260,20,20)); positionen und größe anpassen
    EndIf
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $button
    ShellExecute("http://www.rising-gods.de")
    case $button2
    ShellExecute("http://arsenal.rising-gods.de")
    case $button3
    run("notepad.exe " & "" & @scriptdir & "\Data\deDE\realmlist.wtf")
    case $button4
    DirRemove(@scriptdir & "\Cache\",1)
    if True then
    msgbox(4096,"Status","Cache erfolgreich gelöscht")
    if False then
    msgbox(4096,"Status","Error - Falsches Verzeichnis?")
    EndIf
    EndIf
    case $button5
    ShellExecute(@ScriptDir & "\wow.exe")
    case $Button6
    exit
    EndSwitch
    WEnd

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

    Func _Hover_Image_Proc($iCtrlID, $iParam)
    Local $picbutton1 = $sBack_Hover_Image
    Local $picbutton2 = $sBack_Hover_Image2
    Local $picbutton3 = $sBack_Hover_Image3
    Local $picbutton4 = $sBack_Hover_Image4
    Local $picbutton5 = $sBack_Hover_Image5
    Local $picbutton6 = $sBack_Hover_Image6
    Local $picbutton7 = $sBack_Hover_Image7
    If $iParam = 2 Then
    $picbutton1 = $std_Hover_Image
    $picbutton2 = $std_Hover_Image2
    $picbutton3 = $std_Hover_Image3
    $picbutton4 = $std_Hover_Image4
    $picbutton5 = $std_Hover_Image5
    $picbutton6 = $std_Hover_Image6
    $picbutton7 = $std_Hover_Image7

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

    EndIf
    Switch $iCtrlID
    Case $button
    GUICtrlSetImage($iCtrlID, $picbutton1)
    Case $button2
    GUICtrlSetImage($iCtrlID, $picbutton2)
    Case $button3
    GUICtrlSetImage($iCtrlID, $picbutton3)
    Case $button4
    GUICtrlSetImage($iCtrlID, $picbutton4)
    Case $button5
    GUICtrlSetImage($iCtrlID, $picbutton5)
    Case $button6
    GUICtrlSetImage($iCtrlID, $picbutton6)
    Case $button7
    GUICtrlSetImage($iCtrlID, $picbutton7)
    Case $button8
    GUICtrlSetImage($iCtrlID, $picbutton8
    Case $button9
    GUICtrlSetImage($iCtrlID, $picbutton9)
    EndSwitch
    EndFunc

    [/autoit]
    • Offizieller Beitrag

    In Zeile 69 ist eine Klammer zu viel.So sollte die Zeile Aussehen:

    [autoit]

    $Pic2 = GUICtrlCreatePic(@Scriptdir & "\down.bmp",245,260,20,20); positionen und größe anpassen

    [/autoit]