Hallo,
Ich bin noch rellativ neu in AutoIt und verstehe meinen Fehler nicht, bzw. wo mein Fehler ist.
Das Script soll bissher einfach nur in einem Gui ein 10x10 großes BilderFeld erstellen und dann mit einer Funktion,
die eingefügten Bilder in ein anderes Umändern.
Btw. danke für Unterstützung.
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.8.1
Author: Timinio
Script Function:
Test-Script um Bilder in einem Gui zu verändern.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
$lap=GUICreate("Test",200,200,Default,Default,$WS_SYSMENU)
$x=0
$y=0
Global $feldid[150]
For $id=1 To 101
If $x>180 Then
$y=$y+20
$x=0
EndIf
$id=(($y/20)*5)+($x/20)+1
Dim $feldid[$id]=[GUICtrlCreatePic(@scriptdir&"\sys\grau.jpg",$x,$y,20,20)]
$x=$x+20
Next
GUISetState()
Stone_edit("rot",2,3)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
Func Stone_edit($color,$x,$y)
$id=($y*5)+$x+1
$msg=GUICtrlSetImage($feldid[$id],@scriptdir&"\sys\"&$color&".jpg")
MsgBox(0,"",$msg)
EndFunc