Hilfe mit autoit

03/05/2010 20:32 Nico001#1
Hi leute!
ich brauche hilfe bei etwas
diese frage ist zwar blöd aber wie ändere ich ein bild von einer iconbox per buttondruck z.B von rot in grün ???
pls hilft mir, dann kann ich einen neuen hack vorstellen ;)
ihr müsst einfach nur den code reischreiben
danke!
03/05/2010 20:49 chilz111#2
verstehe irgent wie nicht ganz du das meinst
SRY ...
03/05/2010 20:55 Nico001#3
also:
ich habe einen button ($Button1)
dann habe ich eine iconbox ($Icon1)
es hat am anfang ein bild was rot ist
wenn ich $Button1 klicke soll er von rot in grün umspringen
und ich kenne den code nicht dafür

Mein code:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("pic ändern", 162, 85, 193, 133)
$Button1 = GUICtrlCreateButton("green", 8, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("red", 80, 8, 75, 25, 0)
$Icon1 = GUICtrlCreateIcon("C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Icon1 = GUICtrlCreateIcon("C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Icon1 = GUICtrlCreateIcon("C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\an.nic", 0, 64, 40, 37, 37)
$Icon1 = GUICtrlCreateIcon("C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
Case $Button2
$Icon1 = GUICtrlCreateIcon("C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
EndSwitch
WEnd

er ändert zwar das bild aber wen ich jez z.B einen tabsheet mache ist es auch in tabsheet 2 :(
pls help!
03/06/2010 13:28 Flasher2#4
ändern in
Code:
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("pic ändern", 162, 85, 193, 133)
$Button1 = GUICtrlCreateButton("green", 8, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("red", 80, 8, 75, 25, 0)
$Icon1 = GUICtrlCreateIcon
GuiCtrlSetData (Wert sry kp welcher by Icon"C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Icon1 = GUICtrlCreateIcon
GuiCtrlSetData (Wert sry kp welcher by Icon"C:\Users\Nico\Desktop\Bots von Nico001\Metin2 Maphack-tool by Nico001\Bilder\aus.nic", 0, 64, 40, 37, 37)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
EndSwitch
WEnd
Und ehmm unten da hast du ganze zeit nur $Icon1 und net $Icon2 ist natürlich auch schlau gib $Icon2 das PIC von $Icon1

naja vllt. das mal beheben dann musst das da oben net machen :D