Telling which stack is active?

Ken Ray kray at sonsothunder.com
Sat Aug 18 18:13:35 EDT 2007


On Sat, 18 Aug 2007 14:13:51 -0700, Paul Gabel wrote:

> Hi everybody:
> 
> I have 6 stacks with their windows open at the same time. Some are 
> hidden behind other stacks and then slide out from underneath (like a 
> drawer). But I can't figure out a way within scripts to tell which 
> stack is the "active" one, the one the cursor has last clicked on, 
> the one that is checked in the Windows menu. How can I do something 
> like: <if stack "ABC" is theActiveStack then ... > ?
> 
> This problem is frustrating me, and I sure would appreciate a little help.

Very close - look at "defaultStack" and "topStack" in the Dictionary. 
Basically "defaultStack" is the stack that is what you are talking 
about when you use "this" (like "the short name of this card"), and 
"topStack" is the frontmost stack with the lowest "mode" (usually 
meaning the frontmost topLevel window).

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list