From: wndalouise@aol.com (WndaLouise)
Newsgroups: comp.sys.hp48
Subject: Re: none
Date: 8 Feb 1998 05:15:30 GMT
Lines: 360
Message-ID: <19980208051501.AAA24550@ladder03.news.aol.com>
NNTP-Posting-Host: ladder03.news.aol.com
X-Admin: news@aol.com
Organization: AOL http://www.aol.com
References: <MAPI.Id.0016.006c656a612020203030303530303035@MAPI.to.RFC822>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Xref: republic.btigate.com comp.sys.hp48:6524

Something fun ( and partly hidden from view )

Program: Pseg
PICT Segmentizer...???
Does all the things that you would like ->GROB to do.
Pseg has a Double Click Feature to remind you of the Input Parameters.
A String, 
the Font Size (1-3), 
the Pixels to Fill, which is the Maximum width of the GROB that you would like
to create,
x Gap, which is the number of Pixels between each Character,
y Gap, which is the number of pixels between the lines Created, Pseg also pays
attention to NewLines, but keep in mind when setting this that while x gap
calculates the width of each character, y gap does not, so that you have to
take into consideration the 1 pixel gap under all characters, occasionally
filled with lowercase tails.
		INPUT	
		5:	String
		4:	Font Size (1-3)
		3:	Maximum Pixel Width
		2:	x Gap
		1:	y Gap


Program: Bep
Makes any one of four BEEPing noises;
1= long low burb
2= medium urp
3= high bip
4= very high pop
		INPUT	
		1:	Selection (1-4)


Program: Clik?
Counts the Number of Times the Key is Hit, Minus One.


Program: Clic?
Program: Cl\161c?
Input Click?:
Takes one Object from the Stack which may be a String or a List. 
Clic? Checks to see if the Activating Key was hit Twice, If it was then the
String or List is used to Prompt the User for what is Probably a Complex set of
Datum...
If the Activating Program Key was hit only Once, Then Clic? assumes that the
Data Necessary for the Program that it is Connected With, Is Already on the
Stack, Ready To Go, So it Throws the String or List Away.
If the Object Fed to Clic? is a String, then a Quite ordinary INPUT process
will occur.
If the Object is a List, then Clic? will act on each of the Items within the
List to Modify the Text Display, &/or Collect Data. 
Items on the List May include; in any Order:
String: 	For Conventional INPUT.
List:		Defers to an Another Program Yes?.
Name:	Name of a Program will be EVAL.
Program:	EVALuates it.
GROB: 	Must be 21 x 8 Pixels- 
		And is made into a Null Menu Bar.
		INPUT
		1:	String
or 
		1:	{ $ { } N << P >> GROB } 


Program: Grab
GrabOut Removes the Fatty Empty Boarders from a GROB.
This has a Double Click Feature, such that if you Double Click on Grab when the
object on 1: is not a GROB, Grab will perform the Grab function on PICT, and
Return to the Stack the Corner Delimiting Positions of Where the Selected
Object Was.
		INPUT
		1:	GROB


Program: Yes?
In its rawest form, it simply displays a String Prompt and a PreCreated
Temporary Menu that allows the user to choose between a Yes or No response
during a programs Input Sequence.
Beyond that, Yes? allows the programmer to insert a Temporary Menu of her or
his own or install a Sub-Program whose soul purpose is to create a 
Temporary Menu.
Input consists of a String Prompt of some sort, and a Temporary Menu, if
Desired.
		INPUT
		1:	String
or
		1:	{ String  { TMENU } }
or
		1:	{ Str << TMENU >> }

To Load these into your 48 Semi-Directly, 
Youll have to snip each one out, 
Store each in the most generic Text File that you have available, 
Prefix the program with this Prefix:
%%HP: T(3)A(D)F(.);
and name the file with the appropriate name. 
then load it into your 48.
i think that should work...
if it doesnt, study a program that youve pulled out of your 48 onto your
computer, and duplicate the format with these programs as the new bodies.
......................................
Pseg
    \<<
"5: String  4:  Font
3:   Pixels to Fill
2:  x Gap  1: y Gap"
:&: Cl\161c? EVAL 5
ROLL \->STR DUP SIZE
0 7 PICK \->GROB SIZE
5 ROLL + DUP B\->R 5
ROLLD SWAP DROP 6
PICK R\->B SWAP BLANK
0 0 0 { "/" "*" "-"
"+" "," ";" " " "("
}
      \<< DUP DUP
SIZE BLANK \=/
        \<< DUP SIZE
1 - # 1d OVER 1 +
BLANK ROT 1 - # 0d
\-> $ y \162 \<- \->
          \<<
            WHILE $
\-> # 0d 2 \->LIST \-> y
2 \->LIST SUB \162 ==
            REPEAT
'\->' 1 STO+
            END
            WHILE $
\<- # 0d 2 \->LIST \<- y
2 \->LIST SUB \162 ==
            REPEAT
'\<-' 1 STO-
            END $ \->
# 0d 2 \->LIST \<- y 2
\->LIST SUB
          \>>
        \>> IFT
      \>> \-> f sz gx
gy $ \162 \164 x y b \<-\->
Hgrb
      \<< TEXT CLLCD
\164 1 \162
        FOR \183 "  "
\162 \183 - + 4 DISP $ \183
\183 SUB DUP f \->GROB
Hgrb EVAL \-> \Ga \GD
          \<< \<-\-> \Ga
POS
            \<< x 'b'
STO
            \>> IFT \GD
SIZE DROP B\->R DUP 3
ROLLD x + sz > \Ga 10
CHR == OR
            \<< 4 :&:
Bep EVAL DUP SIZE
gy + BLANK { # 0d
# 0d } ROT REPL 'y'
gy STO+
              CASE
\Ga " " == \Ga 10 CHR
== OR
THEN 0 'x' STO SWAP
DROP 0
END \<-\-> \Ga POS
THEN 0 'x' STO 1
END DUP b 0 \=/
\<< b R\->B y gy - R\->B
2 \->LIST sz R\->B y
R\->B 2 \->LIST \-> \Gg \Gl
  \<< \Gg \Gl SUB SWAP
NEG OVER SIZE BLANK
NEG \Gg SWAP REPL NEG
SWAP
  \>> Hgrb EVAL DUP
DUP SIZE BLANK ==
  \<< DROP # 0d # 0d
BLANK
  \>> IFT DUP SIZE
DROP B\->R DUP 0 >
  \<< gx +
  \>> IFT 'x' STO
# 0d y R\->B 2 \->LIST
SWAP REPL
\>>
\<< 0 'x' STO DROP
\>> IFTE 1
              END 0
'b' STO
            \>> 1
IFTE
            \<< \GD x
R\->B y R\->B 2 \->LIST
SWAP REPL 'x' ROT
gx + STO+
            \>> IFT
          \>>
        NEXT :&:
Grab EVAL
      \>>
    \>>
......................................
 Bep
    \<< { { 20 15 .5
} { 100 20 .1 } {
2000 500 .02 } {
4000 1000 .005 } }
SWAP GET EVAL \-> a b
c
      \<< -56 CF RAND
a * b + c BEEP -56
SF
      \>>
    \>>
......................................
  Clik?
    \<< 0
      WHILE .2 WAIT
KEY
      REPEAT DROP 1
+
      END 4 :&: Bep
EVAL
    \>>


......................................
  Cl\161c?
    \<< .2 WAIT KEY
      \<< DROP DUP
TYPE 5 \=/
        \<< 1 \->LIST
        \>> IFT
RCLMENU \-> \200\201 \|v
        \<< 1 \200\201 SIZE
          FOR $ 3
:&: Bep EVAL \200\201 $
GET DUP TYPE \-> \162
            \<<
              CASE
\162 2 ==
THEN "" INPUT OBJ\->
END \162 5 ==
THEN DUP SIZE 1 ==
  \<< EVAL
  \>> IFT :&: Yes?
EVAL
END { 6 7 8 } \162 POS
THEN EVAL
END \162 11 ==
THEN DUP DUP 3 DUPN
6 \->LIST TMENU
# 238076d SYSEVAL
END \162 12 ==
THEN DTAG OBJ\-> DROP
\-> \Ga \Gb
  \<< \Ga "" INPUT DUP
"" ==
    \<< DROP \Gb EVAL
    \>>
    \<< OBJ\->
    \>> IFTE
  \>>
END
              END
            \>>
          NEXT \|v
MENU # 238076d
SYSEVAL
        \>>
      \>>
      \<< DROP
      \>> IFTE
    \>>


......................................
 Grab
    \<< :&: Clik?
EVAL DUP
      \<< PICT RCL
SWAP
      \>> IFT SWAP
DUP DUP TYPE 11 ==
      \<< DUP2 SIZE
BLANK \=/
      \>> 0 IFTE
      \<< SIZE DUP2 1
- SWAP 1 - SWAP 4
ROLL 4 ROLL DROP 0
1 ROT SWAP R\->B
BLANK # 0d # 0d \-> g
x y v h m w
        \<<
          WHILE g
# 0d w 2 \->LIST x w
2 \->LIST SUB h ==
          REPEAT
'w' 1 STO+
          END
          WHILE g
# 0d y 2 \->LIST x y
2 \->LIST SUB h ==
          REPEAT
'y' 1 STO-
          END # 1d
y 1 + BLANK 'v' STO
          WHILE g m
# 0d 2 \->LIST m y 2
\->LIST SUB v ==
          REPEAT
'm' 1 STO+
          END
          WHILE g x
# 0d 2 \->LIST x y 2
\->LIST SUB v ==
          REPEAT
'x' 1 STO-
          END g m w
2 \->LIST x y 2 \->LIST
SUB SWAP
          \<< x w 2
\->LIST PX\->C "PMAX"
\->TAG m y 2 \->LIST
PX\->C "PMIN" \->TAG
          \>> IFT
        \>>
      \>>
      \<< ROT DROP2
      \>> IFTE
    \>>

......................................
Yes?
    \<< DUP TYPE 5 ==
      \<< EVAL { 6 7
8 } OVER TYPE POS
        \<< EVAL
        \>> IFT
      \>>
      \<< {
GROB 21 8 0000003BF1F03B1C00C8F130C8F130C810C0C8FD30000000
        \<< 1 CONT
        \>> } DUP DUP
{
GROB 21 8 FFFFF19905A11925A11825A11825A1982FF19905A1FFFFF1
        \<< 0 CONT
        \>> } DUP DUP
6 \->LIST
      \>> IFTE
RCLMENU \-> \200\201
      \<< SWAP CLLCD
1 DISP 3 FREEZE
TMENU HALT \200\201 MENU
# 238076d SYSEVAL
      \>>
    \>>
