HyperActive Software

Home What's New Who We Are What We Do Solutions Resources

We make software for humans. Custom Mac, Windows, iOS and Android solutions in HyperCard, MetaCard, and RunRev LiveCode


HyperCard Tips and Tricks: Resources and Externals

Hacking Resource Mover to Copy to Non-Stack Files

Posted: 2/4/02
The Resource Mover in Power Tools will let you copy resources between
stacks. If you hold down the option key, you can open any file and copy
resources from it, but not to it.

If you want to copy resources _to_ a non-stack file, try this:

Open the script of one of the Open buttons. Find the text:

  put false into readOnly
  if the optionKey is down then
    answer file "Display the resources of what file?"
    put true into readOnly
  else answer file "Display the resources of what stack...

Change the fourth line above to 'put false into readOnly'. Do the same
with the other Open button if you like.

Next, open the card script. Scroll down to the doResList handler. Find
the text:

  if readOnly then show cd btn (WhichList&&"Lock")
    useStack FileName
    set the visible of cd btn (WhichList&&"Lock")...

Change the 'else' line above to 'else if there is a stack FileName'.

Now, whenever you option-click the Open button to open a non-stack file,
you can copy resources to it as well as from it.

Jon Bettencourt
Kreative Software

Getting the QuickTime version

Posted: 9/8/98
The version of QuickTime is available in HyperCard 2.3.5 and earlier by
using the MovieInfo XFCN, which you will find in the QuickTime Tools

From the documentation in version 2.4 of that stack:

Passing "." as the only parameter returns the version of the
QuickTime>extension (it returns empty if QuickTime is not available).

Paul Foraker
White Feather Software

Compacting a new resource fork

Posted: 12/6/97
If an XCMD adds a resource fork to a currently open stack, HyperCard
doesn't know about it. When a stack is compacted, and HyperCard does
not know that the stack has a resource fork, the resource fork is
not preserved after the compaction. Any newly-added resources will
be lost.

Jacqueline Landman Gay
HyperActive Software

Beware of duplicate XCMDs

Posted: 12/5/97
Beware when more than one stack in use contains the same external
function. If the versions of the XFCN are not the same, the older
version can respond to commands intended for the newer version, in some 
cases causing serious crashes and stack corruption.

Xavier Bury
President, ITCS

Scripts called from x-windows

Posted: 11/24/97
Scripts with errors will simply not run if called from an external
window. There is no error message or dialog, it's just that nothing
happens. Try calling the same script from the message box. It will
probably give you an error dialog, and direct you to the offending

Jacqueline Landman Gay
HyperActive Software

Resource fork size limits

Posted: 11/24/97
Regarding the 16 megabyte limit -- the limit is on the resource fork of 
the stack file, not on the data fork. HyperCard limits the size of the
data fork to 512 megabytes, so there's lots of room for HyperCard
objects. However, the Macintosh Resource Manager limits the size of a
resource file to 16 megabytes, which is easy to reach with large
sounds. It also limits the number of resources you can store in a
resource file to 2727, which is possible to reach with many icons,
although I can't remember if I've ever heard of anyone actually bumping 
into it.

So, if you have a stack that's larger than 16 megabytes, you can
breathe a sigh of relief, unless it has grown that large chiefly by
means of large resources, such as sounds or pictures.

Kevin Calhoun
Apple Computer, Inc.

Up to top | HyperCard Tips and Tricks