Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!plaid!chuq From: chuq@plaid.Sun.COM (Chuq Von Rospach) Newsgroups: comp.sys.mac.hypercard Subject: HYPER-HACKERS Digest Vol. 1 #3 Message-ID: <33113@sun.uucp> Date: Thu, 5-Nov-87 17:37:25 EST Article-I.D.: sun.33113 Posted: Thu Nov 5 17:37:25 1987 Date-Received: Sun, 8-Nov-87 10:32:38 EST Sender: news@sun.uucp Lines: 148 HYPER-HACKERS Digest Vol. 1 #2 Subjects: Eliminating the card window Problems with hiding the card window Re: HYPER-HACKERS Digest Vol. 1 #2 (Attaching new icons to Stacks?) searchscripts script Keydown messages -------------------------------- Date: Fri, 30 Oct 87 14:55:57 PST From: PUGH@NMFECC.ARPA Subject: Eliminating the card window You can get rid of your screen altogether by "set visible of cardwindow to false" Jon -------------------------------- Date: Fri, 30 Oct 87 15:11:21 PST From: PUGH@NMFECC.ARPA Subject: Problems with hiding the card window One problem with hiding the card window is that Hypercard ignores all keyboard input after that. You cannot do a command-m to get the message window or use any function keys on the extended keyboard. It also ignores blind typing in this mode. The only thing to do is pull down the message menu item. This is completely bogus! I would classify it as a bug since getting rid of the window under MultiFinder is a desired thing and it would be nice to be able to get it back. Currently I use this script: set visible of card window to false put "Set visible of card window to true" show msg Jon -------------------------------- Date: Mon, 2 Nov 87 06:06:08 PST From: halff@nprdc.arpa (Henry Halff) Subject: Re: HYPER-HACKERS Digest Vol. 1 #2 > Subject: Attaching new icons to Stacks? > In Goodman's "Hypercard Handbook" he makes a vague reference to attaching > new icons to stacks that one plans to distribute. How is this done? Open your Hypercard stack in ResEdit. Choose NEW from the file menu and ICON from the popup menu. Then choose NEW again from the file menu. You'll get a blank window in which you can draw your icon. Close and save the icon you draw and repeat the NEW choice for as many icons as you want to draw. When you're done, quit Resedit, saving everything. Then open the same stack in Hypercard. When you choose an icon for one of your buttons, you'll see the icons you drew appear (as if by magic) in the icon window. > And while I'm asking: how about iconifying snippets of clip art? You can COPY (in the EDIT menu) little Bitmap rectangles from Macpaint or Hypercard and paste them into the icon editing windows in Resedit. On a 1 meg machine, Resedit and Macpaint will fit in a switcher set, but Resedit and Hypercard will not fit in the same set :-(. -------------------------------- Date: 3 Nov 87 12:55 PST From: newman.pasa@Xerox.COM Subject: searchscripts script I just discovered a script in the home stack that I did not know about, and have not seen documented anywhere. It is called searchscripts, and it takes two arguments: a "pattern" and a stack name. It searches the scripts of the stack named for the string pattern, and brings up the editor in all the right places. Once in the editor, you execute a find command (yeah, it should be better integrated, but ...), and there you are! Now you know how to find all the places where you called foo but wanted to call bar. I think the script could be changed to a global search and replace command too. -------------------------------- Date: Wed, 4 Nov 87 11:06 EST From: David Bogartz Subject: Keydown messages The scripts below show a quick and very dirty way to get HyperCard to send a message when the user presses a key (other than return, tab, and the arrow keys). It doesn't work for number keys, and it probably isn't right for some applications, but it's simple and will probably work in many cases. The basic idea is that there is an idle handler in the background script that looks in the message box and grabs whatever is there. Then, for each keystroke, it generates the event "key" with the char that the user pressed as a parameter. The trick is how to deal with the message box. It looks like the message box is hidden, but in point of fact you can't have the message box hidden because (as far as I can tell) whenever you put something into the message box, HyperCard shows it, even if the screen is locked. So I have it visible, but offscreen. (Of course, this only works on a small screen Mac.) This application lets the user press the keys A through G to play the respective notes A through G on the harpsichord keyboard. Background script ================= on idle put the message box into k if k is not empty then repeat with i = 1 to length(k) do "key " & quote & char i of k & quote end repeat put empty into the message box end if end idle on key c play "harpsichord" tempo 200 c end key Stack script ============ on openStack set the loc of msg to -473, 345 set blindtyping to true end openStack ============ I'd be interested in any feedback or improvements on this code that you may have. If you send messages directly to me, I will summarize to the net. David S. Bogartz dsbogartz@amherst.bitnet *********************************** End of HYPER-HACKERS Digest