More Constellation scripts....

David Bovill david at openpartnership.net
Tue Feb 14 08:43:04 EST 2006


And yes - getActiveTab() and getNoTabs() no longer work from CPO's or  
message box - I think they have moved to different locations....


function cons_GetTabScriptObjects
     -- set the defaultStack to "revTranscriptGadget"
     -- put getActiveTab() into activeTab -- (in Cons. stack script;  
returns number of the active tab)
     -- put getNoTabs() into numOfTabs -- (in Cons. stack script;  
returns the number of tabs in use)

     put the long id of group "tabs" of cd 1 of stack  
"revConstellation" into consTabGroup
     put the number of buttons in consTabGroup into maxBtns
     repeat with btnNum = 1 to maxBtns
         put the long id of btn btnNum of consTabGroup into  
consTabButton
         if the label of consTabButton is not space then
             put the cObjectID of consTabButton into scriptObject --  
(long id of any tab's object)
             put scriptObject & return after scriptObjects
         end if
     end repeat
     delete last char of scriptObjects
     return scriptObjects
end cons_GetTabScriptObjects

function cons_GetNumberOfTabs
     put 0 into theRealNoBtns
     put the long id of group "tabs" of cd 1 of stack  
"revConstellation" into consTabGroup
     put the number of buttons in consTabGroup into maxBtns
     repeat with btnNum = 1 to maxBtns
         put the long id of btn btnNum of consTabGroup into  
consTabButton
         if the label of consTabButton is not space then
             add 1 to theRealNoBtns
         end if
     end repeat
     return theRealNoBtns
end cons_GetNumberOfTabs




More information about the use-livecode mailing list