novice question re "marked" and customkeys

Timothy Miller gandalf at doctorTimothyMiller.com
Fri Apr 1 01:39:35 EDT 2011


Bob's experience, quoted below, seems odd. I don't think this is normal LC behavior. Something has gone wrong, it seems. I might have missed a reply to Bob that explains it, but I didn't see one.

Did you ever figure it out, Bob?


on mouseUp
   push card
   set lockscreen to "true"
   set lockmessages to "true"
   put the number of cards into tNum
   repeat with i = 2 to tNum
      if the shiftkey is down then exit repeat
      set cursor to busy
      go to card i
      put the id of this card & return after tCardId
   end repeat
   pop card
   put tCardId
end mouseUp

I tried this in a card button and a background button. It worked fine, either way. No duplicate card IDs. 

Reply to Peter:

"Mark cards where..." Oh! That is awesome! I'd forgotten about that command.

Also forgot about "mark cards by finding "x" in field "y"

Also forgot about "unmark cards where..." and "unmark cards by finding..."

These commands combine simplicity with blazing speed. You can do a lot with them. Thanks for reminding me.

Cheers,


Tim


On Mar 31, 2011, at 1:31 PM, Bob Sneidar wrote:

> Okay I was going to make a demo stack of how to do this, but I have run across a problem someone was talking about earlier and I didn't get it then but I sure do now! 
> 
> In a button as part of a background group on a card I have:
> 
> On mouseUp
>   put the id of this card into theFirstCard
>   go next
>   put the id of this card into theNextCard
> end mouseUp
> 
> THEY ARE BOTH THE SAME!!!!! How can that be? How can I get the ID of the CARD THAT IS CURRENTLY SHOWING? Not the CARD THAT THIS SCRIPT STARTED AT? (not shouting just capitalizing for emphasis). 
> 
> Bob




More information about the use-livecode mailing list