Re: How do I shorten this script? Use 'repeat with'?

2020-11-13 Thread J. Landman Gay via use-livecode
Here's another way: set the loc of grc "k1" to the loc of this cd repeat with x = 2 to 4 set the topleft of grc ("K" & x) to the topright of grc ("k" & x-1) set the left of grc ("k" & x) to the left of grc ("k" & x) - 1 end repeat I find it easier to move the graphic one pixel in

Re: How do I shorten this script? Use 'repeat with'?

2020-11-13 Thread Håkan Liljegren via use-livecode
Great! For me it works without adding 'the name of grc ”k1”‘. This works perfectly:    set the loc of grc "k1" to the width of this card/2, the height of this card/2    put "k1" into tPrevious    repeat with i = 2 to 5       put "k" & i into tName       set the topleft of grc tName to item 1 of

Re: How do I shorten this script? Use 'repeat with'?

2020-11-12 Thread William de Smet via use-livecode
I added 'the name of grc "k1" to the script and now it works. Thanks! set the loc of grc "k1" to cardWidth/2,cardHeight/2 put the name of grc "k1" into tPrevious repeat with x = 2 to 5 put "k" & x into tName set the topleft of grc tName to (item 1 of topright of grc tPrevious -1, item 2 of

How do I shorten this script? Use 'repeat with'?

2020-11-12 Thread William de Smet via use-livecode
Hi there, Another question today. How do I shorten this script? set the loc of grc "k1" to cardWidth/2,cardHeight/2 set the topleft of grc "k2" to (item 1 of topright of grc "k1" -1, item 2 of topright of grc "k1") set the topleft of grc "k3" to (item 1 of topright of grc "k2" -1, item 2 of