What is wrong with this script?

DunbarX at aol.com DunbarX at aol.com
Thu Nov 4 19:30:58 EDT 2010


Charles.

Good. This never happens to me.

Your script can be shortened, and sped up, a bit. Watch line wraps:

on doStuff3
    repeat with y = 1 to the number of marked cards
       repeat with b = 1 to the number of buttons of marked cd y
          if the style of button b of marked cd y = "checkbox" and the 
hilite of button b of marked cd y = "true" then
                send "mouseUp" to button b
             end if
       end repeat
    end repeat
end doStuff3

The important thing here is to see that the references to remote cards can 
substitute for actually going there. Sometimes navigating is better; usually 
not. So you never actually have to go to each card.   You don't have to 
lock anything, or save your location and return. 

By using the mark property, you don't need to test to see if a card is 
marked.

Craig



More information about the use-livecode mailing list