• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Hypercard: What are all of the commands?

LC_575

6502
Does anyone know of a website or in-print literature that provides a full glossary of all Hypercard script commands? I need to know how to get HyperCard to move a folder's contents and drop it on a printer.

 
Not sure if this helps, nor if it would work properly, but desktop printers are actually folders. It may just be a matter of moving a file from one folder into another.

 
The big difference between the later (v.2) HyperCard "developer's kit" that was sold and the HyperCard client that was given away was the set of manuals, which are not available as PDFs on Apple's servers. They are relatively uncommon, because not everyone fancied him/herself as a "developer." The key one was the Scripting manual, with detailed information re. the commands.

What version of HyperCard are you working with?

 
It appears the "Put" command will work. Now here's another question: The Put command requires a textual expression (i.e. text in quotes, such as a directory). How to I tell the Put command to use the contents of a field as it's expression?

 
Put command syntax is

  • put expression preposition destination


e.g.:

  • put 256 into card field 3


A field can be a container, as in this example, or it can be an object, even an object that has a script. If so, then you can reference it (assuming it is field 1) in a put command simply as:

  • put field 1 into destination


I just tried this in a dummy stack and it works, but I had to specify the destination, as in:

  • put field 1 into card field 3
     
    or
     
    put field 1 into background field 3


Hope this helps.

 
Your question in fact concerned how to use the put command to refer to the contents of a field. I tried to answer that question, although there are numerous permutations that I did not go into.

You are now asking something else. In response, I will say that it would likely be necessary to use HyperCard 2.3 or 2.4 and System 7.5 or above to do what you want, assuming that what you want is to copy files from x to y through a script operating at the Finder level. As far as I know, that would involve knitting together HyperTalk and AppleScript, which is perfectly doable but is certainly not a trivial thing to do without a little more information than you are likely to get on this forum.

I do not think that what you describe is possible in Hypercard v. 1 and in Systems under 7.5, but then, I am not what anyone would call a HyperCard expert.

There are reference stacks in the standard installation of Hypercard 2.4 which go into some of this, and you ought to check these out if possible. There may also be freeware stacks "out there" that are even better. But the scripting manual is reasonably detailed, as it was intended for commercial (mostly small-time Shareware) developers who paid for it, and I would think that you are going to need the manual.

 
Do you know how to launch an application from Hypercard? I've never used Hypercard, but it seems that if you could launch an application, you could just have it launch an AppleScript in the same way, then have the AppleScript take care of all the file moving.

I am still not sure what will happen when you move the file into the printer. Normally when you drag a file onto a printer, it creates a print job without literally moving the file into the printer. Whereas if you specifically move the file into the printer, something might happen similar to when you attempt the drag and drop with extensions off. (File physically moves into the printer and doesn't print.)

I'd check and see if there's an AppleScript Dictionary in the Print Monitor or Desktop Print Monitor extensions. Maybe there's a command that will do just what you want! It seems like a thing people would often want to do.

 
Applescripts are launched with the do command; in Applescript, by contrast, Hypertalk scripts are launched by (as I recall) the do script command. But there are fussy things that happen around the edges in order to cope with errors or in order to close programs after opening them and the like; people talk about HyperCard as easy to program, but "easy" is a relative word, as the nine year old and the ninety year old facing a flight of stairs would tell you. It's only easy when you are able to do it....

HyperCard can certainly open Applications and so forth, but it relies on Apple Events for most anything it wants to do outside of its own world of cards and stacks, and that means you need to be running System 7 and a version of HyperCard written for it; and to script the Finder requires System 7.5 or better.

 
I've resorted to having Hypercard act as a frontend while AppleScript does the real work. Except I can't figure out how. In fact, I'm not sure whether this should be Hypercard based, AppleScript based, or an intermixture of the two.

This is what I want to do. I want to take a directory, which would be supplied by a field in the stack, move the contents of that directory to another directory (the printer IRL), also supplied by a field, wait a specified number of seconds, again from field, and then finally repeat indefinitely until Command-S is pressed.

 
I have one of the old scripters' guides around here, but offhand I remember that HyperTalk has some basic file I/O that you could use to write your own file copier. I don't remember if there's any way to enumerate the contents of a folder, which you'd obviously need to move/copy that folder's contents to a desktop printer.

 
Slight apologies for resurrecting this old thread, but I discovered yesterday that something that i did not think existed when the thread was "live" actually does exist: Hypercard PDF manuals.

A certain gardening site known to us has them on there, bundled with the final version, 2.4.1.

 
Back
Top