In a message dated 9/3/04 11:02:47 AM, 
[EMAIL PROTECTED] writes:

>
>
>Message: 11
>Date: Fri, 3 Sep 2004 13:01:26 -0400
>From: "Frank D. Engel, Jr." <[EMAIL PROTECTED]>
>Subject: unhilite all fields of card ... ?
>To: How to use Revolution <[EMAIL PROTECTED]>
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>If anyone happens to know a convenient Transcript shortcut for 
>"unhilite all button on card x", "unhilite all buttons on cards a, b, 
>and c", and/or for "put empty into fields x, y, z, and t", it would 
>certainly save me a lot of time typing in some of these scripts...   
>I'm having to "unhilite button x of card a", "unhilite button y of card
>
>a", "put empty into field z of card a" for several hundred lines in 
>each of several scripts for this project I am doing.
   The answer is to put a handler like this into the script of the stack (so 
that it can be called from *any* card in the stack):

on LightsOut CardName
  lock screen # this is optional, depending on how many buttons you're gonna 
unhilite
  repeat with K1 = 1 to the number of buttons on card CardName
    set the hilite of button K1 of card CardName to false
  end repeat
  unlock screen # again, optional, depending on the number of buttons
end LightsOut

   Any time you want to unhilite an entire card's worth of buttons, just put 
one line -- "LightsOut (the short name of this card)" -- into the handler 
that's doing the unhiliting. If you want to play with multiple cards, something 
like this would be useful:

on LightsOut CardNameList # comma-delimited list of card names
  lock screen # this is optional, depending on how many buttons you're gonna 
unhilite
  repeat for each item CN of CardNameList
    repeat with K1 = 1 to the number of buttons on card CN
      set the hilite of button K1 of card CN to false
    end repeat
  end repeat
  unlock screen # again, optional, depending on the number of buttons affected
end LightsOut

   The analogous handler(s) for clearing the contents of text fields are left 
as an exercise for the reader.

   Hope this helps...
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to