Quintessential XCMDs

J. Landman Gay jacque at hyperactivesw.com
Wed Dec 25 17:14:01 EST 2002


On 12/25/02 6:02 AM, Geoff Canyon wrote:

> Alas, I don't know the available XCMDs well enough to know what each of 
> the ones on the list does. I'm curious, though -- what were the seven 
> and what do they do?

I just knew somebody was going to ask me that. ;) I had to go back and 
re-read the list, and ended up making some adjustments the second time 
through. Now I only see five that MetaCard can't do one way or another:

XFCN,MoveToTrash -- we can do this on Macs with an AppleScript, but I 
don't think there is an easy way to move a file to the trash on other 
platforms. Renaming the file to change its location may work on OS X and 
the Unixes, but I haven't tried it.

XFCN,SetVisible -- this sets the visibility of a file on disk.

XFCN,stripGarbage -- This is one whose function I don't know, so I left 
it in the list. If it just removes the extra junk padding at the end of 
a stack file, we wouldn't need it because MetaCard doesn't accumulate 
junk the way HyperCard files do. But maybe it does something different.

XCMD,PrintDoc -- if this one just prints stack-generated files, then we 
can do it. But I think it prints other types of files.

There are three others we can do in MetaCard, but only by writing more 
complex handlers that loop through files counting things. The following 
three XFCNs would be a quicker way to get the job done:

XCMD,CopyFolder -- we'd have to loop through the files, reading and 
rewriting each one; this does it in a single call.

XFCN,FolderSize -- we'd have to loop through the files, adding up their 
sizes. On a Mac you can get this info directly with an AppleScript, but 
I don't think you can do it on other platforms.

XFCN,countNulls -- we'd have to read in a file, loop through the 
contents, and count the null characters. Though, to be honest, I can't 
imagine why one would need to do this.

Don't take my word as authoritative though, I probably missed something. 
It was a long list.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the metacard mailing list