#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" AppBrowserPatch2 @X, uPaypalURLChttps%3A%2F%2Fwww.paypal.com%2Fcgi-bin%2Fwebscr%3Fcmd%3D_xclick%26business%3Deric%252echatonet%2540sosmartsoftware%252ecom%26item_name%3DEric%2520Chatonet%26item_number%3DDev%2520Support%26no_shipping%3D0%26no_note%3D1%26tax%3D0%26currency_code%3DEUR%26return%3Dhttp%3A%2F%2Fwww.sosmartsoftware.com%2F%26charset%3DUTF%252d82Application Browser Patch for Rev 2.5.1 or Higher ULucida Grande ULucida Grande WLucida Grande @ULucida Grande UGeorgiaUGeorgiacREVGeometryCachestackID1017 cREVGeneral bookmarks debugObjects handlerList prevHandler tempScriptscript X/* App Browser 2.5.1 to 2.6 Patch by Eric Chatonet sosmartsoftware.com July 2005 */ on preOpenStack set the loc of this stack to the screenloc set the style of this stack to modeless end preOpenStack --------------------------------- on openStack switch case BadRevVersion() -- answer error "This patch is for Rev 2.5.1 or higher." with "Sorry" as sheet disable btn "Apply Patch" break case "-- put tControls into lControlCache[pCard]" is in the script of stack AppBrowserPath() -- answer info "This patch has been already applied." as sheet disable btn "Apply Patch" break default enable btn "Apply Patch" end switch end openStack --------------------------------- function BadRevVersion put revAppVersion() into tVersion if tVersion = "2.5.1" then return false if char 1 to 3 of tVersion >= 2.6 then return false return true end BadRevVersion --------------------------------- function AppBrowserPath local tFilePath ----- put the stacks into tFilePath filter tFilePath with "*revmenubar.rev" if tFilePath = empty then answer error "Could not find the right path." with "Sorry" exit to top else set the itemDel to slash put "revApplicationOverview.rev" into item -1 of tFilePath if there is a file tFilePath then return tFilePath answer error "Could not find revApplicationOverview.rev stack." with "Sorry" exit to top end if end AppBrowserPath ,cREVGeometryCacheIDs110992619471610051109926471772100711105488078761014111942370952610161110540770416160011214222308561017cREVGeometrycachetotal6order  cREVGeneralscriptChecksum M40 >TJG bookmarks breakPoints handlerList3preOpenStack openStack BadRevVersion AppBrowserPathscriptSelectionchar 1213 to 1234 prevHandler openStack tempScriptscript

/*

App Browser 2.5.1 to 2.6 Patch by Eric Chatonet

sosmartsoftware.com

July 2005

*/

on preOpenStack

set the loc of this stack to the screenloc

set the style of this stack to modeless

end preOpenStack

---------------------------------

on openStack

switch

case BadRevVersion() -- 

answer error "This patch is for Rev 2.5.1 or higher." with "Sorry" as sheet

disable btn "Apply Patch"

break

case "-- put tControls into lControlCache[pCard]" is in the script of stack AppBrowserPath() -- 

answer info "This patch has been already applied." as sheet

disable btn "Apply Patch"

break

default

enable btn "Apply Patch"

end switch

end openStack

---------------------------------

function BadRevVersion

put revAppVersion() into tVersion

if tVersion = "2.5.1" then return false

if char 1 to 3 of tVersion >= 2.6 then return false

return true

end BadRevVersion

---------------------------------

function AppBrowserPath

local tFilePath

-----

put the stacks into tFilePath

filter tFilePath with "*revmenubar.rev"

if tFilePath = empty then

answer error "Could not find the right path." with "Sorry"

exit to top

else

set the itemDel to slash

put "revApplicationOverview.rev" into item -1 of tFilePath

if there is a file tFilePath then return tFilePath

answer error "Could not find revApplicationOverview.rev stack." with "Sorry"

exit to top

end if

end AppBrowserPath

@ Apply PatchEpon mouseUp local tCurPath,tSavePath,tFileType,tNewScript,tNewCardScript,tPrompt ----- set the cursor to watch ----- saving current app browser: put AppBrowserPath() into tCurPath -- C put tCurPath into tSavePath set the itemDel to slash put "revApplicationOverview old.rev" into item -1 of tSavePath if the platform = "MacOS" then put the fileType into tFileType set the fileType to "revoRSTK" end if put url("binfile:" & tCurPath) into url("binfile:" & tSavePath) put the result into tResult if the platform = "MacOS" then set the fileType to tFileType if tResult <> empty then answer error "An error occured when saving a backup of your current App Browser stack." \ & cr & cr & "Process has been stopped." with "Sorry" as sheet exit mouseUp end if ------ set the script of stack "revApplicationOverview" to the script of btn "NewScript" save stack "revApplicationOverview" ----- cleaning up: disable the target put "

Answer Dialog patch has been applied succesfully.

" & cr \ & cr & "

To ensure the security, a copy of your previous App Browser stack has been saved as

" & tSavePath & ".

" into tPrompt replace cr with cr & "

" & cr in tPrompt answer info tPrompt end mouseUp 2d cREVGeneral scriptChecksum#=d breakPoints handlerListmouseUpscriptSelectionchar 151 to 150 revUniqueID 1109926194716 bookmarks tempScript prevHandlermouseUpscript

on mouseUp

local tCurPath,tSavePath,tFileType,tNewScript,tNewCardScript,tPrompt

-----

set the cursor to watch

----- saving current app browser:

put AppBrowserPath() into tCurPath -- C

put tCurPath into tSavePath

set the itemDel to slash

put "revApplicationOverview old.rev" into item -1 of tSavePath

if the platform = "MacOS" then

put the fileType into tFileType

set the fileType to "revoRSTK"

end if

put url("binfile:" & tCurPath) into url("binfile:" & tSavePath)

put the result into tResult

if the platform = "MacOS" then set the fileType to tFileType

if tResult <> empty then

answer error "An error occured when saving a backup of your current App Browser stack." \

& cr & cr & "Process has been stopped." with "Sorry" as sheet

exit mouseUp

end if

------

set the script of stack "revApplicationOverview" to the script of btn "NewScript"

save stack "revApplicationOverview"

----- cleaning up:

disable the target

put "<p><b>Answer Dialog patch has been applied succesfully.</b></p>" & cr \

& cr & "<p><i>To ensure the security, a copy of your previous App Browser stack has been saved as</i></p><p><i>" & tSavePath & ".</i></p>" into tPrompt

replace cr with cr & "<p></p>" & cr in tPrompt

answer info tPrompt

end mouseUp

Info xon linkClicked revmail "feedback@sosmartsoftware.com",,"About Answer Dialog Patch","Thanks for giving me your feedback!" & cr & cr end linkClicked (|  cREVGeneralscriptChecksum:ԝ4u10o bookmarks revUniqueID 1109926471772 handlerList linkClickedscriptSelection char 80 to 79 prevHandler linkClicked tempScriptscript

on linkClicked

revmail "feedback@sosmartsoftware.com",,"About Answer Dialog Patch","Thanks for giving me your feedback!" & cr & cr

end linkClicked

 cThis patch for Revolution/DreamCard 2.5.1 and 2.6 forces the Application Browser lists to refresh. $ $ 11 ( Just click on the Apply Patch button. @1600    3 Note that the patch saves first a backup of your components/ tools/revapplicationoverview.rev stack as revapplicationoverview old.rev : so you will be able to revert to the previous state if you wish it by trashing the revapplicationoverview.rev stack and suppressing the old suffix from the backup name. @1600 2 3, _ i U     Eric Chatonet  @ Flche2.png q PNG  IHDR Kpl_ pHYs  gAMA|Q cHRMz%u0`:o_FIDATxb?,Xv$ϯ.?~~e'P#@11 @?~23_k_?V@p /÷>|()%ţ,%-F2\@ *n w JU牓/_ o_ū(II` b`AM]Nk5 _ ,?d+@021~K?@fӬ ~W XXY};w<||| ߿}Kw^W@koǑ74;Gڷo_߿uLL7qe`&Fqϟ_sPuFFfbA8`(10r=zk~ TxNP`=l|,IENDB` cREVGeneral revUniqueID 1110540770416SSS.png  Jon mouseDown revGoUrl "http://www.sosmartsoftware.com/" end mouseDown "-PNG  IHDR". pHYs.#.#x?v 9iCCPPhotoshop ICC profilexڝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2$ 8xtrp/8 pCfq.Knjm͠{r28?.)ɩL^6g,qm"[Z[Z~Q7%" 3R`̊j[~: w!$E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yzgAMA|Q cHRMz%u0`:o_F"IDATxbax& O?"?z$<@,X< dz,,2{H?Hk4^B˧̌<4i_rD@,hgaӊb:޾zo]ǷDr8 4y6{5ݕ]WMż#٩ƧoZQqm8$Iyon0w 3+ `8 K d+ ,?ۏҟ]xۥW/~g33+?@S_B9.3_823J{;kc :e'HfCqΈ#{x#Sxs`]Ϛ[^>Y5c+?8r2,FF zh(~(M Ѱ狻v%?d|\>}aeE,^%oΦU{ǃ_Tdگ?w>ytfo <"JYղC"%.686lq-dG &pK\j{H@FeoFWwnAςDE|Փg{Y8~#%̅~f^U8]#50Ln>n^>~f[v6&߰ d cvF>H?~ߟ郹,",Z9}WX%ëXDHĄŠ 9J02qrrﳃ_+yop6E[?;3R.QYy844>?ǛGW50s[s|DYޜs%fq-9_KLu~W=\j^n+!a&lgǯ^ӏ]m rB#ǻ? hV.n6%Lz<х ;'￿ ?g{3蟿~/,r6 ~rOmsy9<9'x9 s-RXxծ|:,>̲ܿ?R= w3< 0 C_>;%'o3_?*imcރ?"2BqN.z6UI/"N~|zʲ/Ho_8AII[9Ԟ|d/O^0Q-$*ۻ= ?:Ű̢*'c*fy_ο> ^Q0si.c``_̒NL l [{p H),x]^ F o1ٍ-w}R0XxkqF_bh6^ . f6F Y. M;S.!IΞz+ *rO3߿z:;;El9%5<{{ˣa!0F6q!qNq M ߿,Oمye-d~82ċsɫ }?R\]WɫJEYDMI\XBV^]$L\ҺJj\6_d x }#ǩB__=r{ 73昳ps0+hڙ7}T~˻oya!!#v</^#.+YXUGN?FSHERTYQHXVDWߞ\RP&-<*e|o:ԹDZO\C7VUAqc㗶ɔ2SRS^!ѕ򊼡r2\vont@W޳2.>eͩ\Pvw׾zY-NݛoM7+Iq+Z( V2{sW/~PvKꙟ(wnZ_V!_xDľTbƯ@I]u &vnn:aAJJ}0-{aQf_>\~A>/x a|x]=҆'?X=ۜ\VqIe̩>[g$\be4 KkabEXOH9 ϟqɍO^-V`ʇ{<~y1I 2sps2 }g,,j2 UWUgWĿ630~}go |mĦ#".$"oϸd⃥>_v>AFN~A&HFLOhpIY PW&У O7., ٲ;|e  ,(|w(㷕 ~ մ6岛6mcC  ŋ"Ogw^z`)PK(B ]SLhُn gyf quc|xw铦-Wfh9Ӌn?zzȅ<U6t5J{ʜ&'O;/?_SģNZƯƐ1D#Ey8rD9*{2hl8zi{᧖UqP$(M[QWc 'Ӆn@ȏ>ov7V9:V Ɇ12 QWB`"EkyщYeWާӝwZ\i+7M4+' 6 7J7tAcV3! abF$Lup!5ӭ4ՠn es=>zZ$g?./}<9YS8RGJRpVܩ-M/)=PXT<_1CWMr!lqy[KIE 1A fzY-3W‘W]d7ۑRVͿ h(Tb 69|yfʖ V&%a&'Jt^c N@JXJԎ0yof6>0S'_!à-c0_cFˮ ¶ 2.5 XjS%-X%ԑ0ꀣÝz]m?^8%g*@̶2)x+[V,$p59'>qdI@%˟x/Ⱥ)e9RJ)sRCbN+$ %\w7[:·mwhMNl'bIг܂:m֐kuF]i.w/_ߞo]e3 p ؂_.b,&kWLZSϯ_nlvӓ~K@LTKT]PRV }xuc&G%+v6FQIUVPqyV<<>~z';;0v..Vf&fv6VfV`A痏RQJEME&X@w2(9XW.wLrjɲ&(A[հxUe||RZ*)b< D.N`Q+,'ۤ ԳQxɗ<~}i]`b'lg54`g|}ƉOOE.FB XKl ɻuVGDTT`}yBXvRbgW1P燔vx4v  _vM{Dun` `C73\&vU+_R^;LJן_]>[DLk~5+RigvYJQˏ[̎ZN32;?߿???ٝ;?>|sbҒڞR?>~x!*h/|&xwoJDX̎[cƒ+_ X'*fZ+k”WCּs Ý _=l>$ٹ#WTOGOGp[`0W'=?Ǡw\"zi+'Z{7Μ r7/_ZAˋfeTxoW@Ps&on?MM(WT ֥y E 6!ßon7?ҿ?>zr[ Ƿ7?y򆘦<^\۽bꅅ Wuov>ZBݩ>SV'_]:2@W_?6Zd~|t󯰲S_:w5w~O_7;GL7H^츹kfamo>xtv!޳+O=`F`]7^\9xɉ-o8ee~¯oo iWԿ=4!MU3A~1?@KOa}`~H/7737?>o(2A_?{u'>7 `==Wpi}dϧ'v.Ⱦ2Y^<ӇXyy~~{'6~u+h ë >q^!eV w2{*wξ ?pf/+po?>+a%,-G!xs{ UziN:Lȉj?bFbFZ`X!C_5 lfUHv#H{ y*ϊa-Xc \|(:mJ[}pwwK\ӻ^7#`@jE f{&0HaOeR^b:"8r G#Rτ%P>-Z[XhWCC VAGL[X _DGY36ؘs`AX@z?6e_4B+LI=88hY X"=G1"978H3X˄ ۦ { nfh !l8t~C)yyޞoՙoo-Hu,k-Te5ʈfFK\{Hpehu?" GDÆGZK'h?D⡕B>,,7ug'H= `ı} /Q@60,lk1'!l"F?M!H \2nha?h"?͈+#Ă'?[BX?Z'$V} e@)ii@:TZVJ@, \͌o'zM[{@D}3<bhT``4Ӥ(IENDB` cREVGeneralscriptChecksumR0~dx N bookmarks revUniqueID 1110548807876 handlerList mouseDownscriptSelection char 57 to 56 prevHandler tempScriptscript

on mouseDown

revGoUrl "http://www.sosmartsoftware.com/"

end mouseDown

 NewScriptEpconstant kComma="######REVCOMMA#####", kTab=" ", kTag="#####REVLESSTHANCHARACTER#####" constant kTabs="Name,Num,ID,Script Lines,Marked", kLessThan="['less than' character]" constant kControlTabs="Type,Visible,Selectable,Layer,Control,ID,Script Lines" local lMainStackIcon, lSubStackIcon, lVideoClipIcon, lAudioClipIcon, lInIcon, lOutIcon local lCurrentStacks, lInitialised on preOpenStack global gREVStackName lock screen set the title of this stack to "Application Browser"--workaround engine bug if not lInitialised then set the textFont of fld "Cards" of grp "Cards" to empty set the textFont of fld "Controls" of cd "Cards and Controls" to empty set the textFont of fld "AudioClips" of cd "Audioclips" to empty set the textFont of fld "Videoclips" of cd "Videoclips" to empty set the textHeight of fld "Cards" of grp "Cards" to 18 set the textHeight of fld "Controls" of cd "Cards and Controls" to 18 set the textHeight of fld "AudioClips" of cd "Audioclips" to 18 set the textHeight of fld "Videoclips" of cd "Videoclips" to 18 set the hiliteColor of this stack to empty put the cMainStackIcon of this stack into lMainStackIcon put the cSubstackIcon of this stack into lSubstackIcon put the cVideoclipIcon of this stack into lVideoClipIcon put the cAudioclipIcon of this stack into lAudioClipIcon if the platform is "MacOS" then if char 1 of the systemVersion is 1 then put the cOSXInIcon of this stack into lInIcon put the cOSXOutIcon of this stack into lOutIcon else put the cClassicInIcon of this stack into lInIcon put the cClassicOutIcon of this stack into lOutIcon end if else put the cWindowsInIcon of this stack into lInIcon put the cWindowsOutIcon of this stack into lOutIcon end if put true into lInitialised end if set the cAppOverview of stack "revPreferences" to true revInitAppBrowser put empty into gREVStackName set the cCardID of this stack to empty put empty into fld "Card Info" unlock screen pass preOpenStack end preOpenStack on closeStackRequest revRetainStacks set the cAppOverview of stack "revPreferences" to false pass closeStackRequest end closeStackRequest on revRefreshTree global gREVObjectTree revRetainStacks put revSelLineID() into tLineID revGenerateTree lCurrentStacks revUpdateTree revTreeHtml(gREVObjectTree), tLineID if tLineID is not empty then put lineOffset(tLineID,gREVObjectTree) into tLineOffset if tLineOffset is not 0 then send "revSelectTree tLineOffset" to fld "Cards" of grp "Cards" else go cd "Blank" else go cd "Blank" end revRefreshTree on revInitAppBrowser global gREVObjectTree set the cursor to watch lock messages set the rect of this stack to the cAppBrowserRect of stack "revPreferences" unlock messages set the cCardTabs of grp "Card Tabs" of cd "Cards and Controls" to \ the cCardTabs of stack "revPreferences" set the cControlTabs of grp "Control Tabs" of cd "Cards and Controls" to \ the cControlTabs of stack "revPreferences" set the cAudioclipTabs of grp "Audioclip Tabs" of cd "Audioclips" to \ the cAudioclipTabs of stack "revPreferences" set the cVideoclipTabs of grp "Videoclip Tabs" of cd "Videoclips" to \ the cVideoclipTabs of stack "revPreferences" go cd "Blank" send "revResizeWidget" && the cAppBrowserWidgetLeft of stack "revPreferences" \ to btn "Resize" of cd "Blank" put revBrowserTopStack() into tTopStack if lCurrentStacks is empty then put tTopStack into tExpandedStacks else put lCurrentStacks & cr & tTopStack into tExpandedStacks revGenerateTree tExpandedStacks put the vScroll of fld "Cards" of grp "Cards" into tVScroll put the hScroll of fld "Cards" of grp "Cards" into tHScroll revSetTreeHtml revTreeHtml(gREVObjectTree) set the vScroll of fld "Cards" of grp "Cards" to tVScroll set the hScroll of fld "Cards" of grp "Cards" to tHScroll set the hScroll of grp "Card Tabs" to tHScroll end revInitAppBrowser on revGenerateTree pExpandedStacks global gREVObjectTree, gREVShowStacks put the mainStacks into tMainStacks if not gREVShowStacks then put revFilterStacksList(tMainStacks) into tMainStacks sort tMainStacks put empty into tStacks repeat for each line l in tMainStacks put l & cr after tStacks put the substacks of stack l into tSubstacks if tSubstacks is not empty then put tSubstacks & cr after tStacks end repeat put empty into gREVObjectTree repeat for each line l in tStacks put revStackLine(l) into tLine if l is among the lines of pExpandedStacks then put "expanded true" && lOutIcon into item 3 of tLine if the editBg of stack l then set the editBg of stack l to false--so all cards listed put cr & revCardList(the cardIDS of stack l,l) after tLine if the cShowAudioClips of stack "revPreferences" then put cr & revAudioClipLine(l) after tLine if the cShowVideoClips of stack "revPreferences" then put cr & revVideoClipLine(l) after tLine end if put tLine & cr after gREVObjectTree end repeat delete last char of gREVObjectTree end revGenerateTree function revStackLine pStack if the mainStack of stack pStack is pStack then put lMainStackIcon into tIcon put empty into tSpace else put lSubstackIcon into tIcon put space & space into tSpace end if put pStack into tName replace comma with kComma in tName try put the num of lines in the script of stack pStack into tScriptLines catch tError put "unknown" into tScriptLines end try put tName,"stack","expanded false" && lInIcon,tSpace,tIcon,tName \ & comma & comma & comma & tScriptLines & comma & comma & comma & comma & comma & tName into tLine return tLine end revStackLine function revAudioClipLine pStack replace comma with kComma in pStack return pStack,"audioclip","expanded false",space&space&space&space&space&space&space&space,\ lAudioClipIcon,"AudioClips" &comma&comma&comma&comma&comma&comma&comma&comma&pStack end revAudioClipLine function revVideoClipLine pStack replace comma with kComma in pStack return pStack,"videoclip","expanded false",space&space&space&space&space&space&space&space,\ lVideoClipIcon,"VideoClips" &comma&comma&comma&comma&comma&comma&comma&comma&pStack end revVideoClipLine on revUpdateTree pHtml, pSelLineID put the vScroll of fld "Cards" of grp "Cards" into tVScroll put the hScroll of fld "Cards" of grp "Cards" into tHScroll put 0,0,0,0,0,kTabs into tTabs revSetHtml the long id of fld "Cards" of grp "Cards", pHtml, tTabs, \ the long id of grp "Card Tabs", the cCardTabs of stack "revPreferences", \ the left of btn "Name" of grp "Card Tabs" set the cSelLine of fld "Cards" of grp "Cards" to empty revReselectLine pSelLineID set the vScroll of fld "Cards" of grp "Cards" to tVScroll set the hScroll of fld "Cards" of grp "Cards" to tHScroll end revUpdateTree on revSetTreeHtml pHtml put 0,0,0,0,0,kTabs into tTabs revSetHtml the long id of fld "Cards" of grp "Cards", pHtml, tTabs, \ the long id of grp "Card Tabs", the cCardTabs of stack "revPreferences", \ the left of btn "Name" of grp "Card Tabs" set the cSelLine of fld "Cards" of grp "Cards" to empty end revSetTreeHtml on revSetHtml pField, pHtml, pTabs, pTabGroup, pGroupTabs, pStartLeft if pHtml is empty then --enter appropriate num of tabs so that fld scrollable put the num of items in the tabStops of pField into tNumTabs put "

" into pHtml repeat tNumTabs put space & kTab after pHtml end repeat put "

" after pHtml end if --be sure 'formattedWidth' of column big enough put the last item of pGroupTabs into tLastItem put item tLastItem of pTabs into tName put the cMinWidth of btn tName of pTabGroup into tWidth put max(round(tWidth/2.6),16) into tCharMin put the last line of pHtml into tLastLine put 0 into tSkip if kTab is in pHtml then put kTab into tTabChar else put tab into tTabChar repeat put offset(tTabChar, tLastLine, tSkip) into tOffset if tOffset is 0 then exit repeat else add tOffset to tSkip end repeat put the num of chars in char tSkip to -1 of tLastLine into tNumChars if tNumChars <= tCharMin then put tCharMin - tNumChars into tRepeat put empty into tSpaces repeat tRepeat put space after tSpaces end repeat put tSpaces before char -4 of pHtml end if set the htmlText of pField to pHtml revSetVScrollbar pField, pTabGroup put pHtml into tHtml replace kTab with tab in tHtml set the itemDel to tab repeat for each line l in tHtml put 0 into tCount repeat for each item i in l add 1 to tCount put "

"&i&"

" & cr after tColumn[tCount] end repeat end repeat set the itemDel to comma put 0 into tCount put pStartLeft into tLeft put empty into tTabs repeat for each item i in pGroupTabs add 1 to tCount put item i of pTabs into tTab put tTab & cr after tTabs set the htmlText of fld "measure width" to tColumn[tCount] put max(the width of btn tTab of pTabGroup, \ (the formattedWidth of fld "measure width" + 2)) into tWidth put tLeft + tWidth into tRight set the rect of btn tTab of pTabGroup to tLeft, the top of btn tTab of pTabGroup, \ tRight, the bottom of btn tTab of pTabGroup set the right of btn (tTab && "Resize") of pTabGroup to tRight put tRight into tLeft end repeat delete last char of tTabs set the rect of btn tTab of pTabGroup to the topLeft of btn tTab of pTabGroup, \ revLastTabRight(pField), the bottom of btn tTab of pTabGroup delete last line of tTabs set the tabStops of pField to revTabStops(tTabs, pTabGroup) set the hScrollBar of pField to \ (the formattedWidth of pField > the width of pField) if not the hScrollBar of pField then set the hScroll of pTabGroup to 0 end revSetHtml on revSetVScrollbar pField, pTabGroup if the formattedHeight of pField > the height of pField then set the vScrollBar of pField to true set the rect of pTabGroup to the topLeft of pTabGroup, \ the right of pField - the scrollbarWidth of pField - 1, \ the bottom of pTabGroup else set the vScrollBar of pField to false set the rect of pTabGroup to the topLeft of pTabGroup, \ the right of pField, the bottom of pTabGroup end if end revSetVScrollbar on revResizeBrowser revSetVScrollbar the long id of fld "Cards" of grp "Cards", \ the long id of grp "Card Tabs" set the cAppBrowserRect of stack "revPreferences" to the rect of this stack end revResizeBrowser on resizeStack revUpdateGeometry revResizeBrowser end resizeStack on moveStack set the cAppBrowserRect of stack "revPreferences" to the rect of this stack end moveStack function revTreeHtml pSource put the cCardTabs of stack "revPreferences" into tCardTabs put the cTickIcon of this stack into tTickIcon put the cUnTickIcon of this stack into tUnTickIcon put empty into tHtml repeat for each line l in pSource put kTag & "p>" after tHtml put item 4 of l after tHtml#spacing if word 3 of item 3 of l is not empty then put kTag & "img src=""e&word 3 of item 3 of l"e&">" after tHtml#triangle icon put space & space & kTag & "img src=""e&item 5 of l"e&"> " after tHtml#object type icon repeat for each item i in tCardTabs put item i of l into tItem switch i case 6 put kTag & "a>"&tItem&kTag&"/a>" & kTab after tHtml#group name break case 10 switch tItem case true put kTag & "img src=""e&tTickIcon"e&">" & kTab after tHtml break case false put kTag & "img src=""e&tUnTickIcon"e&">" & kTab after tHtml break default put kTab after tHtml end switch break case 9 if tItem is "unknown" then put kTag & "img src=""e&the cPasswordIcon of this stack"e&">" & kTab after tHtml else put tItem & kTab after tHtml break default put tItem & kTab after tHtml break end switch end repeat delete char -4 to -1 of tHtml put kTag & "/p>" & cr after tHtml end repeat delete last char of tHtml replace "<" with kLessThan in tHtml--user friendly message, "<" breaks html replace kTag with "<" in tHtml replace tab with space&space in tHtml replace kComma with comma in tHtml return tHtml end revTreeHtml function revCardList pCardIDs, pStack put the cCardIcon of this stack into tCardIcon set the defaultStack to pStack replace comma with kComma in pStack put empty into tCards repeat for each line l in pCardIDs put the short name of cd id l into tName replace comma with kComma in tName try put the num of lines in the script of cd id l into tScriptLines catch tError put "unknown" into tScriptLines end try put pStack,"card","expanded false" & comma \ & space & space & space & space & space & space & space & space & space & space & comma \ & tCardIcon,tName,the num of cd id l,\ l,tScriptLines,the mark of cd id l,\ "#####REVID=", l, "=#####REVID",pStack & cr after tCards end repeat delete last char of tCards set the defaultStack to "revApplicationOverview" put the cHilitedButton["cards"] of stack "revPreferences" into tTabNum if tTabNum is among the items of "7,8,9" then sort lines of tCards numeric by item tTabNum of each else sort lines of tCards text by item tTabNum of each return tCards end revCardList on revRefreshControls pSaveScroll global gREVStackName, gREVControls lock screen if the short name of this cd is not "Cards and Controls" then exit revRefreshControls if gREVStackName is empty then put empty into gREVControls put empty into fld "Controls" put empty into fld "Control Info" else if the num of controls in cd id (the cCardID of this stack) of stack gREVStackName > 49 then set the cursor to watch put revControlList(the long id of cd id (the cCardID of this stack)\ of stack gREVStackName) into gREVControls revUpdateControlsField pSaveScroll end if unlock screen end revRefreshControls on revUpdateControlsField pSaveScroll global gREVControls put the hScroll of fld "Controls" into tHScroll put the vScroll of fld "Controls" into tVScroll put revControlsHtml(gREVControls) into tHtml revSetHtml the long id of fld "Controls" of cd "Cards and Controls", tHtml, \ kControlTabs, the long id of grp "Control Tabs", the cControlTabs of stack "revPreferences", \ the left of btn "Type" of grp "Control Tabs" revUpdatePalette set the hScroll of fld "Controls" to tHScroll if pSaveScroll then set the vScroll of fld "Controls" to tVScroll end revUpdateControlsField function revCardOffset pLongID global gREVObjectTree if word 1 of pLongID is not "card" then return 0 put the short name of the owner of pLongID into tStack replace comma with kComma in tStack put "#####REVID=",word 3 of pLongID,"=#####REVID",tStack into tCardLine return lineOffset(tCardLine,gREVObjectTree) end revCardOffset function revStackOffset pStack global gREVObjectTree replace comma with kComma in pStack put pStack,"stack,expanded" into tStackLine return lineOffset(tStackLine,gREVObjectTree) end revStackOffset local lControlCache function revControlList pCard put revTargetStack(pCard) into tStack put the num of controls in pCard into tNumControls -- its done already, save performance -- if the number of lines in lControlCache[pCard] is tNumControls -- then return lControlCache[pCard] put the hcAddressing of stack tStack into tHCAddressing set the hcAddressing of stack tStack to false put empty into tControls repeat with i = 1 to tNumControls put the short name of control i of pCard into tName replace comma with kComma in tName try put the num of lines in the script of control i of pCard into tScriptLines catch tError put "unknown" into tScriptLines end try put word 2 to -1 of the long id of control i of pCard into tGroupExp put tName into tIndentedName put 0 into tGroupNestCount repeat for each word w in tGroupExp if w is "group" then put space&&space before tIndentedName end repeat put word 1 of the name of control i of pCard, the visible of control i of pCard, \ not the cantSelect of control i of pCard, the layer of control i of pCard, \ tName, the id of control i of pCard, tScriptLines, \ "#####REVID=", the id of control i of pCard, \ "=#####REVID", tIndentedName & cr after tControls end repeat delete last char of tControls set the hcAddressing of stack tStack to tHCAddressing put the cHilitedButton["controls"] of stack "revPreferences" into tTabNum if tTabNum is 7 or (item tTabNum of tControls is a number and tTabNum is not 5) then sort lines of tControls numeric by item tTabNum of each else sort lines of tControls text by item tTabNum of each -- put tControls into lControlCache[pCard] return tControls end revControlList function revControlsHtml pControls --generate html with embedded icons for speed put empty into tControlsHtml put the cControlTabs of stack "revPreferences" into tControlTabs if item 1 of tControlTabs is 1 then delete item 1 of tControlTabs put the cTickIcon of this stack into tTickIcon put the cUnTickIcon of this stack into tUnTickIcon put itemOffset("Layer", kControlTabs) into tLayerOffset put itemOffset("Control", kControlTabs) into tControlOffset put itemOffset("Visible", kControlTabs) into tVisibleOffset put itemOffset("Selectable", kControlTabs) into tSelectableOffset put itemOffset("Script Lines", kControlTabs) into tScriptLinesOffset repeat for each line l in pControls put "c"&item 1 of l&"Icon" into tIconProp put the tIconProp of this stack into tIcon put kTag & "p>" & kTag & "img src=""e&tIcon"e&">" after tControlsHtml repeat for each item i in tControlTabs put item i of l into tItem switch i case tControlOffset --indent grouped controls if sorted by layer if the cHilitedButton["controls"] of stack "revPreferences" is tLayerOffset then put kTab & item 11 of l after tControlsHtml else put kTab & tItem after tControlsHtml break case tVisibleOffset case tSelectableOffset if tItem then put kTab & kTag & "img src=""e&tTickIcon"e&">" after tControlsHtml else put kTab & kTag & "img src=""e&tUnTickIcon"e&">" after tControlsHtml break case tScriptLinesOffset if tItem is "unknown" then put kTab & kTag & "img src=""e&the cPasswordIcon of this stack "e&">" after tControlsHtml else put kTab & tItem after tControlsHtml break default put kTab & tItem after tControlsHtml break end switch end repeat put kTag & "/p>" & cr after tControlsHtml end repeat delete last char of tControlsHtml replace tab with space&space in tControlsHtml replace kComma with comma in tControlsHtml replace "<" with kLessThan in tControlsHtml--user friendly message, "<" breaks html replace kTag with "<" in tControlsHtml return tControlsHtml end revControlsHtml function revControlLine pID global gREVControls put "#####REVID=", pID, "=#####REVID" into tLine return lineOffset(tLine,gREVControls) end revControlLine function revInIcon return lInIcon end revInIcon function revOutIcon return lOutIcon end revOutIcon function revTabStops pTabs, pGroup put the left of pGroup into tLeft put empty into tTabStops repeat for each line l in pTabs put the right of btn l of pGroup - tLeft - 2 + \ the hScroll of pGroup & comma after tTabStops end repeat delete last char of tTabStops return tTabStops end revTabStops function revColWidth pHtml, pColumnNo replace kTab with tab in pHtml set the itemDel to tab repeat for each line l in pHtml put "

"&item pColumnNo of l &"

" & cr after tColumn end repeat set the htmlText of fld "measure width" to tColumn return the formattedWidth of fld "measure width" + 2 end revColWidth on revMainStackChanged pStack global gREVObjectTree put the short name of pStack into tName put tName,"stack,expanded" into tStackMatch put lineOffset(tStackMatch,gREVObjectTree) into tStartLine if tStartLine is 0 then exit revMainStackChanged put lineOffset((comma&"stack,expanded"),gREVObjectTree,tStartLine) + tStartLine - 1 into tEndLine if tEndLine < tStartLine then put the num of lines in gREVObjectTree into tEndLine put the mainStack of stack tName into tMain put line tStartLine to tEndLine of gREVObjectTree into tStackLines delete line tStartLine to tEndLine of gREVObjectTree if tMain is tName then put lMainStackIcon into item 5 of line 1 of tStackLines put empty into item 4 of line 1 of tStackLines put cr & tStackLines after gREVObjectTree else put lSubstackIcon into item 5 of line 1 of tStackLines put space & space into item 4 of line 1 of tStackLines put tMain,"stack,expanded" into tStackMatch put lineOffset(tStackMatch,gREVObjectTree) into tMainLine if tMainLine is 0 then exit revMainStackChanged put line (tMainLine + 1) to -1 of gREVObjectTree into tListBelow put (tMainLine + 1) into tCount put false into tFoundEnd repeat for each line l in tListBelow add 1 to tCount if item 5 of l is lMainStackIcon then put true into tFoundEnd exit repeat end if end repeat if tFoundEnd then subtract 1 from tCount put tStackLines & cr before line tCount of gREVObjectTree else put cr & tStackLines after gREVObjectTree end if end if lock screen put revSelLineID() into tLineID revUpdateTree revTreeHtml(gREVObjectTree), tLineID unlock screen end revMainStackChanged on revNameChanged pObject, pOldName, pNewName global gREVStackName, gREVObjectTree, gREVControls put the id of pObject into tID put word 1 of pObject into tType replace comma with kComma in pNewName put revSelLineID() into tLineID switch tType case "stack" replace comma with kComma in pOldName put pOldName,"stack,expanded" into tStackMatch put lineOffset(tStackMatch,gREVObjectTree) into tStartLine if tStartLine is 0 then exit revNameChanged put pNewName into item 6 of line tStartLine of gREVObjectTree put the num of lines in gREVObjectTree into tNumLines repeat with i = tStartLine to tNumLines if item 1 of line i of gREVObjectTree is not pOldName then exit repeat put pNewName into item 1 of line i of gREVObjectTree put pNewName into item 14 of line i of gREVObjectTree end repeat lock screen revUpdateTree revTreeHtml(gREVObjectTree), tLineID unlock screen break case "card" put the short name of the owner of pObject into tStack replace comma with kComma in tStack put ",#####REVID=",tID,"=#####REVID",tStack into tMatch put lineOffset(tMatch,gREVObjectTree) into tOffset if tOffset is 0 then exit revNameChanged put pNewName into item 6 of line tOffset of gREVObjectTree put revTreeHtml(line tOffset of gREVObjectTree) into tNewHtml put the htmlText of fld "Cards" into tHtml put tNewHtml into line tOffset of tHtml lock screen revUpdateTree tHtml, tLineID unlock screen break default if revTargetStack(pObject) is gREVStackName \ and the short name of this cd is "Cards and Controls" then put revControlLine(tID) into tLine if tLine is not 0 then put pNewName into item 3 of line tLine of gREVControls put pNewName into word 1 to -1 of item 11 of line tLine of gREVControls lock screen revUpdateControlsField true unlock screen end if end if break end switch end revNameChanged on revNewStack pStack global gREVObjectTree, gREVShowStacks if not lInitialised then exit revNewStack if not gREVShowStacks then put revFilterStacksList(pStack) into pStack if pStack is empty then exit revNewStack put pStack into tStack2 replace comma with kComma in tStack2 put tStack2,"stack,expanded" into tStackMatch if tStackMatch is in gREVObjectTree then exit revNewStack put the htmlText of fld "Cards" into tHtml put revStackLine(pStack) into tStacksHtml repeat for each line l in the substacks of stack pStack put cr & revStackLine(l) after tStacksHtml end repeat if gREVObjectTree is empty then put tStacksHtml into gREVObjectTree put revTreeHtml(gREVObjectTree) into tHtml else put cr & tStacksHtml after gREVObjectTree put cr & revTreeHtml(tStacksHtml) after tHtml end if lock screen put revSelLineID() into tLineID revUpdateTree tHtml, tLineID unlock screen end revNewStack on revAODeleteStack pStack, pStacks global gREVObjectTree, gREVStackName put pStack into tStack replace comma with kComma in tStack put tStack,"stack,expanded" into tStackMatch put lineOffset(tStackMatch,gREVObjectTree) into tStartLine if tStartLine is 0 then exit revAODeleteStack put false into tNotEnd put the num of lines in gREVObjectTree into tNumLines replace comma with kComma in pStacks repeat with i = tStartLine to tNumLines put item 1 of line i of gREVObjectTree into tLineStack if tLineStack is not among the lines of pStacks then put true into tNotEnd exit repeat end if end repeat if tNotEnd then delete line tStartLine to (i-1) of gREVObjectTree else delete line tStartLine to tNumLines of gREVObjectTree lock screen put revSelLineID() into tLineID revUpdateTree revTreeHtml(gREVObjectTree), tLineID if pStack is gREVStackName then go cd "blank" unlock screen end revAODeleteStack on revUpdateCards pStack global gREVObjectTree, gREVShowStacks if not gREVShowStacks then put revFilterStacksList(pStack) into pStack if pStack is empty then exit revUpdateCards put pStack,"stack,expanded true" into tStackMatch put lineOffset(tStackMatch,gREVObjectTree) into tLine if tLine is 0 then exit revUpdateCards switch case the cShowAudioClips of stack "revPreferences" put ",audioclip,expanded false," into tMatch break case the cShowVideoClips of stack "revPreferences" put ",videoclip,expanded false," into tMatch break default put ",stack,expanded" into tMatch break end switch put revSelLineID() into tLineID put lineOffset(tMatch,gREVObjectTree,tLine) into tMatchLine if tMatchLine = 0 then put the num of lines in gREVObjectTree into tEndCardLine else put tMatchLine + tLine - 1 into tEndCardLine put revCardList(the cardIDs of stack pStack,pStack) into tCardList put the htmlText of fld "Cards" into tHtml put tCardList into line (tLine + 1) to tEndCardLine of gREVObjectTree put revTreeHtml(tCardList) into line (tLine + 1) to tEndCardLine of tHtml lock screen revUpdateTree tHtml, tLineID if lineOffset(tLineID,gREVObjectTree) = 0 then go cd "Blank" unlock screen end revUpdateCards on revUpdatePalette global gREVStackName, gREVControls if the short name of this cd is not "Cards and Controls" then exit revUpdatePalette lock screen put revTargetStack(line 1 of (the selobj)) into tTargetStack put the hcAddressing of stack tTargetStack into tHCAddressing set the hcAddressing of stack tTargetStack to false put the selobj into tSelobj switch case tSelobj is empty case word 1 of tSelobj is among the items of "stack,audioClip,videoClip,the" case gREVStackName is not tTargetStack case word 1 of tSelobj is "card" revHiliteControlLine put (the num of lines in gREVControls) && "Controls" into fld "Control Info" break default put empty into tHilitedLines repeat for each line l in tSelobj put revControlLine(word 3 of l) & comma after tHilitedLines end repeat delete last char of tHilitedLines revHiliteControlLine tHilitedLines put (the num of lines in gREVControls) && "Controls (" \ & (the num of items in the hilitedLines of fld "Controls")\ && "selected)" into fld "Control Info" break end switch set the hcAddressing of stack tTargetStack to tHCAddressing unlock screen end revUpdatePalette on revHiliteControlLine pLines put the cPrevHilitedLines of fld "Controls" into tPrevHilitedLines if tPrevHilitedLines is not 0 then repeat for each item i in tPrevHilitedLines set the textColor of line i of fld "Controls" to empty end repeat end if set the hilitedLines of fld "Controls" to pLines set the cPrevHilitedLines of fld "Controls" to pLines if the cSuspended of this stack then repeat for each item i in pLines set the textColor of line i of fld "Controls" to black end repeat end if end revHiliteControlLine function revCardOpen global gREVStackName if the mode of stack gREVStackName is not 0 \ and the cCardID of this stack is the id of this cd of stack gREVStackName then return true else return false end revCardOpen on revRetainStacks global gREVObjectTree put comma & "stack,expanded true" into tStackMatch put 0 into tSkip put empty into lCurrentStacks repeat put lineOffset(tStackMatch,gREVObjectTree,tSkip) into tLineOffset if tLineOffset = 0 then exit repeat add tLineOffset to tSkip put item 1 of line tSkip of gREVObjectTree & cr after lCurrentStacks end repeat delete last char of lCurrentStacks replace kComma with comma in lCurrentStacks end revRetainStacks function revSelLineID global gREVObjectTree #returns unique string for selected line in tree view, if there is one put the cSelLine of fld "Cards" of grp "Cards" into tSelLine if tSelLine is not empty then return item 4 to 14 of line tSelLine of gREVObjectTree else return empty end revSelLineID on revReselectLine pLineID global gREVObjectTree #reselects line in tree view using ID from revSelLineID() if pLineID is not empty then put lineOffset(pLineID,gREVObjectTree) into tLineOffset if tLineOffset is not 0 then revSelectLine tLineOffset end if end revReselectLine on revSelectLine pLine put the cSelLine of fld "Cards" of grp "Cards" into tLine set the itemDel to tab if tLine is not empty then set the backColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to empty set the textColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to empty end if set the backColor of word 1 to -1 of item 1 of line pLine \ of fld "Cards" of grp "Cards" to the hiliteColor if the platform is not "MacOS" then set the textColor of word 1 to -1 of item 1 of line pLine \ of fld "Cards" of grp "Cards" to white set the cSelLine of fld "Cards" of grp "Cards" to pLine end revSelectLine function revLastTabRight pField if the vScrollbar of pField then put the right of pField \ - the scrollbarWidth of pField into tRight else put the right of pField into tRight return max(tRight, the left of pField \ + the formattedWidth of pField \ - the hScroll of pField) end revLastTabRight function revShortCutAction pObjectType switch case the commandKey is down return the cABCommandDoubleClick[pObjectType] of stack "revPreferences" break case the optionKey is down return the cABOptionDoubleClick[pObjectType] of stack "revPreferences" break default return the cABDoubleClick[pObjectType] of stack "revPreferences" break end switch end revShortCutAction on revSetBlankLeft set the left of fld "select a card" of cd "blank" to the right of btn "Resize" of cd "blank" end revSetBlankLeft on suspendStack if the platform is not "Win32" then exit suspendStack set the cSuspended of this stack to true put the cSelLine of fld "Cards" of grp "Cards" into tLine lock screen if tLine is not empty then set the itemDel to tab set the backColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to 236,233,216 set the textColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to empty set the itemDel to comma end if set the hiliteColor of this stack to 236,233,216 put empty into tField switch the short name of this cd case "Cards and Controls" put "Controls" into tField break case "Audioclips" case "Videoclips" put the short name of this cd into tField break end switch if tField is not empty then repeat for each item i in the hilitedLines of fld tField set the textColor of line i of fld tField to black end repeat end if unlock screen end suspendStack on resumeStack if the platform is not "Win32" then exit resumeStack set the cSuspended of this stack to false put the cSelLine of fld "Cards" of grp "Cards" into tLine lock screen if tLine is not empty then set the itemDel to tab set the backColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to the hiliteColor set the textColor of word 1 to -1 of item 1 of line tLine \ of fld "Cards" of grp "Cards" to white set the itemDel to comma end if set the hiliteColor of this stack to empty put empty into tField switch the short name of this cd case "Cards and Controls" put "Controls" into tField break case "Audioclips" case "Videoclips" put the short name of this cd into tField break end switch if tField is not empty then repeat for each item i in the hilitedLines of fld tField set the textColor of line i of fld tField to empty end repeat end if unlock screen end resumeStack dR cREVGeneralscriptChecksumKi n revUniqueID 1119423709526 bookmarks handlerListpreOpenStack closeStackRequest revRefreshTree revInitAppBrowser revGenerateTree revStackLine revAudioClipLine revVideoClipLine revUpdateTree revSetTreeHtml revSetHtml revSetVScrollbar revResizeBrowser resizeStack moveStack revTreeHtml revCardList revRefreshControls revUpdateControlsField revCardOffset revStackOffset revControlList revControlsHtml revControlLine revInIcon revOutIcon revTabStops revColWidth revMainStackChanged revNameChanged revNewStack revAODeleteStack revUpdateCards revUpdatePalette revHiliteControlLine revCardOpen revRetainStacks revSelLineID revReselectLine revSelectLine revLastTabRight revShortCutAction revSetBlankLeft suspendStack resumeStack tempScript prevHandler closeStackscriptSelection char 1 to 0script

constant kComma="######REVCOMMA#####", kTab="&#9;", kTag="#####REVLESSTHANCHARACTER#####"

constant kTabs="Name,Num,ID,Script Lines,Marked", kLessThan="['less than' character]"

constant kControlTabs="Type,Visible,Selectable,Layer,Control,ID,Script Lines"

local lMainStackIcon, lSubStackIcon, lVideoClipIcon, lAudioClipIcon, lInIcon, lOutIcon

local lCurrentStacks, lInitialised

on preOpenStack

global gREVStackName

lock screen

set the title of this stack to "Application Browser"--workaround engine bug

if not lInitialised then

set the textFont of fld "Cards" of grp "Cards" to empty

set the textFont of fld "Controls" of cd "Cards and Controls" to empty

set the textFont of fld "AudioClips" of cd "Audioclips" to empty

set the textFont of fld "Videoclips" of cd "Videoclips" to empty

set the textHeight of fld "Cards" of grp "Cards" to 18

set the textHeight of fld "Controls" of cd "Cards and Controls" to 18

set the textHeight of fld "AudioClips" of cd "Audioclips" to 18

set the textHeight of fld "Videoclips" of cd "Videoclips" to 18

set the hiliteColor of this stack to empty

put the cMainStackIcon of this stack into lMainStackIcon

put the cSubstackIcon of this stack into lSubstackIcon

put the cVideoclipIcon of this stack into lVideoClipIcon

put the cAudioclipIcon of this stack into lAudioClipIcon

if the platform is "MacOS" then

if char 1 of the systemVersion is 1 then

put the cOSXInIcon of this stack into lInIcon

put the cOSXOutIcon of this stack into lOutIcon

else

put the cClassicInIcon of this stack into lInIcon

put the cClassicOutIcon of this stack into lOutIcon

end if

else

put the cWindowsInIcon of this stack into lInIcon

put the cWindowsOutIcon of this stack into lOutIcon

end if

put true into lInitialised

end if

set the cAppOverview of stack "revPreferences" to true

revInitAppBrowser

put empty into gREVStackName

set the cCardID of this stack to empty

put empty into fld "Card Info"

unlock screen

pass preOpenStack

end preOpenStack

on closeStackRequest

revRetainStacks

set the cAppOverview of stack "revPreferences" to false

pass closeStackRequest

end closeStackRequest

on revRefreshTree

global gREVObjectTree

revRetainStacks

put revSelLineID() into tLineID

revGenerateTree lCurrentStacks

revUpdateTree revTreeHtml(gREVObjectTree), tLineID

if tLineID is not empty then

put lineOffset(tLineID,gREVObjectTree) into tLineOffset

if tLineOffset is not 0

then send "revSelectTree tLineOffset" to fld "Cards" of grp "Cards"

else go cd "Blank"

else go cd "Blank"

end revRefreshTree

on revInitAppBrowser

global gREVObjectTree

set the cursor to watch

lock messages

set the rect of this stack to the cAppBrowserRect of stack "revPreferences"

unlock messages

set the cCardTabs of grp "Card Tabs" of cd "Cards and Controls" to \

the cCardTabs of stack "revPreferences"

set the cControlTabs of grp "Control Tabs" of cd "Cards and Controls" to \

the cControlTabs of stack "revPreferences"

set the cAudioclipTabs of grp "Audioclip Tabs" of cd "Audioclips" to \

the cAudioclipTabs of stack "revPreferences"

set the cVideoclipTabs of grp "Videoclip Tabs" of cd "Videoclips" to \

the cVideoclipTabs of stack "revPreferences"

go cd "Blank"

send "revResizeWidget" && the cAppBrowserWidgetLeft of stack "revPreferences" \

to btn "Resize" of cd "Blank"

put revBrowserTopStack() into tTopStack

if lCurrentStacks is empty then put tTopStack into tExpandedStacks

else put lCurrentStacks & cr & tTopStack into tExpandedStacks

revGenerateTree tExpandedStacks

put the vScroll of fld "Cards" of grp "Cards" into tVScroll

put the hScroll of fld "Cards" of grp "Cards" into tHScroll

revSetTreeHtml revTreeHtml(gREVObjectTree)

set the vScroll of fld "Cards" of grp "Cards" to tVScroll

set the hScroll of fld "Cards" of grp "Cards" to tHScroll

set the hScroll of grp "Card Tabs" to tHScroll

end revInitAppBrowser

on revGenerateTree pExpandedStacks

global gREVObjectTree, gREVShowStacks

put the mainStacks into tMainStacks

if not gREVShowStacks then put revFilterStacksList(tMainStacks) into tMainStacks

sort tMainStacks

put empty into tStacks

repeat for each line l in tMainStacks

put l & cr after tStacks

put the substacks of stack l into tSubstacks

if tSubstacks is not empty then put tSubstacks & cr after tStacks

end repeat

put empty into gREVObjectTree

repeat for each line l in tStacks

put revStackLine(l) into tLine

if l is among the lines of pExpandedStacks then

put "expanded true" && lOutIcon into item 3 of tLine

if the editBg of stack l then set the editBg of stack l to false--so all cards listed

put cr & revCardList(the cardIDS of stack l,l) after tLine

if the cShowAudioClips of stack "revPreferences"

then put cr & revAudioClipLine(l) after tLine

if the cShowVideoClips of stack "revPreferences"

then put cr & revVideoClipLine(l) after tLine

end if

put tLine & cr after gREVObjectTree

end repeat

delete last char of gREVObjectTree

end revGenerateTree

function revStackLine pStack

if the mainStack of stack pStack is pStack then

put lMainStackIcon into tIcon

put empty into tSpace

else

put lSubstackIcon into tIcon

put space & space into tSpace

end if

put pStack into tName

replace comma with kComma in tName

try

put the num of lines in the script of stack pStack into tScriptLines

catch tError

put "unknown" into tScriptLines

end try

put tName,"stack","expanded false" && lInIcon,tSpace,tIcon,tName \

& comma & comma & comma & tScriptLines & comma & comma & comma & comma & comma & tName into tLine

return tLine

end revStackLine

function revAudioClipLine pStack

replace comma with kComma in pStack

return pStack,"audioclip","expanded false",space&space&space&space&space&space&space&space,\

lAudioClipIcon,"AudioClips" &comma&comma&comma&comma&comma&comma&comma&comma&pStack

end revAudioClipLine

function revVideoClipLine pStack

replace comma with kComma in pStack

return pStack,"videoclip","expanded false",space&space&space&space&space&space&space&space,\

lVideoClipIcon,"VideoClips" &comma&comma&comma&comma&comma&comma&comma&comma&pStack

end revVideoClipLine

on revUpdateTree pHtml, pSelLineID

put the vScroll of fld "Cards" of grp "Cards" into tVScroll

put the hScroll of fld "Cards" of grp "Cards" into tHScroll

put 0,0,0,0,0,kTabs into tTabs

revSetHtml the long id of fld "Cards" of grp "Cards", pHtml, tTabs, \

the long id of grp "Card Tabs", the cCardTabs of stack "revPreferences", \

the left of btn "Name" of grp "Card Tabs"

set the cSelLine of fld "Cards" of grp "Cards" to empty

revReselectLine pSelLineID

set the vScroll of fld "Cards" of grp "Cards" to tVScroll

set the hScroll of fld "Cards" of grp "Cards" to tHScroll

end revUpdateTree

on revSetTreeHtml pHtml

put 0,0,0,0,0,kTabs into tTabs

revSetHtml the long id of fld "Cards" of grp "Cards", pHtml, tTabs, \

the long id of grp "Card Tabs", the cCardTabs of stack "revPreferences", \

the left of btn "Name" of grp "Card Tabs"

set the cSelLine of fld "Cards" of grp "Cards" to empty

end revSetTreeHtml

on revSetHtml pField, pHtml, pTabs, pTabGroup, pGroupTabs, pStartLeft

if pHtml is empty then

--enter appropriate num of tabs so that fld scrollable

put the num of items in the tabStops of pField into tNumTabs

put "<p>" into pHtml

repeat tNumTabs

put space & kTab after pHtml

end repeat

put "</p>" after pHtml

end if

--be sure 'formattedWidth' of column big enough

put the last item of pGroupTabs into tLastItem

put item tLastItem of pTabs into tName

put the cMinWidth of btn tName of pTabGroup into tWidth

put max(round(tWidth/2.6),16) into tCharMin

put the last line of pHtml into tLastLine

put 0 into tSkip

if kTab is in pHtml then put kTab into tTabChar

else put tab into tTabChar

repeat

put offset(tTabChar, tLastLine, tSkip) into tOffset

if tOffset is 0 then exit repeat

else add tOffset to tSkip

end repeat

put the num of chars in char tSkip to -1 of tLastLine into tNumChars

if tNumChars <= tCharMin then

put tCharMin - tNumChars into tRepeat

put empty into tSpaces

repeat tRepeat

put space after tSpaces

end repeat

put tSpaces before char -4 of pHtml

end if

set the htmlText of pField to pHtml

revSetVScrollbar pField, pTabGroup

put pHtml into tHtml

replace kTab with tab in tHtml

set the itemDel to tab

repeat for each line l in tHtml

put 0 into tCount

repeat for each item i in l

add 1 to tCount

put "<p>"&i&"</p>" & cr after tColumn[tCount]

end repeat

end repeat

set the itemDel to comma

put 0 into tCount

put pStartLeft into tLeft

put empty into tTabs

repeat for each item i in pGroupTabs

add 1 to tCount

put item i of pTabs into tTab

put tTab & cr after tTabs

set the htmlText of fld "measure width" to tColumn[tCount]

put max(the width of btn tTab of pTabGroup, \

(the formattedWidth of fld "measure width" + 2)) into tWidth

put tLeft + tWidth into tRight

set the rect of btn tTab of pTabGroup to tLeft, the top of btn tTab of pTabGroup, \

tRight, the bottom of btn tTab of pTabGroup

set the right of btn (tTab && "Resize") of pTabGroup to tRight

put tRight into tLeft

end repeat

delete last char of tTabs

set the rect of btn tTab of pTabGroup to the topLeft of btn tTab of pTabGroup, \

revLastTabRight(pField), the bottom of btn tTab of pTabGroup

delete last line of tTabs

set the tabStops of pField to revTabStops(tTabs, pTabGroup)

set the hScrollBar of pField to \

(the formattedWidth of pField > the width of pField)

if not the hScrollBar of pField then set the hScroll of pTabGroup to 0

end revSetHtml

on revSetVScrollbar pField, pTabGroup

if the formattedHeight of pField > the height of pField then

set the vScrollBar of pField to true

set the rect of pTabGroup to the topLeft of pTabGroup, \

the right of pField - the scrollbarWidth of pField - 1, \

the bottom of pTabGroup

else

set the vScrollBar of pField to false

set the rect of pTabGroup to the topLeft of pTabGroup, \

the right of pField, the bottom of pTabGroup

end if

end revSetVScrollbar

on revResizeBrowser

revSetVScrollbar the long id of fld "Cards" of grp "Cards", \

the long id of grp "Card Tabs"

set the cAppBrowserRect of stack "revPreferences" to the rect of this stack

end revResizeBrowser

on resizeStack

revUpdateGeometry

revResizeBrowser

end resizeStack

on moveStack

set the cAppBrowserRect of stack "revPreferences" to the rect of this stack

end moveStack

function revTreeHtml pSource

put the cCardTabs of stack "revPreferences" into tCardTabs

put the cTickIcon of this stack into tTickIcon

put the cUnTickIcon of this stack into tUnTickIcon

put empty into tHtml

repeat for each line l in pSource

put kTag & "p>" after tHtml

put item 4 of l after tHtml#spacing

if word 3 of item 3 of l is not empty

then put kTag & "img src="&quote&word 3 of item 3 of l&quote&">" after tHtml#triangle icon

put space & space & kTag & "img src="&quote&item 5 of l&quote&"> " after tHtml#object type icon

repeat for each item i in tCardTabs

put item i of l into tItem

switch i

case 6

put kTag & "a>"&tItem&kTag&"/a>" & kTab after tHtml#group name

break

case 10

switch tItem

case true

put kTag & "img src="&quote&tTickIcon&quote&">" & kTab after tHtml

break

case false

put kTag & "img src="&quote&tUnTickIcon&quote&">" & kTab after tHtml

break

default

put kTab after tHtml

end switch

break

case 9

if tItem is "unknown"

then put kTag & "img src="&quote&the cPasswordIcon of this stack&quote&">" & kTab after tHtml

else put tItem & kTab after tHtml

break

default

put tItem & kTab after tHtml

break

end switch

end repeat

delete char -4 to -1 of tHtml

put kTag & "/p>" & cr after tHtml

end repeat

delete last char of tHtml

replace "<" with kLessThan in tHtml--user friendly message, "<" breaks html

replace kTag with "<" in tHtml

replace tab with space&space in tHtml

replace kComma with comma in tHtml

return tHtml

end revTreeHtml

function revCardList pCardIDs, pStack

put the cCardIcon of this stack into tCardIcon

set the defaultStack to pStack

replace comma with kComma in pStack

put empty into tCards

repeat for each line l in pCardIDs

put the short name of cd id l into tName

replace comma with kComma in tName

try

put the num of lines in the script of cd id l into tScriptLines

catch tError

put "unknown" into tScriptLines

end try

put pStack,"card","expanded false" & comma \

& space & space & space & space & space & space & space & space & space & space & comma \

& tCardIcon,tName,the num of cd id l,\

l,tScriptLines,the mark of cd id l,\

"#####REVID=", l, "=#####REVID",pStack & cr after tCards

end repeat

delete last char of tCards

set the defaultStack to "revApplicationOverview"

put the cHilitedButton["cards"] of stack "revPreferences" into tTabNum

if tTabNum is among the items of "7,8,9"

then sort lines of tCards numeric by item tTabNum of each

else sort lines of tCards text by item tTabNum of each

return tCards

end revCardList

on revRefreshControls pSaveScroll

global gREVStackName, gREVControls

lock screen

if the short name of this cd is not "Cards and Controls" then exit revRefreshControls

if gREVStackName is empty then

put empty into gREVControls

put empty into fld "Controls"

put empty into fld "Control Info"

else

if the num of controls in cd id (the cCardID of this stack) of stack gREVStackName > 49

then set the cursor to watch

put revControlList(the long id of cd id (the cCardID of this stack)\

of stack gREVStackName) into gREVControls

revUpdateControlsField pSaveScroll

end if

unlock screen

end revRefreshControls

on revUpdateControlsField pSaveScroll

global gREVControls

put the hScroll of fld "Controls" into tHScroll

put the vScroll of fld "Controls" into tVScroll

put revControlsHtml(gREVControls) into tHtml

revSetHtml the long id of fld "Controls" of cd "Cards and Controls", tHtml, \

kControlTabs, the long id of grp "Control Tabs", the cControlTabs of stack "revPreferences", \

the left of btn "Type" of grp "Control Tabs"

revUpdatePalette

set the hScroll of fld "Controls" to tHScroll

if pSaveScroll then set the vScroll of fld "Controls" to tVScroll

end revUpdateControlsField

function revCardOffset pLongID

global gREVObjectTree

if word 1 of pLongID is not "card" then return 0

put the short name of the owner of pLongID into tStack

replace comma with kComma in tStack

put "#####REVID=",word 3 of pLongID,"=#####REVID",tStack into tCardLine

return lineOffset(tCardLine,gREVObjectTree)

end revCardOffset

function revStackOffset pStack

global gREVObjectTree

replace comma with kComma in pStack

put pStack,"stack,expanded" into tStackLine

return lineOffset(tStackLine,gREVObjectTree)

end revStackOffset

local lControlCache

function revControlList pCard

put revTargetStack(pCard) into tStack

put the num of controls in pCard into tNumControls

-- its done already, save performance

-- if the number of lines in lControlCache[pCard] is tNumControls

-- then return lControlCache[pCard]

put the hcAddressing of stack tStack into tHCAddressing

set the hcAddressing of stack tStack to false

put empty into tControls

repeat with i = 1 to tNumControls

put the short name of control i of pCard into tName

replace comma with kComma in tName

try

put the num of lines in the script of control i of pCard into tScriptLines

catch tError

put "unknown" into tScriptLines

end try

put word 2 to -1 of the long id of control i of pCard into tGroupExp

put tName into tIndentedName

put 0 into tGroupNestCount

repeat for each word w in tGroupExp

if w is "group" then put space&&space before tIndentedName

end repeat

put word 1 of the name of control i of pCard, the visible of control i of pCard, \

not the cantSelect of control i of pCard, the layer of control i of pCard, \

tName, the id of control i of pCard, tScriptLines, \

"#####REVID=", the id of control i of pCard, \

"=#####REVID", tIndentedName & cr after tControls

end repeat

delete last char of tControls

set the hcAddressing of stack tStack to tHCAddressing

put the cHilitedButton["controls"] of stack "revPreferences" into tTabNum

if tTabNum is 7 or (item tTabNum of tControls is a number and tTabNum is not 5)

then sort lines of tControls numeric by item tTabNum of each

else sort lines of tControls text by item tTabNum of each

-- put tControls into lControlCache[pCard]

return tControls

end revControlList

function revControlsHtml pControls

--generate html with embedded icons for speed

put empty into tControlsHtml

put the cControlTabs of stack "revPreferences" into tControlTabs

if item 1 of tControlTabs is 1 then delete item 1 of tControlTabs

put the cTickIcon of this stack into tTickIcon

put the cUnTickIcon of this stack into tUnTickIcon

put itemOffset("Layer", kControlTabs) into tLayerOffset

put itemOffset("Control", kControlTabs) into tControlOffset

put itemOffset("Visible", kControlTabs) into tVisibleOffset

put itemOffset("Selectable", kControlTabs) into tSelectableOffset

put itemOffset("Script Lines", kControlTabs) into tScriptLinesOffset

repeat for each line l in pControls

put "c"&item 1 of l&"Icon" into tIconProp

put the tIconProp of this stack into tIcon

put kTag & "p>" & kTag & "img src="&quote&tIcon&quote&">" after tControlsHtml

repeat for each item i in tControlTabs

put item i of l into tItem

switch i

case tControlOffset

--indent grouped controls if sorted by layer

if the cHilitedButton["controls"] of stack "revPreferences" is tLayerOffset

then put kTab & item 11 of l after tControlsHtml

else put kTab & tItem after tControlsHtml

break

case tVisibleOffset

case tSelectableOffset

if tItem then put kTab & kTag & "img src="&quote&tTickIcon&quote&">" after tControlsHtml

else put kTab & kTag & "img src="&quote&tUnTickIcon&quote&">" after tControlsHtml

break

case tScriptLinesOffset

if tItem is "unknown"

then put kTab & kTag & "img src="&quote&the cPasswordIcon of this stack &quote&">" after tControlsHtml

else put kTab & tItem after tControlsHtml

break

default

put kTab & tItem after tControlsHtml

break

end switch

end repeat

put kTag & "/p>" & cr after tControlsHtml

end repeat

delete last char of tControlsHtml

replace tab with space&space in tControlsHtml

replace kComma with comma in tControlsHtml

replace "<" with kLessThan in tControlsHtml--user friendly message, "<" breaks html

replace kTag with "<" in tControlsHtml

return tControlsHtml

end revControlsHtml

function revControlLine pID

global gREVControls

put "#####REVID=", pID, "=#####REVID" into tLine

return lineOffset(tLine,gREVControls)

end revControlLine

function revInIcon

return lInIcon

end revInIcon

function revOutIcon

return lOutIcon

end revOutIcon

function revTabStops pTabs, pGroup

put the left of pGroup into tLeft

put empty into tTabStops

repeat for each line l in pTabs

put the right of btn l of pGroup - tLeft - 2 + \

the hScroll of pGroup & comma after tTabStops

end repeat

delete last char of tTabStops

return tTabStops

end revTabStops

function revColWidth pHtml, pColumnNo

replace kTab with tab in pHtml

set the itemDel to tab

repeat for each line l in pHtml

put "<p>"&item pColumnNo of l &"</p>" & cr after tColumn

end repeat

set the htmlText of fld "measure width" to tColumn

return the formattedWidth of fld "measure width" + 2

end revColWidth

on revMainStackChanged pStack

global gREVObjectTree

put the short name of pStack into tName

put tName,"stack,expanded" into tStackMatch

put lineOffset(tStackMatch,gREVObjectTree) into tStartLine

if tStartLine is 0 then exit revMainStackChanged

put lineOffset((comma&"stack,expanded"),gREVObjectTree,tStartLine) + tStartLine - 1 into tEndLine

if tEndLine < tStartLine then put the num of lines in gREVObjectTree into tEndLine

put the mainStack of stack tName into tMain

put line tStartLine to tEndLine of gREVObjectTree into tStackLines

delete line tStartLine to tEndLine of gREVObjectTree

if tMain is tName then

put lMainStackIcon into item 5 of line 1 of tStackLines

put empty into item 4 of line 1 of tStackLines

put cr & tStackLines after gREVObjectTree

else

put lSubstackIcon into item 5 of line 1 of tStackLines

put space & space into item 4 of line 1 of tStackLines

put tMain,"stack,expanded" into tStackMatch

put lineOffset(tStackMatch,gREVObjectTree) into tMainLine

if tMainLine is 0 then exit revMainStackChanged

put line (tMainLine + 1) to -1 of gREVObjectTree into tListBelow

put (tMainLine + 1) into tCount

put false into tFoundEnd

repeat for each line l in tListBelow

add 1 to tCount

if item 5 of l is lMainStackIcon then

put true into tFoundEnd

exit repeat

end if

end repeat

if tFoundEnd then

subtract 1 from tCount

put tStackLines & cr before line tCount of gREVObjectTree

else

put cr & tStackLines after gREVObjectTree

end if

end if

lock screen

put revSelLineID() into tLineID

revUpdateTree revTreeHtml(gREVObjectTree), tLineID

unlock screen

end revMainStackChanged

on revNameChanged pObject, pOldName, pNewName

global gREVStackName, gREVObjectTree, gREVControls

put the id of pObject into tID

put word 1 of pObject into tType

replace comma with kComma in pNewName

put revSelLineID() into tLineID

switch tType

case "stack"

replace comma with kComma in pOldName

put pOldName,"stack,expanded" into tStackMatch

put lineOffset(tStackMatch,gREVObjectTree) into tStartLine

if tStartLine is 0 then exit revNameChanged

put pNewName into item 6 of line tStartLine of gREVObjectTree

put the num of lines in gREVObjectTree into tNumLines

repeat with i = tStartLine to tNumLines

if item 1 of line i of gREVObjectTree is not pOldName then exit repeat

put pNewName into item 1 of line i of gREVObjectTree

put pNewName into item 14 of line i of gREVObjectTree

end repeat

lock screen

revUpdateTree revTreeHtml(gREVObjectTree), tLineID

unlock screen

break

case "card"

put the short name of the owner of pObject into tStack

replace comma with kComma in tStack

put ",#####REVID=",tID,"=#####REVID",tStack into tMatch

put lineOffset(tMatch,gREVObjectTree) into tOffset

if tOffset is 0 then exit revNameChanged

put pNewName into item 6 of line tOffset of gREVObjectTree

put revTreeHtml(line tOffset of gREVObjectTree) into tNewHtml

put the htmlText of fld "Cards" into tHtml

put tNewHtml into line tOffset of tHtml

lock screen

revUpdateTree tHtml, tLineID

unlock screen

break

default

if revTargetStack(pObject) is gREVStackName \

and the short name of this cd is "Cards and Controls" then

put revControlLine(tID) into tLine

if tLine is not 0 then

put pNewName into item 3 of line tLine of gREVControls

put pNewName into word 1 to -1 of item 11 of line tLine of gREVControls

lock screen

revUpdateControlsField true

unlock screen

end if

end if

break

end switch

end revNameChanged

on revNewStack pStack

global gREVObjectTree, gREVShowStacks

if not lInitialised then exit revNewStack

if not gREVShowStacks then put revFilterStacksList(pStack) into pStack

if pStack is empty then exit revNewStack

put pStack into tStack2

replace comma with kComma in tStack2

put tStack2,"stack,expanded" into tStackMatch

if tStackMatch is in gREVObjectTree then exit revNewStack

put the htmlText of fld "Cards" into tHtml

put revStackLine(pStack) into tStacksHtml

repeat for each line l in the substacks of stack pStack

put cr & revStackLine(l) after tStacksHtml

end repeat

if gREVObjectTree is empty then

put tStacksHtml into gREVObjectTree

put revTreeHtml(gREVObjectTree) into tHtml

else

put cr & tStacksHtml after gREVObjectTree

put cr & revTreeHtml(tStacksHtml) after tHtml

end if

lock screen

put revSelLineID() into tLineID

revUpdateTree tHtml, tLineID

unlock screen

end revNewStack

on revAODeleteStack pStack, pStacks

global gREVObjectTree, gREVStackName

put pStack into tStack

replace comma with kComma in tStack

put tStack,"stack,expanded" into tStackMatch

put lineOffset(tStackMatch,gREVObjectTree) into tStartLine

if tStartLine is 0 then exit revAODeleteStack

put false into tNotEnd

put the num of lines in gREVObjectTree into tNumLines

replace comma with kComma in pStacks

repeat with i = tStartLine to tNumLines

put item 1 of line i of gREVObjectTree into tLineStack

if tLineStack is not among the lines of pStacks then

put true into tNotEnd

exit repeat

end if

end repeat

if tNotEnd then delete line tStartLine to (i-1) of gREVObjectTree

else delete line tStartLine to tNumLines of gREVObjectTree

lock screen

put revSelLineID() into tLineID

revUpdateTree revTreeHtml(gREVObjectTree), tLineID

if pStack is gREVStackName then go cd "blank"

unlock screen

end revAODeleteStack

on revUpdateCards pStack

global gREVObjectTree, gREVShowStacks

if not gREVShowStacks then put revFilterStacksList(pStack) into pStack

if pStack is empty then exit revUpdateCards

put pStack,"stack,expanded true" into tStackMatch

put lineOffset(tStackMatch,gREVObjectTree) into tLine

if tLine is 0 then exit revUpdateCards

switch

case the cShowAudioClips of stack "revPreferences"

put ",audioclip,expanded false," into tMatch

break

case the cShowVideoClips of stack "revPreferences"

put ",videoclip,expanded false," into tMatch

break

default

put ",stack,expanded" into tMatch

break

end switch

put revSelLineID() into tLineID

put lineOffset(tMatch,gREVObjectTree,tLine) into tMatchLine

if tMatchLine = 0

then put the num of lines in gREVObjectTree into tEndCardLine

else put tMatchLine + tLine - 1 into tEndCardLine

put revCardList(the cardIDs of stack pStack,pStack) into tCardList

put the htmlText of fld "Cards" into tHtml

put tCardList into line (tLine + 1) to tEndCardLine of gREVObjectTree

put revTreeHtml(tCardList) into line (tLine + 1) to tEndCardLine of tHtml

lock screen

revUpdateTree tHtml, tLineID

if lineOffset(tLineID,gREVObjectTree) = 0

then go cd "Blank"

unlock screen

end revUpdateCards

on revUpdatePalette

global gREVStackName, gREVControls

if the short name of this cd is not "Cards and Controls" then exit revUpdatePalette

lock screen

put revTargetStack(line 1 of (the selobj)) into tTargetStack

put the hcAddressing of stack tTargetStack into tHCAddressing

set the hcAddressing of stack tTargetStack to false

put the selobj into tSelobj

switch

case tSelobj is empty

case word 1 of tSelobj is among the items of "stack,audioClip,videoClip,the"

case gREVStackName is not tTargetStack

case word 1 of tSelobj is "card"

revHiliteControlLine

put (the num of lines in gREVControls) && "Controls" into fld "Control Info"

break

default

put empty into tHilitedLines

repeat for each line l in tSelobj

put revControlLine(word 3 of l) & comma after tHilitedLines

end repeat

delete last char of tHilitedLines

revHiliteControlLine tHilitedLines

put (the num of lines in gREVControls) && "Controls (" \

& (the num of items in the hilitedLines of fld "Controls")\

&& "selected)" into fld "Control Info"

break

end switch

set the hcAddressing of stack tTargetStack to tHCAddressing

unlock screen

end revUpdatePalette

on revHiliteControlLine pLines

put the cPrevHilitedLines of fld "Controls" into tPrevHilitedLines

if tPrevHilitedLines is not 0 then

repeat for each item i in tPrevHilitedLines

set the textColor of line i of fld "Controls" to empty

end repeat

end if

set the hilitedLines of fld "Controls" to pLines

set the cPrevHilitedLines of fld "Controls" to pLines

if the cSuspended of this stack then

repeat for each item i in pLines

set the textColor of line i of fld "Controls" to black

end repeat

end if

end revHiliteControlLine

function revCardOpen

global gREVStackName

if the mode of stack gREVStackName is not 0 \

and the cCardID of this stack is the id of this cd of stack gREVStackName

then return true

else return false

end revCardOpen

on revRetainStacks

global gREVObjectTree

put comma & "stack,expanded true" into tStackMatch

put 0 into tSkip

put empty into lCurrentStacks

repeat

put lineOffset(tStackMatch,gREVObjectTree,tSkip) into tLineOffset

if tLineOffset = 0 then exit repeat

add tLineOffset to tSkip

put item 1 of line tSkip of gREVObjectTree & cr after lCurrentStacks

end repeat

delete last char of lCurrentStacks

replace kComma with comma in lCurrentStacks

end revRetainStacks

function revSelLineID

global gREVObjectTree

#returns unique string for selected line in tree view, if there is one

put the cSelLine of fld "Cards" of grp "Cards" into tSelLine

if tSelLine is not empty

then return item 4 to 14 of line tSelLine of gREVObjectTree

else return empty

end revSelLineID

on revReselectLine pLineID

global gREVObjectTree

#reselects line in tree view using ID from revSelLineID()

if pLineID is not empty then

put lineOffset(pLineID,gREVObjectTree) into tLineOffset

if tLineOffset is not 0 then revSelectLine tLineOffset

end if

end revReselectLine

on revSelectLine pLine

put the cSelLine of fld "Cards" of grp "Cards" into tLine

set the itemDel to tab

if tLine is not empty then

set the backColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to empty

set the textColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to empty

end if

set the backColor of word 1 to -1 of item 1 of line pLine \

of fld "Cards" of grp "Cards" to the hiliteColor

if the platform is not "MacOS"

then set the textColor of word 1 to -1 of item 1 of line pLine \

of fld "Cards" of grp "Cards" to white

set the cSelLine of fld "Cards" of grp "Cards" to pLine

end revSelectLine

function revLastTabRight pField

if the vScrollbar of pField then

put the right of pField \

- the scrollbarWidth of pField into tRight

else put the right of pField into tRight

return max(tRight, the left of pField \

+ the formattedWidth of pField \

- the hScroll of pField)

end revLastTabRight

function revShortCutAction pObjectType

switch

case the commandKey is down

return the cABCommandDoubleClick[pObjectType] of stack "revPreferences"

break

case the optionKey is down

return the cABOptionDoubleClick[pObjectType] of stack "revPreferences"

break

default

return the cABDoubleClick[pObjectType] of stack "revPreferences"

break

end switch

end revShortCutAction

on revSetBlankLeft

set the left of fld "select a card" of cd "blank" to the right of btn "Resize" of cd "blank"

end revSetBlankLeft

on suspendStack

if the platform is not "Win32" then exit suspendStack

set the cSuspended of this stack to true

put the cSelLine of fld "Cards" of grp "Cards" into tLine

lock screen

if tLine is not empty then

set the itemDel to tab

set the backColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to 236,233,216

set the textColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to empty

set the itemDel to comma

end if

set the hiliteColor of this stack to 236,233,216

put empty into tField

switch the short name of this cd

case "Cards and Controls"

put "Controls" into tField

break

case "Audioclips"

case "Videoclips"

put the short name of this cd into tField

break

end switch

if tField is not empty then

repeat for each item i in the hilitedLines of fld tField

set the textColor of line i of fld tField to black

end repeat

end if

unlock screen

end suspendStack

on resumeStack

if the platform is not "Win32" then exit resumeStack

set the cSuspended of this stack to false

put the cSelLine of fld "Cards" of grp "Cards" into tLine

lock screen

if tLine is not empty then

set the itemDel to tab

set the backColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to the hiliteColor

set the textColor of word 1 to -1 of item 1 of line tLine \

of fld "Cards" of grp "Cards" to white

set the itemDel to comma

end if

set the hiliteColor of this stack to empty

put empty into tField

switch the short name of this cd

case "Cards and Controls"

put "Controls" into tField

break

case "Audioclips"

case "Videoclips"

put the short name of this cd into tField

break

end switch

if tField is not empty then

repeat for each item i in the hilitedLines of fld tField

set the textColor of line i of fld tField to empty

end repeat

end if

unlock screen

end resumeStack

Make a Donation..EpKon mouseUp revGoUrl UrlDecode(the uPaypalURL of this stack) end mouseUp CClick here to support development by making a donation with Paypal cREVGeneral scriptChecksum:|vDm8  handlerListmouseUp breakPointsscriptSelection char 74 to 73 bookmarks revUniqueID 1121422230856 prevHandlermouseUp tempScriptscript

on mouseUp

revGoUrl UrlDecode(the uPaypalURL of this stack)

end mouseUp