#!/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 "$@" ResourceCopieron showError pType switch pType case sourceFile answer "Please open a source file." break case destFile answer "Please open a destination file." break case copyRes answer "Please select a resource to copy." break case delRes answer "Please select a resource to delete." break default answer "Unknown error - please check your settings and try again." end switch exit to top end showError 4cr*ResourceCopier ULucida Grande UVerdana @UVerdana cREVGeneralscriptChecksumV@n$B debugObjects bookmarks handlerList showError tempScript prevHandlerscriptSelectionchar 440 to 439script<

on showError pType

switch pType

case sourceFile

answer "Please open a source file."

break

case destFile

answer "Please open a destination file."

break

case copyRes

answer "Please select a resource to copy."

break

case delRes

answer "Please select a resource to delete."

break

default

answer "Unknown error - please check your settings and try again."

end switch

exit to top

end showError

 @* Open SourceEpon mouseUp answer file "Select a file containing the resources you want to copy:" put it into sourceFile if sourceFile is empty then exit mouseUp put sourceFile into fld "Source" put getResources(sourceFile) into fld "SourceRes" end mouseUp _R cREVGeneralscriptChecksumM7X|f revUniqueID 1056662404386 bookmarks handlerListmouseUp tempScript prevHandlerscriptSelectionchar 242 to 241script5

on mouseUp

answer file "Select a file containing the resources you want to copy:"

put it into sourceFile

if sourceFile is empty then exit mouseUp

put sourceFile into fld "Source"

put getResources(sourceFile) into fld "SourceRes"

end mouseUp

Source `@" cREVGeneral revUniqueID 1056663307816   SourceRes)`@ cREVGeneral revUniqueID 1056663317384   `A  Open DestEpon mouseUp answer file "Select a file containing resources:" put it into destFile if destFile is empty then exit mouseUp put destFile into fld "Dest" put getResources(destFile) into fld "DestRes" end mouseUp L_R cREVGeneralscriptChecksumX"7sEi bookmarks revUniqueID 1056663424854 handlerListmouseUpscriptSelectionchar 162 to 209 prevHandlermouseUp tempScriptscript

on mouseUp

answer file "Select a file containing resources:"

put it into destFile

if destFile is empty then exit mouseUp

put destFile into fld "Dest"

put getResources(destFile) into fld "DestRes"

end mouseUp

Dest `@8" cREVGeneral revUniqueID 1056663424690  DestRes)`8@ cREVGeneral revUniqueID 1056663424728   `A  Clear SourceEpWon mouseUp put empty into fld "Source" put empty into fld "SourceRes" end mouseUp _R cREVGeneralscriptChecksum/O-_D:[E. revUniqueID 1056663521210 bookmarks handlerListmouseUp tempScript prevHandlerscriptSelection char 74 to 73scriptq

on mouseUp

put empty into fld "Source"

put empty into fld "SourceRes"

end mouseUp

 Clear DestEpSon mouseUp put empty into fld "Dest" put empty into fld "DestRes" end mouseUp _R cREVGeneralscriptChecksumzƑ[+}D>- bookmarks revUniqueID 1056663559395 handlerListmouseUpscriptSelection char 82 to 81 prevHandlermouseUp tempScriptscriptm

on mouseUp

put empty into fld "Dest"

put empty into fld "DestRes"

end mouseUp

CopyGpon mouseUp put fld "Source" into sourceFile if sourceFile is empty then showError "sourceFile" put fld "Dest" into destFile if destFile is empty then showError "destFile" put the selectedText of fld "SourceRes" into tRes if tRes is empty then showError "copyRes" put item 1 of tRes into tResType put item 2 of tRes into tResID get copyResource(sourceFile, destFile, tResType, tResID) if the result is not empty then answer the result put getResources(destFile) into fld "DestRes" end mouseUp h0.p cREVGeneral scriptChecksum+)=za%XӥHC handlerListmouseUp breakPointsscriptSelectionchar 282 to 281 revUniqueID 1056663580930 bookmarks tempScript prevHandlermouseUpscript

on mouseUp

put fld "Source" into sourceFile

if sourceFile is empty then showError "sourceFile"

put fld "Dest" into destFile

if destFile is empty then showError "destFile"

put the selectedText of fld "SourceRes" into tRes

if tRes is empty then showError "copyRes"

put item 1 of tRes into tResType

put item 2 of tRes into tResID

get copyResource(sourceFile, destFile, tResType, tResID)

if the result is not empty then answer the result

put getResources(destFile) into fld "DestRes"

end mouseUp

Field 1   cREVGeneral revUniqueID 1056664227667 Source Field 1 8  cREVGeneral revUniqueID 1056664240752 DestinationDeleteGp=on mouseUp put fld "Dest" into destFile if destFile is empty then showError destFile put the selectedText of fld "DestRes" into tRes if tRes is empty then showError delRes put item 1 of tRes into tResType put item 2 of tRes into tResID answer "Really delete resource ID " & tResID & " from the destination file?" \ with "Cancel" or "Delete" if it is "Cancel" then exit mouseUp get deleteResource(destFile, tResType, tResID) if the result is not empty then answer the result put getResources(destFile) into fld "DestRes" end mouseUp 06V cREVGeneral scriptChecksumiP-3@ breakPoints handlerListmouseUpscriptSelectionchar 181 to 180 bookmarks revUniqueID 1056664284856 prevHandlermouseUp tempScriptscript

on mouseUp

put fld "Dest" into destFile

if destFile is empty then showError destFile

put the selectedText of fld "DestRes" into tRes

if tRes is empty then showError delRes

put item 1 of tRes into tResType

put item 2 of tRes into tResID

answer "Really delete resource ID " & tResID & " from the destination file?" \

with "Cancel" or "Delete"

if it is "Cancel" then exit mouseUp

get deleteResource(destFile, tResType, tResID)

if the result is not empty then answer the result

put getResources(destFile) into fld "DestRes"

end mouseUp

HelpCpYon mouseUp set the visible of fld "Help" to not the visible of fld "Help" end mouseUp V0(4W cREVGeneral scriptChecksum冲Y΋ԗ} handlerListmouseUp breakPointsscriptSelection char 88 to 87 revUniqueID 1057446741675 bookmarks tempScript prevHandlermouseUpscript

on mouseUp

set the visible of fld "Help" to not the visible of fld "Help"

end mouseUp

Help!pon linkClicked pLink if pLink contains "@" then revGoURL "mailto:" & pLink else revGoURL pLink end if end linkClicked on mouseUp hide me end mouseUp @@ cREVGeneralscriptChecksumADHn >,M bookmarks revUniqueID 1057446930182 handlerListlinkClicked mouseUpscriptSelectionchar 166 to 165 prevHandler tempScriptscript

on linkClicked pLink

if pLink contains "@" then

revGoURL "mailto:" & pLink

else

revGoURL pLink

end if

end linkClicked

on mouseUp

hide me

end mouseUp

 EThis is a simple utility stack similar to HyperCard's ResourceMover. Revolution 1.1.1 allowed resources to be imported, listed and deleted, but this seems to have been removed from Rev 2's application Browser (or at least hidden). Select a source file (any file type can be used) and all it's internal resources (icons, sounds, XCMDs, XFCNs etc) will be displayed. Then select a destination file - probably your Revolution stack but you can use anything. It's resources will also be displayed. ^Select a resource in the source file and click 'Copy' to place it into your destination file. ^If you want to delete any resources from your destination file, select it and click 'Delete'. - This has only been tested on Mac OS X 10.2.6 and Rev 2.0.1, but should work fine on any Mac system. Other operating systems don't use resource forks, so this is of no interest. k- Messing around with resources can cause problems, so make backup copies of all files before trying this. h- Feel free to use or modify this stack in any way, but anything you do with it is your responsibility. 7Sarah Reichelt sarah@troz.net http://www.troz.net/Rev/    `>