tyyyyyyyyyy !
geht
tyyyyyyyyyy !
geht
xD
sorry mein fehler
<-- Anfänger
Ein Problem, wenn ich nem Button ne funktion geben,will ich draufklicken müssen das was passiert :x
im moment einmal versehentlich mit der maus drüber und schon geht die funktion auf :X
geht das iwie anders?
[autoit]#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"
GUICreate("Test", 600, 400)
GUICtrlCreatePic("C:\wotlk.jpg",0,0,650,450,0)
$button = GUICtrlCreateButton("test", 30, 150, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button2 = GUICtrlCreateButton("test2", 30, 190, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image2)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button3 = GUICtrlCreateButton("test3", 30, 230, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image3)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button4= GUICtrlCreateButton("test4", 30, 270, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image4)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button5= GUICtrlCreateButton("test5", 30, 310, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image5)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
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
If $iParam = 2 Then
$picbutton1 = $std_Hover_Image
$picbutton2 = $std_Hover_Image2
$picbutton3 = $std_Hover_Image3
$picbutton4 = $std_Hover_Image4
$picbutton5 = $std_Hover_Image5
EndIf
Switch $iCtrlID
Case $button
GUICtrlSetImage($iCtrlID, $picbutton1)
ShellExecute("http://www.google.de")
Case $button2
GUICtrlSetImage($iCtrlID, $picbutton2)
Case $button3
GUICtrlSetImage($iCtrlID, $picbutton3)
Case $button4
GUICtrlSetImage($iCtrlID, $picbutton4)
Case $button5
GUICtrlSetImage($iCtrlID, $picbutton5)
EndSwitch
EndFunc
Bei mir funzt alles wunderbar
habs mal erweitert
[autoit]#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"
GUICreate("Test", 600, 400)
$button = GUICtrlCreateButton("test", 30, 150, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button2 = GUICtrlCreateButton("test2", 30, 190, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image2)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button3 = GUICtrlCreateButton("test3", 30, 230, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image3)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button4= GUICtrlCreateButton("test4", 30, 270, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image4)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
$button5= GUICtrlCreateButton("test5", 30, 310, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, $std_Hover_Image5)
_GUICtrl_SetOnHover(-1, "_Hover_Image_Proc", "_Hover_Image_Proc")
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
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
If $iParam = 2 Then
$picbutton1 = $std_Hover_Image
$picbutton2 = $std_Hover_Image2
$picbutton3 = $std_Hover_Image3
$picbutton4 = $std_Hover_Image4
$picbutton5 = $std_Hover_Image5
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)
EndSwitch
EndFunc
wunderbaaaaaaaaar
den rest krieg ich gebacken
vielen dank schnitzel
___________________________________
Bei mir gehts
joa die buttonns gehen iwie nicht, krieg kein bild..überhaupt kein button mit image..
// update
das
GUICtrlSetOnHover
hab ich jetz au versucht, bin zu blöd dafür :x
was is wenn ich des jaetz mit mehreren buttons machen will? :x
wie stell ichn das an?
habs mir schon zusammengebastelt
aber trotzdem thx
[autoit]#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Cursor1
[/autoit][autoit][/autoit][autoit]GUICreate("Test", 600, 400)
GUICtrlCreatePic("C:\test.jpg",0,0,650,450,0)
GUISetState(@SW_SHOW)
$label = GUICtrlCreateButton("test", 30, 150, 140, 30, $BS_BITMAP)
$cursor = GUIGetCursorInfo()
GUISetState ()
AdlibRegister("_Hover_Label")
While sleep(100)
WEnd
Func _Hover_Label()
$pos = GUIGetCursorInfo()
If $pos[4] = $label Then
GUICtrlSetImage(-1, @ScriptDir & "\rg.bmp")
Else
GUICtrlSetImage(-1, @ScriptDir & "\rgt.bmp")
EndIf
EndFunc
While 1
$nMsg = GuiGetMsg()
Switch $nMsg
case $Button1
EndSwitch
WEnd
error : unbekannter funktionsname
Adlibregister("_Hover_Label")
Hey,
wollte mal fragen wie ich dass machen muss wenn ich mit der Maus über nen Button geh,das sich dann der Button verändert zu nem andern Bild.
MouseOver halt.
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 600, 400)
GUICtrlCreatePic("C:\test.jpg",0,0,650,450,0)
GUISetState(@SW_SHOW)
$Button1 = GUICtrlCreateButton("test", 30, 150, 140, 30, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\Image1.bmp")
GUISetState ()
[/autoit][autoit][/autoit][autoit][/autoit][autoit]While 1
$nMsg = GuiGetMsg()
Switch $nMsg
case $Button1
EndSwitch
WEnd
Der Button ist drin, bloß dieser MouseOver change halt :x
kann mir da vill jemand helfen? thx
jemand nochn vorschlag ? das ding hat prio
okay liegt am IE
mit Firefox funktionierts.
was mach ich jetzt wenn jemand kein Firefox hat ?!
//update
ich gebs auf, der letzte rotz
ich bleib bei meiner variante da oben,ich will doch nur das sich das net überlappt
html ist erstellt,
funktionert auch im browser.
schön und gut aber wenn ich das html einbinde,krieg ich nichts anderes alsn blaues bild.
obwohls doch im browser geht :o
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister ()
[/autoit][autoit][/autoit][autoit]$oIE = _IECreateEmbedded ()
GUICreate("Test", 600, 400, _
(@DesktopWidth - 600) / 2, (@DesktopHeight - 400) / 2, _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 600, 490)
GUISetState() ; Anzeigen der GUI
[/autoit][autoit][/autoit][autoit]_IENavigate ($oIE, "C:\s.html")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
GUIDelete()
[/autoit][autoit][/autoit][autoit]Exit
[/autoit]HTML:
<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="400"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0">
<param name="movie" value="nibbles.swf">
<param name="quality" value="high">
<param name="scale" value="exactfit">
<param name="menu" value="true">
<param name="bgcolor" value="#000040">
<embed src="loader.swf?mainfile=main.swf" width="350" height="700" swLiveConnect="false"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
</p>
</body>
ändert auch nichts
aber thx fürs probieren
sonst noch jemand nen vorschlag? ich bin am ende mit meinem latein
thx
bleibt nur noch das problem das ich damit jetzt malen kann, so zusagen..
wenn ich das fenster bewege,bleibt das bild dort stehen oderr verzerrt sich. :wacko:
#include <GUIConstantsEx.au3>
Local $WS_POPUP,$WS_EX_MDICHILD,$gui1
GUICreate("Test", 600, 400)
$Flash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
$FlashObj = GUICtrlCreateObj($Flash, 200, 0, 550, 490)
$Flash.Movie = "C:\loader.swf?mainfile=C:\main.swf"
$Flash.loop = true
GUISetState(@SW_SHOW)
GuiCtrlSetState(1,$GUI_ONTOP)
GUICtrlSetSTate(-1,$GUI_DISABLE)
$gui1 = GUICtrlCreatePic("C:\image1.bmp",0,-5,350,450,0)
GUICreate("2tes GUI",600,400,-1,-1,$WS_POPUP,$WS_EX_MDICHILD,$gui1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
$flash.
sou?!
wenn ichs jetz ausführ crashed der explorer und mein AutoIt
der rand is auf beiden seiten und gehört zum main.swf
da ich haber 0 ahnung hab wie man sowas bearbeitet bzw. den rand wegschneidet.
ist dasn großes problem :pinch:
falls jemand benötigt: image1.bmp