Page 1 of 1

Stack Buttons

Posted: Fri Oct 02, 2009 10:21 pm
by SirWobbyTheFirst
I am wanting to create a stack which shows each open stack as a button much like the Windows taskbar and i was wondering how i could script the stack to do this.

Any help would be much appreciated.

PS. I am thinking of creating this as a plugin for Revolution so that users can easily switch stacks especially if the stack doesn't have a window.

Posted: Sat Oct 03, 2009 12:45 pm
by Janschenkel
Your best start is the openStacks property. Here's something to get you started - assuming you have a button and a single image control named "MySnapshot"':

Code: Select all

on mouseUp
  put the openStacks into tOpenStacks
  filter tOpenStacks without "rev*"  -- skip IDE stacks
  repeat for each line tOpenStack in tOpenStacks
    if tOpenStack is the short name of this stack then next repeat
    if the visible of stack tOpenStack then
      export snapshot from the current card of stack tOpenStack to image "MySnapshot" as PNG
    end if
    wait 1 second
  end repeat
end mouseUp
HTH,

Jan Schenkel.