Startseite › Foren › Deutsches LiveCode-Forum › Objekte per Skript erstellen › Antwort auf: Objekte per Skript erstellen
April 14, 2018 um 20:59 Uhr
#5297
Dank Dr. Google konnte ich auch dafür die Lösung finden.
Für den Fall, dass sich jemand dafür interessiert hier das Skript:
command createObjectMatrix pObject pWidth pHeight pM pN pStackName
if pStackName is not empty then
set the defaultStack to pStackName
end if
if pObject is among the words of "field button image" then
if (pM is an integer) AND (pM > 0) then
if (pN is an integer) AND (pN > 0) then
repeat with m = 1 to pM
repeat with n = 1 to pN
switch pObject
case "field"
create field ("fldM"&m&"N"&n)
break
case "button"
create button ("btnM"&m&"N"&n)
break
case "image"
create image ("imgM"&m&"N"&n)
break
end switch
if (pWidth is an integer) AND (pWidth > 0) then
set the width of it to pWidth
end if
if (pHeight is an integer) AND (pHeight > 0) then
set the height of it to pHeight
end if
set the showBorder of it to true
end repeat
end repeat
end if
end if
end if
end createObjectMatrix
liebe Grüße,
Georg