What does this return a list of the marked cards separated by many, many returns in the field and how can I get the list of marked cards as a list without the empty lines between each?
on mouseUp
repeat with n = 1 to the number of cards in this stack
if the mark of card n is true then put the short name of card n into item 1 of line n of card field "DataField"
end repeat
end mouseUp
Thanks!
Getting a list of marked cards
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Getting a list of marked cards
Hi ncmac,
This function return the list of the mark cards without empty line
You can use also :
Best regards
Jean-Marc
Yes, one empty line = one no-mark cardseparated by many, many returns in the field
This function return the list of the mark cards without empty line
Code: Select all
function TheMarkedCards
put empty into rTheMarkedCards
repeat with n = 1 to the number of cards in this stack
if the mark of card n is true then put the short name of card n & return after rTheMarkedCards
end repeat
delete char -1 of rTheMarkedCards
return rTheMarkedCards
end TheMarkedCards
You can use also :
Code: Select all
filter MyVariable without empty
Jean-Marc
https://alternatic.ch
Re: Getting a list of marked cards
The following should work also since you can directly access using the "marked" keyword.
Code: Select all
on mouseUp
repeat with n = 1 to the number of marked cards in this stack
put the short name of marked card n into item 1 line n of field "DataField"
end repeat
end mouseUp
Re: Getting a list of marked cards
Thank you all very much!