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
$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
Full Script:
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.4.0
Author: myName
Script Function:
Template AutoIt script.
#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>
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"
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)
$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
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
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
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