Ben, if you put this in the script of your stack, and then type "renameButtons" in the message box, it should do what you want.

on renameButtons
  repeat with c = 1 to the number of cds in  me
     repeat with b = 1 to the number of btns in cd c of me
if the label of btn b of cd c of me is "YES" then set the name of btn b of cd c of me to "1" if the label of btn b of cd c of me is "NO" then set the name of btn b of cd c of me to "0"
     end repeat
  end repeat
end renameButtons

Best,

Mark

On 29 Mar 2006, at 19:44, Ben Bock wrote:

I have a 15 card stack with 31 buttons per page (15 yes, 15 no, 1 Go next card). When I made this stack I screw up and did not name the buttons when copy& pasting them. I want the YES label buttons to be named "1" and the NO label buttons named "0". Can I do this with a script, preferably at the stack level?

My current effort is at the card level:

on openCard

    put the number of btns into btnCount

  repeat with x = 1 to btnCount

    put the label of btn x into labelList

    repeat for each line tGroup in labelList

      if  label of btn x is "YES" then

        set the Name of btn label tGroup of cd x to "1"

      end if

    end repeat

  end repeat

end openCard



I'm a newby to programming and Rev, & I'm learning Rev mostly from this user list. If there is some dorky mistake in my attempt, please excuse and school me properly.


Thanks



Ben
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to