Startseite › Foren › Deutsches LiveCode-Forum › Objekte per Skript erstellen › Antwort auf: Objekte per Skript erstellen
April 14, 2018 um 19:19 Uhr
#5295
Okay ein Problem habe ich gelöst – hier ein kurzer Update:
command createObjectMatrix pObject pWidth pHeight
if pObject is among the words of "field button image" then
repeat with w = 1 to 6
repeat with d = 1 to 7
switch pObject
case "field"
create field ("W"&w&"D"&d)
break
case "button"
create button ("W"&w&"D"&d)
break
case "image"
create image ("W"&w&"D"&d)
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 createObjectMatrix
Offen ist nun noch die Möglichkeit dieses Skript beispielsweise in einem eigenen Stack abzuspeichern, aber nach Aufruf die gewünschten Objekte auf der Card eines anderen Stacks erstellen zu lassen. Hat jemand eine Idee, wie das klappen könnte?
mfG,
Georg
