ich habe im Forum ein Script
gefunden mit dem man Bilder wechseln kann!
Aber ich brauche eure Hilfe.
Hier die UDF
Spoiler anzeigen
#include-Once
; #INDEX# ===========================================================================================================
; Name ...........: Mouse Over
; Sprache ........: Deutsch
; Beschreibung ...: Funktion zum ändern des Bildes eines Controls(Mouse over).
; Author .........: cinema
; ====================================================================================================================
Func _mover($control, $bild1, $bild2)
$mpos = GUIGetCursorInfo()
If (IsArray($mpos)) Then
If ($mpos[4] = $control) Then
GUICtrlSetImage($control, $bild2)
Else
GUICtrlSetImage($control, $bild1)
EndIf
EndIf
EndFunc
und hier das Beispielscript
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include "_mover.au3"
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 445, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 192, 128, 80, 57, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "ok_nact.bmp", -1)
GUICtrlSetFont(-1, 7, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
_mover($Button1, "ok_nact.bmp","ok_act.bmp")
WEnd
ich habe aber kein Button, sondern ein Bild
Pic1 = bt1.jpg
Ich möchte, wenn ich den Cursor auf PIC 1 bewege daß
sich das Bild in bt2.jpg ändert. Welche Pfadangaben muß ich ändern?
bt2.jpg und bt3.jpg sind im @Script Verzeichnis!
Und wenn man KLICKT daß dann das Bild bt3.jpg kommt und der Befehl ausgeführt wird!
Hier mal mein Rohbau:
[autoit]
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form2", 549, 421, 285, 182)
$Pic1 = GUICtrlCreatePic("C:\bt1.jpg", 58, 34, 153, 149)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Pic1
EndSwitch
WEnd
Welches Bild erhält den Case Befehl...?
Ich bin irgendwie total durcheinander
und weiß nicht wie ich meine Bilder ansprechen kann
...kann nicht mehr klar denken... ![]()
Grüße
Ilse