[comp.sys.mac.hypercard] Hyper-Hackers Digest Vol. 1 #5

chuq@plaid.Sun.COM (Chuq Von Rospach) (11/21/87)

                    HYPER-HACKERS Digest Vol. 1 #4

                              Subjects:

                          A limitation in HC
                              Magic Sac
                             doFKEY XCMD
                            Visual Effects
                Locking and unlocking fields made easy

-----------------------------------
Date: 	Mon, 16 Nov 87 16:54:40 PST
From: PUGH@NMFECC.ARPA
Subject: A limitation in HC

Well, here's a trick Hypercard can't seem to do.
type 9 with commandKey and shiftKey  -- could call up an FKEY
Anyone wanna prove me wrong?

-----------------------------------
Date: 	  Tue, 17 Nov 87 13:02:19 PST
From: PUGH@NMFECC.ARPA
Subject:   Magic Sac

Someone asked about whether Hypercard worked with the Atari Magic Sac.

I do not believe so.  As I last heard this Atari add on uses the old 64K ROMs
to do a Macinotsh emulation and as such will not support Hypercard, which
requires at least the 128K ROMs. Now I suppose you have to upgrade your Magic
Sac.  :-) 

-----------------------------------
Date: 	  Tue, 17 Nov 87 14:36:29 PST
From: PUGH@NMFECC.ARPA
Subject:   doFKEY XCMD

Here is a Hypercard stack that contains an XCMD that merely calls
an FKEY.  This was absurdly simple to do, but very very useful.
Now you can assign FKEYs to the USS Saratoga's function keys 
(while in Hypercard) and make buttons call FKEYs.  I now have a 
single key to press to take me from b&w to color thanks to the 
Switch-a-Roo FKEY posted last digest or so.

(This file must be converted with BinHex 4.0)
:"N4[4NY&@3"69%&,9dP-4!#3""eJ!*!%YBS!!!J!8e4"5rq3"2Y,%N!!N!-)!!!
GB!!!#!#3$!%!!!S'!*!$!3!!#fF!!!MC!*!4"3#3r`#3r`#3J)!!N!-)!*!$L!!
L!)J!)J#)L#)LL)JL)SLU)UU)UL+Uc+ScUXbU-kVZUVZUlUUlUZklZqlZZl[Zrl[
rl[qlrqlrZrq3!l[rri!3!L!"#%!%rj!)L#+))SJLL#)4)N5)%5*%L-5!$'K$!M!
QX6!$'pM!$)fU!+S!UJ#U!)JL95+))P8LL&8L9BK9)P9hhAIGGpehhB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QpXDh-ZN!0
,AJ!!!:

-----------------------------------
Date: 	  Wed, 18 Nov 87 17:31:10 PST
From: PUGH@NMFECC.ARPA
Subject:   Visual Effects

A bit of trivia:

You can stack visual effect commands so that you get a series of effects.  A 
good example is this:

visual effect dissolve to inverse
visual effect dissolve

Check it out and see what happens.  The important questions are, is there a way 
to turn off any visual effects that are queued, and can you tell if and/or 
what visual effects are queued?

Why do I care, you may ask?  I wanted to put a handler in my Home stack that
would detect arrow key events and queue an effect for them, since they don't
have any nice effect by default.  Well, that's where I found out that effects
are cumulative.  I would like a string returned that tells what effects are
queued, like "wipe slow to black, dissolve to inverse, scroll up" for that
list of effects.  That wouldn't be too hard would it?  This way I could even
trap effects I don't like.  Isn't that what object programming is all about?

-----------------------------------
Date: 	  Thu, 19 Nov 87 11:11:06 PST
From: PUGH@NMFECC.ARPA
Subject:   Locking and unlocking fields made easy

Here is a script to install in your Home stack if you get tired of
changing data in locked fields.  Instead of the choose field tool,
double click field, turn lock text off, click OK, choose browse tool,
change text, choose field tool, double click field, turn lock text on,
click OK, and choose browse tool, (which can get a mite tiresome), just
use Option-Click on a field (without a script in it) to unlock it, and
Command-Click to turn it back on.

This passes a mouseUp through the unlocked field because you have the
Commandkey down, which puts the text into the msg box and displays it.
The script hides the msg box, so it flashes on the screen momentarily.
This does not interfere with the normal operation of the Commandkey on
locked text items.

Hypercard could use andThen and orElse operators for it's boolean evaluations.
That or if the if statement evaluation was shortcutted by default.

This script uses a command-click on an unlocked field to lock it and an 
option-click on a locked field to unlock it.

on mouseUp
  if the optionKey is down then
    get the name of the target
    if it contains "field" then
      if lockText of it then set the lockText of it to false
    end if
  else if the commandKey is down then
    get the name of the target
    if it contains "field" then
      if lockText of it is false then
        hide msg
        set the lockText of it to true
      end if
    end if
  else
    pass mouseUp
    exit mouseUp
  end if
end mouseUp

***********************************
End of HYPER-HACKERS Digest

---
Chuq "Fixed in 4.0" Von Rospach			chuq@sun.COM	Delphi: CHUQ

john@felix.UUCP (John Gilbert) (11/24/87)

>Date: 	  Wed, 18 Nov 87 17:31:10 PST
>From: PUGH@NMFECC.ARPA
>Subject:   Visual Effects
>
>A bit of trivia:
>
>You can stack visual effect commands so that you get a series of effects.  A 
>good example is this:
>
>visual effect dissolve to inverse
>visual effect dissolve
>
>Check it out and see what happens.  The important questions are, is there a way 
>to turn off any visual effects that are queued, and can you tell if and/or 
>what visual effects are queued?
>
>Why do I care, you may ask?  I wanted to put a handler in my Home stack that
>would detect arrow key events and queue an effect for them, since they don't
>have any nice effect by default.  Well, that's where I found out that effects
>are cumulative.  I would like a string returned that tells what effects are
>queued, like "wipe slow to black, dissolve to inverse, scroll up" for that
>list of effects.  That wouldn't be too hard would it?  This way I could even
>trap effects I don't like.  Isn't that what object programming is all about?


I may have mis-understood when I played with these things, but I don't think
that the effects are "stacked".  It seems to me that a command like:

    visual effect dissolve to inverse

is executed immidiately, operating on the current card.  I believe this is
true for visual effects which go "to <some pattern>" other than a new
card.  I guess this includes to black, to white, to grey, to inverse.

On the other hand, setting the visual effect with:

   visual effect dissolve

with no target pattern specified is applied to movement to the next
card, as long as it is done within some (as yet completely understood by me)
scope of the script.  I usually do it right before I issue the 'go' command.
I am pretty sure the effect is lost if you set it and then exit the current
script (message handler?).  I know if I specify an effect and lock the screen,
or while the screen is locked, unlocking the screen does not use the effect.
I wish it would myself, as I find most of my movement involves locking the
screen.


--
John Gilbert
!trwrb!felix!john