Put "test2" into field "Attendance" of last marked card of stack "Kids"

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Jul 16 06:48:56 EDT 2012


Mark,

repeat with x = 1 to number of marked cards
     put "test1" into field "Attendance" of marked cd x
end repeat

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Economy-x-Talk is looking for an amateur painter/cartoonist/poet etc. Contact me http://qery.us/du



On 16 jul 2012, at 12:44, Mark Rauterkus wrote:

> Hi,
> 
> This works:
> put "test1" into field "Attendance" of first marked card of stack "Kids"
> 
> This works:
> put "test2" into field "Attendance" of last marked card of stack "Kids"
> 
> BUT, this does not:
> 
> put "test3" into field "Attendance" of all marked cards of stack "Kids"
> 
> FAIL too.
> put "test3" into field "Attendance" marked cards of stack "Kids"
> 
> - - -
> 
> So, I'd love to put a message into ALL of the Marked Cards
> 
> Must I do a repeat script?
> 
> But my repeat script is failing too, with and without quotes for the vars.
> 
> 
> on mouseUp tRepeat, tCounter, test1
>   put "AM TEST 1" into test1
>   go to stack "Kids"
>   mark cards by finding "Greece" in field "Dreamers Class" -- of stack "Kids"
>   mark cards by finding "Canada" in field "Dreamers Class"
> 
> 
>   Get the number of marked cards
>   put it into tRepeat
> 
>   put "0" into tCounter
>   Repeat for tRepeat
>      put 1 into tCounter -- the counter
>      put "test1" into field "Attendance" of "tCounter" marked cards
>      go to next marked card
>   end repeat
> 
>   beep
> 
> end mouseUp
> 
> 
> Error in script debugger says:
> button "test 1": compilation error at line 15 (Chunk: missing chunk)
> near "tCounter", char 43
> 
> 
> 
> --
> Ta.
> 





More information about the use-livecode mailing list