#!/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 "$@" revAltFileMgr3TtG altFileMgrG ULucida GrandeULucida Grande ULucida Grande WLucida Grande cREVGeneral debugObjects P on resizeStack pNewW,pNewH,pOldW,pOldH --> AUTO-GENERATED BY altLayout Manager altSetRect (long ID of field "theFiles"), (the altLayoutManager["altCmd"] of long ID of field "theFiles") altSetRect (long ID of field "theFolder"), (the altLayoutManager["altCmd"] of long ID of field "theFolder") altSetRect (long ID of button "show invisible files"), (the altLayoutManager["altCmd"] of long ID of button "show invisible files") altSetRect (long ID of button "visible"), (the altLayoutManager["altCmd"] of long ID of button "visible") altSetRect (long ID of field "thePath"), (the altLayoutManager["altCmd"] of long ID of field "thePath") altSetRect (long ID of button "Rename"), (the altLayoutManager["altCmd"] of long ID of button "Rename") altSetRect (long ID of field id 1015), (the altLayoutManager["altCmd"] of long ID of field id 1015) altSetRect (long ID of field "vers"), (the altLayoutManager["altCmd"] of long ID of field "vers") end ResizeStack --> END AUTO-GENERATED BY altLayout Manager on OpenStack --> AUTO-GENERATED BY altLayout Manager stripandship start using stack "altLayoutLib" initAltLayoutLib end OpenStack on renamePath put fld "theFolder" & line (the hilitedline of fld "theFiles") of fld "theFiles" into tOldPath put fld "thePath" into tNewPath set itemDel to "/" put last item of tNewPath into tNewName if last char of tOldPath is "/" then put "/" after tNewName --> MAKE FILE / FOLDER NAME if the hilite of btn "visible" then if char 1 of tNewName is "." then delete char 1 of tNewName end if else if char 1 of tNewName is not "." then put "." before tNewName end if end if delete last item of tNewPath if last char of tNewPath is "/" then delete last char of tNewPath put tNewPath & "/" & tNewName into tNewPath put "mv" && tOldPath && tNewPath into tCommand get shell(tCommand) loadFolder fld "theFolder" end renamePath on disableProps pBool if pBool is true then disable btn "visible" disable btn "Rename" disable fld "thePath" unhilite btn "visible" put empty into fld "thePath" else enable btn "visible" enable btn "Rename" enable fld "thePath" hilite btn "visible" end if end disableProps on loadFolder pFolder if pFolder is empty then answer folder "choose a folder" with fld "theFolder" if it is empty then exit to top put it into pFolder end if put the defaultFolder into tOldDF set the defaultFolder to pFolder put shell("pwd") into tDefaultFolder delete last char of tDefaultFolder if last char of tDefaultFolder is not "/" then put "/" after tDefaultFolder put tDefaultFolder into fld "theFolder" if the hilite of btn "show invisible files" then put shell("ls -a -p") into tResponse else put "./" &cr& "../" &cr& shell("ls -p") into tResponse end if if tResponse contains "ls: .: Permission denied" then put "./" &cr& "../" &cr before tResponse delete last char of tResponse put tResponse into fld "theFiles" set the defaultFolder to tOldDF disableProps true end loadFolder on stripAndShip disableProps true put "" into fld "theFolder" put "" into fld "theFiles" put "" into fld "thePath" end stripAndShip G cREVGeneralscriptChecksumd^c k~) bookmarks handlerListEresizeStack OpenStack renamePath disableProps loadFolder stripAndShipscriptSelectionchar 1066 to 1065 prevHandler OpenStack tempScriptscript

on resizeStack pNewW,pNewH,pOldW,pOldH --> AUTO-GENERATED BY altLayout Manager

altSetRect (long ID of field "theFiles"), (the altLayoutManager["altCmd"] of long ID of field "theFiles")

altSetRect (long ID of field "theFolder"), (the altLayoutManager["altCmd"] of long ID of field "theFolder")

altSetRect (long ID of button "show invisible files"), (the altLayoutManager["altCmd"] of long ID of button "show invisible files")

altSetRect (long ID of button "visible"), (the altLayoutManager["altCmd"] of long ID of button "visible")

altSetRect (long ID of field "thePath"), (the altLayoutManager["altCmd"] of long ID of field "thePath")

altSetRect (long ID of button "Rename"), (the altLayoutManager["altCmd"] of long ID of button "Rename")

altSetRect (long ID of field id 1015), (the altLayoutManager["altCmd"] of long ID of field id 1015)

altSetRect (long ID of field "vers"), (the altLayoutManager["altCmd"] of long ID of field "vers")

end ResizeStack --> END AUTO-GENERATED BY altLayout Manager

on OpenStack --> AUTO-GENERATED BY altLayout Manager

stripandship

start using stack "altLayoutLib"

initAltLayoutLib

end OpenStack

on renamePath

put fld "theFolder" & line (the hilitedline of fld "theFiles") of fld "theFiles" into tOldPath

put fld "thePath" into tNewPath

set itemDel to "/"

put last item of tNewPath into tNewName

if last char of tOldPath is "/" then put "/" after tNewName

--> MAKE FILE / FOLDER NAME

if the hilite of btn "visible" then

if char 1 of tNewName is "." then

delete char 1 of tNewName

end if

else

if char 1 of tNewName is not "." then

put "." before tNewName

end if

end if

delete last item of tNewPath

if last char of tNewPath is "/" then delete last char of tNewPath

put tNewPath & "/" & tNewName into tNewPath

put "mv" && tOldPath && tNewPath into tCommand

get shell(tCommand)

loadFolder fld "theFolder"

end renamePath

on disableProps pBool

if pBool is true then

disable btn "visible"

disable btn "Rename"

disable fld "thePath"

unhilite btn "visible"

put empty into fld "thePath"

else

enable btn "visible"

enable btn "Rename"

enable fld "thePath"

hilite btn "visible"

end if

end disableProps

on loadFolder pFolder

if pFolder is empty then

answer folder "choose a folder" with fld "theFolder"

if it is empty then exit to top

put it into pFolder

end if

put the defaultFolder into tOldDF

set the defaultFolder to pFolder

put shell("pwd") into tDefaultFolder

delete last char of tDefaultFolder

if last char of tDefaultFolder is not "/" then put "/" after tDefaultFolder

put tDefaultFolder into fld "theFolder"

if the hilite of btn "show invisible files" then

put shell("ls -a -p") into tResponse

else

put "./" &cr& "../" &cr& shell("ls -p") into tResponse

end if

if tResponse contains "ls: .: Permission denied" then put "./" &cr& "../" &cr before tResponse

delete last char of tResponse

put tResponse into fld "theFiles"

set the defaultFolder to tOldDF

disableProps true

end loadFolder

on stripAndShip

disableProps true

put "" into fld "theFolder"

put "" into fld "theFiles"

put "" into fld "thePath"

end stripAndShip

Choosegw%on mouseUp loadFolder end mouseUp R Nchoose folder Choose..  cREVGeneral revUniqueID 1087279749592 breakPoints  theFiles)p on mouseDoubleUp put line the hilitedlines of me of me into tSelect put fld "theFolder" into tFolder switch case tSelect is "./" loadFolder "/" break case tSelect is "../" set itemDel to "/" delete last item of tFolder loadFolder tFolder break case last char of tSelect is "/" put tFolder & tSelect into tNewFolder loadFolder tNewFolder break end switch disableProps true end mouseDoubleUp on mouseUp put line the hilitedlines of me of me into tSelect put fld "theFolder" into tFolder switch case tSelect is "./" case tSelect is "../" case tSelect contains "ls: .: Permission denied" disableProps true break default put tFolder & tSelect into tNewFolder getPathInfo tNewFolder break end switch end mouseUp on getPathInfo pPath disableProps false put pPath into fld "thePath" set itemDel to "/" put last item of pPath into tName if first char of tName is "." then unhilite btn "visible" else hilite btn "visible" end if end getPathInfo V"AaltLayoutManager MacOSXaltCmd SX:-17,SY:-97MacOSXaltRect 20,86,310,151altCmd SX:-17,SY:-97altRect 20,86,310,151 cREVGeneral revUniqueID 1087279804969 breakPoints  `%W?  theFolder 3"altLayoutManager MacOSXaltCmdSX:-17MacOSXaltRect 20,51,310,73altCmdSX:-17altRect 20,51,310,73 cREVGeneral revUniqueID 1087283226219 show invisible files`E5on mouseUp loadFolder fld "theFolder" end mouseUp altLayoutManager MacOSXaltCmdMX:-17MacOSXaltRect 180,8,310,31altCmdMX:-17altRect 180,8,310,31 cREVGeneral revUniqueID 1087283279658 visible`E'on mouseUp renamePath end mouseUp RaltLayoutManager MacOSXaltCmdMY:-13MacOSXaltRect22,212,104,235altCmdMY:-13altRect22,212,104,235 cREVGeneral scriptChecksum&8w7quEp bookmarks revUniqueID 1087283698903 handlerListmouseUp breakPointsscriptSelection char 38 to 37 prevHandler renamePath tempScriptscriptP

on mouseUp

renamePath

end mouseUp

thePath9h"altLayoutManager MacOSXaltCmd SX:-17,MY:-43MacOSXaltRect20,183,310,205altCmd SX:-17,MY:-43altRect20,183,310,205 cREVGeneral revUniqueID 1087284018920  RenameEp%on mouseUp renamePath end mouseUp HaltLayoutManager MacOSXaltCmd MX:-19,MY:-16MacOSXaltRect236,214,308,232altCmd MX:-19,MY:-16altRect236,214,308,232 cREVGeneral scriptChecksumQmm40kP bookmarks revUniqueID 1087287171967 breakPoints handlerListmouseUpscriptSelection char 37 to 36 prevHandlermouseUp tempScriptscript@

on mouseUp

renamePath

end mouseUp

  altLayoutManager MacOSXaltCmdMY:-64MacOSXaltRect16,163,144,184altCmdMY:-64altRect16,163,144,184 cREVGeneral revUniqueID 1087287917286 Selected   F cREVGeneral revUniqueID 1087287839091 Directory Contents   & cREVGeneral revUniqueID 1087288055918 Directory vers  on mouseUp if the shiftKey is down then ask "New Version:" with me if it is empty then exit mouseUp put it into me set the altVers of img "altPlug.png" to it end if end mouseUp '$altLayoutManager MacOSXaltCmdMX:4MacOSXaltRect 295,-4,331,14altCmdMX:4altRect 295,-4,331,14 cREVGeneral revUniqueID 1087291494754 v0.8 altPlug.png altVersv0.8altOpenVisibletruealtPlugFileNamerevAltFileMgr.rev altOnClickMedoIt altUpdateURL9http://www.gadgetplugins.com/altplugins/revAltFileMgr.txt altFileMgrPNG  IHDR szzgAMA=-fLIDATx[]UZk}gB-**$cQÓ^bb > & >| &Xƒ! !&6%RچktJgs;sξtNv>{U@o!<@ojj.^ D`y ʕ?hDUgߟQp,6Ua_}D7?eթێ)ك9}@0X8{B?r{0(E ;GOak`y " S͆}F66)PMf$;AarcGn{޶duVFJ*ARACQլj"-JA1[&;D!tcTW}P (hx٨z@зD X$3`9`XJ %S_DCGcFP[7I0C,X 6DDa`!|JB!}@%-% *Q,Fb-^Y,p,8&Gk-ʲѳ+mʿ^Bs]955b%jqN)h`\\KRx:K 58,,r|-{L NԨ&;BG9۳AR8r:895;8V׆*|ݹzdev `!]>بĔ`b{yA_(4 $}@T_3<;[Uqh!~7X@@F^I( U2g>:ɇ2+>\dIF RtWaٌB)`+\X( gm#O h׿jq^ s%ؓ ĕgkF*PDC=L^+9v! Js$С$#MB ~3bu> OE/Q!z!X& VD):À+=Ϝs#mZZU؅VuݗOSEE&{fj X9vA3AkSQQTS$Rn ߦuhdЙT4Y+aGv{[s06d% &V pEWSJgIDd8 &m&V5N!T޹]RKɈ꽔_oΩ{8~8>nCG4gq[]OfP~}7 Ro\[L&^*l:!ߘoXICӐX. w,U7t*O'x}n cv݈A21٣,;4ږbcԀAi[;bs볨@VB1u@eIOڴ$ lͶ;fb X#*b IjZHk5 c j iL7 T4RVU4 nGl X9\˸-g(ցKю|WqżZfM/X2⵸Ȳ5wp 4Drd2 y)J?^;,lP2g$p jfg` ^Mk8)нʥC&kMcd~8D084 e/*ժJ|yq gw 3Jx2XYsBO ד.W60tJ'}8[,6BnIENDB` cREVGeneral revUniqueID 1087292978823togglePaletteModeA*}on mouseUp if the mode of this stack is 1 then palette this stack else toplevel this stack end if end mouseUp @ cREVGeneralscriptChecksum 1St78x revUniqueID 1087330855146 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 11 to 10script

on mouseUp

if the mode of this stack is 1 then

palette this stack

else

toplevel this stack

end if

end mouseUp

?>on mouseUp answer information the altMsg of me end mouseUp 0 altMsg

altFileMgr

Choose a directory to begin navigating from. You can then subsequently navigate by double-clicking on folders in the Directory Contents list box. Clicking on "../" moves you up one folder. Clicking on "./" moves you to the root (top).

Single-clicking an item in the Directory Contents lists allows you to toggle it's visibility by checking/unchecking the visible checkbox (this renames it with a '.' in front).

If you change the contents of the Selected field, you can then Rename the hilited file/folder to it. This includes changes the directory structure too, so be careful!

Chipp Walters

 cREVGeneralscriptChecksum.Ӊ3@# bookmarks revUniqueID 1087331456889 handlerListmouseUpscriptSelection char 49 to 48 prevHandler tempScriptscriptQ

on mouseUp

answer information the altMsg of me

end mouseUp

 altLayoutLib%Lon initAltLayoutLib #put the mainstack of this stack into theParentStackName switch the platform case "MacOS" altSetLayoutMode "Mac OSX" break case "Win32" altSetLayoutMode "Win XP" break default altSetLayoutMode "Other" break end switch #pass libraryStack end initAltLayoutLib on altSetLayoutMode pMode put the short name of the target into tTheStackName if tTheStackName contains "card" then put the owner of tTheStackname into tTheStackName put the short name of tTheStackName into tTheStackName end if if tTheStackName is "LayoutManager" then answer "Can't edit the Layout Manager stack!" exit to top end if put the subStacks of stack tTheStackName into tStackList if "altLayoutLib" is not among the lines of tStackList then answer warning "Please first install the altLayout library to stack: " & \ tTheStackName exit to top end if replace space with "" in pMode set the defaultStack to tTheStackName if pMode is "WinXP" then if there is a btn "altDrag" then show btn "altDrag" end if else if there is a btn "altDrag" then hide btn "altDrag" end if end if --> RESIZE STACK put the rect of stack tTheStackName into tRect --> MINWIDTH put pMode & "altMinWidth" into tProp if "altMinWidth" is among the lines of the customKeys of stack "altLayoutLib" then if tProp is among the lines of the customKeys of stack "altLayoutLib" then put "put the " & tProp & " of stack " & quote & "altLayoutLib" & quote & " into tPropValue" into tDo do tDo if isNumber(tPropValue) and tPropValue > 32 then set the altMinWidth of stack "altLayoutLib" to tPropValue end if end if set the minWidth of stack tTheStackName to the altMinWidth of stack "altLayoutLib" #set the width of stack tTheStackName to the altMinWidth of stack "altLayoutLib" end if --> MINHEIGHT put pMode & "altMinHeight" into tProp if "altMinHeight" is among the lines of the customKeys of stack "altLayoutLib" then if tProp is among the lines of the customKeys of stack "altLayoutLib" then put "put the " & tProp & " of stack " & quote & "altLayoutLib" & quote & " into tPropValue" into tDo do tDo if isNumber(tPropValue) and tPropValue > 32 then set the altMinHeight of stack "altLayoutLib" to tPropValue end if end if set the minHeight of stack tTheStackName to the altMinHeight of stack "altLayoutLib" #set the height of stack tTheStackName to the altMinHeight of stack "altLayoutLib" end if --> MAXWIDTH put pMode & "altMaxWidth" into tProp if "altMaxWidth" is among the lines of the customKeys of stack "altLayoutLib" then if tProp is among the lines of the customKeys of stack "altLayoutLib" then put "put the " & tProp & " of stack " & quote & "altLayoutLib" & quote & " into tPropValue" into tDo do tDo if isNumber(tPropValue) and tPropValue > 32 then set the altMaxWidth of stack "altLayoutLib" to tPropValue end if end if set the maxWidth of stack tTheStackName to the altMaxWidth of stack "altLayoutLib" #set the width of stack tTheStackName to the altMaxWidth of stack "altLayoutLib" end if --> MAXHEIGHT put pMode & "altMaxHeight" into tProp if "altMaxHeight" is among the lines of the customKeys of stack "altLayoutLib" then if tProp is among the lines of the customKeys of stack "altLayoutLib" then put "put the " & tProp & " of stack " & quote & "altLayoutLib" & quote & " into tPropValue" into tDo do tDo if isNumber(tPropValue) and tPropValue > 32 then set the altMaxHeight of stack "altLayoutLib" to tPropValue end if end if set the maxHeight of stack tTheStackName to the altMaxHeight of stack "altLayoutLib" #set the height of stack tTheStackName to the altMaxHeight of stack "altLayoutLib" end if --> SET THE STACK RECT USING MIN NUMBERS set the rect of stack tTheStackName to \ item 1 of tRect, \ item 2 of tRect, \ item 1 of tRect + the minWidth of stack tTheStackName, \ item 2 of tRect + the minHeight of stack tTheStackName --> SET CONTROL RECTS AND BEHAVIOR put the environment into tEnvironment #put "fred" into tEnvironment --> NEVER WALK THRU CONTROLS...JUST USE CONTROL LIST if tEnvironment is "development" then --> WALK THRU EACH CONTROL ON EACH CD (SLOWER BUT BETTER FOR EDITING) repeat with x = 1 to the number of cds in stack tTheStackName repeat with y = 1 to the number of controls in the current card of stack tTheStackName if "altLayoutManager" is among the lines of the customPropertySets of control y then set the customPropertySet of control y to "altLayoutManager" --> SET THE ALTRECT OF CONTROL PER PLATFORM if "altRect" is among the lines of the customKeys of control y then put pMode & "altRect" into tProp put "put the " & tProp & " of control y into tPropValue" into tDo do tDo if tPropValue is "" then put the altRect of control y into tPropValue end if set the rect of control y to tPropValue end if if "altCmd" is among the lines of the customKeys of control y then put pMode & "altCmd" into tProp if tProp is among the lines of the customKeys of control y then put "put the " & tProp & " of control y into tPropValue" into tDo do tDo set the altCmd of control y to tPropValue end if end if set the customPropertySet of control y to empty end if end repeat end repeat else --> WALK THRU CONTROL LIST put the altResizeControlList of stack "altLayoutLib" into tControlList --> CORRECT STACK NAMES put the fileName of stack tTheStackName into tStackName repeat for each line L in tControlList put L into tStr replace "" with tStackName in tStr put tStr & cr after tList end repeat repeat for each line L in tList --> TEST TO SEE IF CONTROL NAME EXISTS if exists(L) then if "altLayoutManager" is among the lines of the customPropertySets of L then set the customPropertySet of L to "altLayoutManager" --> SET THE ALTRECT OF CONTROL PER PLATFORM if "altRect" is among the lines of the customKeys of L then put pMode & "altRect" into tProp put "put the " & tProp & " of L into tPropValue" into tDo do tDo if tPropValue is "" then put the altRect of L into tPropValue end if set the rect of L to tPropValue end if if "altCmd" is among the lines of the customKeys of L then put pMode & "altCmd" into tProp if tProp is among the lines of the customKeys of L then put "put the " & tProp & " of L into tPropValue" into tDo do tDo set the altCmd of L to tPropValue end if end if set the customPropertySet of L to empty end if else answer warning "Control not found. Exiting Now. Control name: " &cr& L with "Exit to Top" or "OK" if it is "exit to top" then exit to top end if end if end repeat end if end altSetLayoutMode on altSetRect pObj,pCommands,pRelativeTo --> THANKS TO KEN RAY FOR DONATING PART OF THIS CODE! switch pRelativeTo case "card" case "" -- relative to card put long id of this card into pRelativeTo break default -- another object; passed as long id end switch put the left of pRelativeTo into tLeft put the top of pRelativeTo into tTop put the right of pRelativeTo into tRight put the bottom of pRelativeTo into tBot put the rect of pObj into tRect put the rect of pObj into tRectNew replace comma with cr in pCommands replace ":" with comma in pCommands repeat for each line tCmd in pCommands switch (item 1 of tCmd) case "SX" -->SCALES RIGHT put (tRight + (item 2 of tCmd)) into item 3 of tRectNew break case "SY" -->SCALES DOWN put (tBot + (item 2 of tCmd)) into item 4 of tRectNew break case "MX" --> MOVES RIGHT put (tRight + (item 2 of tCmd)) into tRightNew put tRightNew - (item 3 of tRect - item 1 of tRect) into item 1 of tRectNew put tRightNew into item 3 of tRectNew break case "MY" --> MOVES DOWN put (tBot + (item 2 of tCmd)) into tBotNew --item 4 of tRectNew put tBotNew - (item 4 of tRect - item 2 of tRect) into item 2 of tRectNew put tBotNew into item 4 of tRectNew break case "CX" --> CENTERS ALONG THE X AXIS (NO SCALE) put (item 3 of tRect - item 1 of tRect) into tWidth put round((tRight/2) - (tWidth/2)) into tLeftNew put tLeftNew + tWidth into item 3 of tRectNew put tLeftNew into item 1 of tRectNew break case "CY" --> CENTERS ALONG THE Y AXIS (NO SCALE) put (item 4 of tRect - item 2 of tRect) into tHeight put round((tBot/2) - (tHeight/2)) into tTopNew put tTopNew + tHeight into item 4 of tRectNew put tTopNew into item 2 of tRectNew break end switch end repeat set the rect of pObj to tRectNew end altSetRect altResizeControlListfield id 1014 of card id 1002 of stack "" button id 1003 of card id 1002 of stack "" field id 1004 of card id 1002 of stack "" field id 1007 of card id 1002 of stack "" button id 1008 of card id 1002 of stack "" button id 1009 of card id 1002 of stack "" field id 1010 of card id 1002 of stack "" button id 1013 of card id 1002 of stack "" field id 1015 of card id 1002 of stack "" field id 1016 of card id 1002 of stack "" field id 1017 of card id 1002 of stack "" image id 1020 of card id 1002 of stack ""MacOSXaltMinWidth327altResizeScriptLocationcardMacOSXaltMinHeight248 altMinWidth327 altMinHeight248  Ums sans serif ULucida Grande cREVGeneral breakPoints @