ok also ich habs mir mal genauer angeschaut aber das ist genau das was ich gemacht habe - nur das ich den style $BS-BITMAP und nicht %BS_ICON benutzt habe. Schaut euch mal den Code an plz
Also hierdrum gehts
Spoiler anzeigen
func schiffe()
$info=GUIGetCursorInfo ()
_ArrayAdd($Schiffe, $info[4])
$Schiffe[0]=$Schiffe[0]+1
GUICtrlSetStyle($info[4], $BS_BITMAP)
GUICtrlSetImage($info[4], "C:\Scripte\Poker\Karten\Herz Bube.bmp")
GUICtrlSetData($info[4], "Schiff")
;MsgBox(0, "", $position)
[/autoit] [autoit][/autoit] [autoit]EndFunc
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]func setzen()
$z=0
for $i = 4 to 172
switch $i
case 146 to 170
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
;MsgBox(0, $i, @ScriptDir&"\grey.bmp")
case 171 to 172
ExitLoop
case 4 to 146
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
local $test4=Guictrlread($i+13)
local $test5=Guictrlread($i+26)
;MsgBox(0, $i, $test&" "&$test2&" "&$test3&" "&$test4&" "&$test5)
EndSwitch
IF $test="Schiff" AND $test2="Schiff" AND $test3="Schiff" Then
#cs
$position2=ControlGetPos("Schiffe versenken" ,"", $i)
$x=$position2[0]
$y=$position2[1]
$width=$position2[2]
$high=$position2[3]
#ce
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, $BS_BITMAP)
GUICtrlsetImage($i, @ScriptDir&"\grey.bmp")
GUICtrlsetData($i+1, "Transporter")
GUICtrlSetStyle($i+1, $BS_BITMAP)
GUICtrlSetImage($i+1, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+2, "Transporter")
GUICtrlSetStyle($i+2, $BS_BITMAP)
GUICtrlSetImage($i+2, @ScriptDir&"\grey.bmp")
ExitLoop
ElseIF $test="Schiff" AND $test4="Schiff" AND $test5="Schiff" Then
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, -1 )
GUICtrlSetImage($i, "")
GUICtrlSetData($i+13, "Transporter")
GUICtrlSetStyle($i+13, -1 )
GUICtrlSetImage($i+13, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+26, "Transporter")
GUICtrlSetStyle($i+26, -1 )
GUICtrlSetImage($i+26, @ScriptDir&"\grey.bmp")
exitLoop
endIf
Next
EndFunc
func schiffe()
$info=GUIGetCursorInfo ()
_ArrayAdd($Schiffe, $info[4])
$Schiffe[0]=$Schiffe[0]+1
GUICtrlSetStyle($info[4], $BS_BITMAP)
GUICtrlSetImage($info[4], "C:\Scripte\Poker\Karten\Herz Bube.bmp")
GUICtrlSetData($info[4], "Schiff")
;MsgBox(0, "", $position)
[/autoit] [autoit][/autoit] [autoit]EndFunc
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]func setzen()
$z=0
for $i = 4 to 172
switch $i
case 146 to 170
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
;MsgBox(0, $i, @ScriptDir&"\grey.bmp")
case 171 to 172
ExitLoop
case 4 to 146
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
local $test4=Guictrlread($i+13)
local $test5=Guictrlread($i+26)
;MsgBox(0, $i, $test&" "&$test2&" "&$test3&" "&$test4&" "&$test5)
EndSwitch
IF $test="Schiff" AND $test2="Schiff" AND $test3="Schiff" Then
#cs
$position2=ControlGetPos("Schiffe versenken" ,"", $i)
$x=$position2[0]
$y=$position2[1]
$width=$position2[2]
$high=$position2[3]
#ce
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, $BS_BITMAP)
GUICtrlsetImage($i, @ScriptDir&"\grey.bmp")
GUICtrlsetData($i+1, "Transporter")
GUICtrlSetStyle($i+1, $BS_BITMAP)
GUICtrlSetImage($i+1, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+2, "Transporter")
GUICtrlSetStyle($i+2, $BS_BITMAP)
GUICtrlSetImage($i+2, @ScriptDir&"\grey.bmp")
ExitLoop
ElseIF $test="Schiff" AND $test4="Schiff" AND $test5="Schiff" Then
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, -1 )
GUICtrlSetImage($i, "")
GUICtrlSetData($i+13, "Transporter")
GUICtrlSetStyle($i+13, -1 )
GUICtrlSetImage($i+13, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+26, "Transporter")
GUICtrlSetStyle($i+26, -1 )
GUICtrlSetImage($i+26, @ScriptDir&"\grey.bmp")
exitLoop
endIf
Next
EndFunc
func schiffe()
$info=GUIGetCursorInfo ()
_ArrayAdd($Schiffe, $info[4])
$Schiffe[0]=$Schiffe[0]+1
GUICtrlSetStyle($info[4], $BS_BITMAP)
GUICtrlSetImage($info[4], "C:\Scripte\Poker\Karten\Herz Bube.bmp")
GUICtrlSetData($info[4], "Schiff")
;MsgBox(0, "", $position)
[/autoit] [autoit][/autoit] [autoit]EndFunc
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]func setzen()
$z=0
for $i = 4 to 172
switch $i
case 146 to 170
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
;MsgBox(0, $i, @ScriptDir&"\grey.bmp")
case 171 to 172
ExitLoop
case 4 to 146
local $Test = GUICtrlRead($i)
local $test2=Guictrlread($i+1)
local $test3=Guictrlread($i+2)
local $test4=Guictrlread($i+13)
local $test5=Guictrlread($i+26)
;MsgBox(0, $i, $test&" "&$test2&" "&$test3&" "&$test4&" "&$test5)
EndSwitch
IF $test="Schiff" AND $test2="Schiff" AND $test3="Schiff" Then
#cs
$position2=ControlGetPos("Schiffe versenken" ,"", $i)
$x=$position2[0]
$y=$position2[1]
$width=$position2[2]
$high=$position2[3]
#ce
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, $BS_BITMAP)
GUICtrlsetImage($i, @ScriptDir&"\grey.bmp")
GUICtrlsetData($i+1, "Transporter")
GUICtrlSetStyle($i+1, $BS_BITMAP)
GUICtrlSetImage($i+1, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+2, "Transporter")
GUICtrlSetStyle($i+2, $BS_BITMAP)
GUICtrlSetImage($i+2, @ScriptDir&"\grey.bmp")
ExitLoop
ElseIF $test="Schiff" AND $test4="Schiff" AND $test5="Schiff" Then
GUICtrlSetData($i, "Transporter")
GUICtrlSetStyle($i, -1 )
GUICtrlSetImage($i, "")
GUICtrlSetData($i+13, "Transporter")
GUICtrlSetStyle($i+13, -1 )
GUICtrlSetImage($i+13, @ScriptDir&"\grey.bmp")
GUICtrlSetData($i+26, "Transporter")
GUICtrlSetStyle($i+26, -1 )
GUICtrlSetImage($i+26, @ScriptDir&"\grey.bmp")
exitLoop
endIf
Next
EndFunc
EDIT: Das ist immer noch aktuell - hat mitlerweile einer eine idee? ![]()