Home of the original IBM PC emulator for browsers.
[PCjs Machine "ibm5150"]
Waiting for machine "ibm5150" to load....
________________________________________________________________________
Appendixes 277
________________________________________________________________________
APPENDIX 1: PADTALK ERROR MESSAGES
This appendix contains a complete set of error messages you may
encounter using the PADtalk scripting language. The compiler error
messages are listed first, followed by the runtime error messages.
For general error messages received when working with HyperPAD features
not involving PADtalk, see "General Error Messages" in the User's Guide.
COMPILER ERROR MESSAGES
When you compile a script from the Script Editor or the message box,
HyperPAD checks for any PADtalk syntax errors you have made, displaying
an error message if necessary.
The messages produced by the HyperPAD compiler are listed below in
numerical order. Each error message is described briefly.
0. General syntax error.
The compiler has detected an unknown syntax error. Please report this
condition to Brightbill-Roberts.
1. "handler" or "function" expected.
HyperPAD was unable to compile a handler or function because it was not
preceded by a handler or function keyword.
2. Reserved.
Reserved for future use.
3. "begin..end" block must follow handler or function.
HyperPAD was unable to compile a statement following a handler or
function keyword because the statement was not enclosed by a begin...end
block.
4. Reserved.
Reeserved for future use.
5. Reserved.
Reserved for future use.
6. Incomplete statement.
The compiler reached the end of a script before it expected to.
Check the syntax of your script and make any necessary corrections.
________________________________________________________________________
Appendixes 278
________________________________________________________________________
7. Reserved.
Reserved for future use.
8. Can't use "begin..end" block in message box or do command.
A begin...end block can only be used within a HyperPAD script.
9. String too long.
Your script contains a string that is too long.
A string used in a script cannot exceed 255 characters.
10. Identifier too long.
Your script contains an identifier that is too long, preventing HyperPAD
from compiling the handler or function in which the identifier is used.
An identifier in a script cannot exceed 255 characters.
11. "do" expected.
The compiler has encountered a while statement without a matching do.
12. "then" expected.
The compiler has encountered an if statement without a matching then.
13. "hyperpad" expected.
The compiler has encountered an exit to or pass to statement and expects
HyperPAD to be the destination reference.
14. "return" statement only allowed in functions.
HyperPAD has found a return statement in a handler.
15. Invalid or missing object reference.
The compiler has encountered a reference to an object that does not
exist, or one that does not suit the operation being performed.
16. Reserved.
Reserved for future use.
17. Invalid number of arguments for this property.
HyperPAD cannot compile your statement, because you have specified too
many or two few arguments for a property.
________________________________________________________________________
Appendixes 279
________________________________________________________________________
18. } expected.
The compiler has encountered an open brace without a matching close
brace.
19. Reserved.
Reserved for future use.
20. "of" expected.
The compiler has encountered a statement such as set, edit, or case
without a matching of.
21. ) expected.
The compiler has encountered an open parenthesis without a matching
close parenthesis.
22. Identifier can't be a destination reference.
The compiler has located the use of an identifier (such as a keyword
like begin) that cannot be used as a destination reference.
23. Invalid identifier in expression.
The compiler has encountered an expression that incorrectly uses an
identifier such as a function or a quoted string.
24. Page and/or pad reference expected.
The compiler has encountered a statement, such as go to, without a
required page or pad reference.
25. "pause" or "programDirectory" expected.
The compiler encountered a run command that uses the with preposition
with an identifier other than pause or program directory.
26. Identifier is not a property.
The compiler has encountered a statement that attempts to set or get
something that is not a valid HyperPAD property.
27. Can't set this property.
The compiler has encountered an attempt to set a property that cannot be
set; for example, you cannot set properties such as layer, markedLines,
currentLine, longName, ID, or longID.
________________________________________________________________________
Appendixes 280
________________________________________________________________________
28. Identifier can't be made global.
A global statement was encountered in which the identifier being
declared global was previously used as a local variable.
29. Quoted string not allowed.
The compiler has encountered a statement whose handler name is a quoted
string.
A statement must be in the form: handlerName [arm 1,arm 2,...]
where handlerName is the unquoted name of the handler.
30. ; expected.
The compiler has encountered consecutive statements without a semicolon
to separate them.
31. ( expected.
The compiler has encountered a close parenthesis without a matching open
parenthesis.
32. Reserved.
Reserved for future use.
33. Invalid parameter to "number of".
A number of function was encountered using a text parameter.
Check the required syntax for the number of function and try again.
34. Only 3 replies allowed in "answer" statement.
The compiler has encountered an answer statement with four or more
replies.
Check your answer statement.
35. "to" expected.
The compiler has encountered a statement, such as set, send, for, add,
convert, or write, without a matching to.
36. "from" expected.
The compiler has encountered a statement, such as subtract or read,
without a matching from.
________________________________________________________________________
Appendixes 281
________________________________________________________________________
37. "by" expected.
The compiler has encountered a multiply or divide statement without a
matching by.
38. Reserved.
Reserved for future use.
39. Reserved.
Reserved for future use.
40. "until" expected.
The compiler has encountered a statement, such as repeat or read, that
requires a matching until.
41. "end" expected.
The compiler has encountered a case statement without an end keyword.
42. : expected.
The compiler has encountered a statement, that requires a colon.
43. = expected.
The compiler expected to find a statement in the form, for statement for
<variable> = <number>, but the = sign was left out.
The compiler has encountered a for statement without the required
assignment operator.
44. Invalid container name.
The compiler has encountered a statement that contains an improper
reference to a container.
Make sure that your identifier reference is a valid identifier, i.e.,
one that starts with an alphabetic character, _ or $, and is followed by
only alphanumeric (A..2, O..9) characters, or the _ or $ character.
45. Duplicate handler name.
The compiler has encountered the use of a single handler name twice in
the same script.
46. Duplicate function name.
The compiler has encountered the use of a single function name twice in
the same script.
________________________________________________________________________
Appendixes 282
________________________________________________________________________
47. Invalid characters in container name.
The compiler has used an invalid character in a container name.
Use only the alphanumeric characters (A..Z and 1..9), or the $ and _
characters, in your container names.
48. "page" expected.
The compiler has encountered a pop statement without a page reference.
49. Page reference expected.
The compiler has encountered push statement without a page number.
50. More than one statement encountered.
You have entered an invalid statement into the message box and the
compiler cannot process it.
Make sure that you enter only a single statement in the message box.
51. Container name not allowed.
The compiler has encountered a do statement where a container name is
improperly used as the operand.
52. Can't use reserved word as container name.
The compiler has encountered the improper use of a reserved word such as
begin as a container name.
53. Can't change local container to global.
The compiler has encountered an attempt to change a local container into
a global variable.
54. Container is already global.
The compiler has encountered a global statement whose operand is already
a global.
Delete the global statement from your script, or place the global
statement at the beginning of the script.
55. "left" or "right" expected.
An effect has been used, the direction it expected is missing.
________________________________________________________________________
Appendixes 283
________________________________________________________________________
56. Effect name expected.
The compiler has encountered a visual statement without a matching
effect name.
57. Can't use this direction with the specified effect.
The compiler has encountered a visual statement with an invalid
direction.
Check the syntax of the effect you chose and try again.
58. "delay" expected.
The compiler has encountered a visual statement that uses the with
preposition, but the delay is not specified.
59. Object reference expected.
The compiler has encountered an edit statement without a valid object
reference.
60. "script" expected.
The compiler has encountered the statement, edit the, without a proper
script reference.
61. Incomplete expression.
The compiler has reached the end of an expression unexpectedly.
62. "pause" already specified.
The compiler has encountered a run statement with two pauses.
63. "directory" already specified
A run statement was encountered in which the program directory keyword
was used more than once.
64. Sort option already specified.
Conflicting options were encountered in a sort statement.
65. Reserved.
Reserved for future use.
________________________________________________________________________
Appendixes 284
________________________________________________________________________
66. "dateTime", "numeric", "text", "ascending", "descending" or "by"
expected.
The compiler has encountered a sort by statement without a sort
specification.
67. Background field reference expected.
The compiler has encountered a find statement in which the "in"
parameter is specified, but the reference to a background field not.
68. "paramCount" and "params" do not take arguments.
The compiler has encountered a paramCount or params function that
incorrectly uses arguments.
69. "param" must take one argument.
The compiler has encountered a param function that uses zero or more
than one argument.
70. Color name expected.
The compiler has encountered a set statement that requires a color name.
71. "chars", "words", "items" or "lines" expected.
The compiler has encountered a chunking statement where the chunking
reference is not found.
72. , expected
An incorrect number of arguments to a command has been encountered by
the compiler.
73. " expected.
The compiler has encountered an open quote without a matching close
quote.
74. Background reference not allowed with page id.
A background has been specified with a page referred to by its ID.
Since pages referenced by their ID are unique, the background
specification is unnecessary.
75. Invalid or no target object specified in "send".
The compiler has encountered a send statement that does not properly
refer to a HyperPAD object.
________________________________________________________________________
Appendixes 285
________________________________________________________________________
RUNTIME ERROR MESSAGES
Runtime errors occur as HyperPAD executes a compiled script. When a
runtime error occurs, HyperPAD displays an error message with two
choices: <<Script>> and <Cancel>. If you select <Cancel>, HyperPAD will
stop execution of the script. If you select <<Script>>, HyperPAD loads
the Script Editor and displays the script that caused the runtime error.
Note: If you compiled the original script with the Debug option on,
HyperPAD will place the cursor on the line that caused the error. If the
Debug option was off at the time of the compile, the cursor will be
placed at the top of the script after an error.
0. Unknown runtime error
Your script has generated an unknown runtime error. Please report this
condition to Brightbill-Roberts.
1. Argument to arithmetic routine is not a number
Your script attempted an arithmetic operation upon a string instead of a
number.
2. Argument to "param" is not a number
An argument passed to the param function was text, rather than a number
as required.
3. Argument to "param" is less than 1
You passed a number less than 1 to the param function.
The number passed to the param function must be between 1 and the number
of parameters. If you pass a number larger than the number of
parameters, the param function will return empty.
4. Argument to "print" is not a number
The number of pages parameter passed to a print command contained text,
rather than a number as required.
5. Argument to "character" is not a number
A character chunk parameter did not evaluate to a number.
6. Argument to "word" is not a number
A word chunk parameter did not evaluate to a number.
7. Argument to "item" is not a number
An item chunk parameter did not evaluate to a number.
________________________________________________________________________
Appendixes 286
________________________________________________________________________
8. Argument to "line" is not a number
A line chunk parameter did not evaluate to a number.
9. Invalid object ID
An object was referred to with a non-existent ID number.
10. Can't find object ID
An object was referred to with a non-existent ID number.
11. Can't find object offset or name
An object was referenced using a non-existent name or number.
12. Invalid characters in date/time format
An argument contained an unrecognizeed date or time format.
13. Parameter to function is not a number
An text argument was passed to a function that requires a number.
14. Reserved.
Reserved for future use.
15. Reserved.
Reserved for future use.
16. No corresponding "case"
A case statement has been evaluated with a selector that has no
corresponding case.
Use an otherwise statement to handle unexpected values for the selector.
17. Argument to unary minus is not a number
The minus sign was placed before a text value.
The minus sign can only be used with numeric arguments.
18. "pop" encountered with no previous "push"
The pop page command was executed with no page on the page stack.
Use the push statement to push pages onto the page stack.
________________________________________________________________________
Appendixes 287
________________________________________________________________________
19. Delay is not a number
The parameter specified as the delay for the visual command is not a
number.
20. Target can't be used with this operation
The target object is not being used in accordance with its type.
21. Invalid use of current object
The currentObject is not being used in accordance with its type.
22. Invalid number of arguments for function
A built-in function has been called with too many or too few arguments.
23. Invalid argument to "domenu"
The doMenu command has been called with an invalid choice.
The parameters to doMenu are the commands exactly as displayed in the
menus; a dimmed choice cannot be used as an argument to doMenu.
24. Invalid chunking parameter
An argument used in a chunking expression is either negative or not a
number.
25. Invalid argument to "keypress"
The keyPress message has been received, but the argument is not numeric.
26. Can't modify scripts at current user level
An attempt to edit a script was made with the user level less than
Scripting.
The userLevel property must be set to Scripting to edit scripts.
27. "true" or "false" expected
An attempt has been made to set a property that requires a boolean value
to something other than true or false.
28. Accelerator key out of range
An attempt has been made to set the acceleratorKey of a button or field
to a value less than 0 or greater than 255.
________________________________________________________________________
Appendixes 288
________________________________________________________________________
29. Invalid coordinates
An attempt has been made to set the rectangle or location to coordinates
that make it impossible to display the object on screen.
30. "on" or "off" expected
An attempt has been made to set a property that requires a value of on
or off to something other than on or off.
31. "layer" or "position" expected
An attempt has been made to set the tabbing property to a value other
than layer or position.
32. "thin" "fat" or "off" expected
An attempt has been made to set the cursor property to a value other
than thin, fat, or off.
33. Text size too big for operation
An attempt has been made to increase the number of fields in a container
to a number greater than 30,000.
34. Not enough memory to get field content
There is not enough memory for HyperPAD to make an internal copy of the
content of a field.
35. Invalid insertion point
An attempt has been made to set the insertPoint property of a field to a
value less than zero or greater than number of characters in field.
36. Invalid file number
An invalid number was used with the read, write, or close command.
Only numbers returned from open(), append(), or create() can be used as
a reference to a file.
37. Number expected for "chars"/"words"/"items"/"lines"
The read command was used with a non-numeric value specifying how many
characters, words, items, or lines to read from a file.
38. File has not been opened
A read, write, or close command has been used to refer to a file that is
not open.
________________________________________________________________________
Appendixes 289
________________________________________________________________________
Use open(), append(), or create() to prepare a file for use with read or
write.
39. Can't print without starting print job
A print command has been used with the printer property set to off.
40. Query expression must evaluate to "true" or "false"
The expression supplied to the query command does not evaluate to true
or false.
41. Invalid style
The style of a button or field has been set to an improper value for
that object type.
42. "top" or "left" expected
An attempt has been made to set the namePosition property of a field to
a value other than top or left.
43. "left", "right", or "centered" expected
An attempt has been made to set the align property of a button or field
to a value other than left, right, or centered.
44. Invalid argument to "send"
An attempt has been made to send an invalid message with the send
command.
Messages sent with the send command must be a single, non-hyphenated
word.
45. Math error - invalid
A floating point math error has occurred.
46. Math error - denormal
Your script generated a very small floating-point number resulting in a
possible loss of significance.
47. Math error - divide by zero
Your script attempted to divide by zero.
48. Math error - overflow
Your script generated an overflow in a floating-point operation.
________________________________________________________________________
Appendixes 290
________________________________________________________________________
49. Math error - underflow
Your script generated an underflow in a floating-point operation.
50. Math error - inexact
Your script generated a loss of precision in a floating-point operation.
51. Math error - invalid argument to math function
A built-in math function was called with a non-numeric argument.
52. Math error - loss of significance
Your script generated a loss of significance in a floating-point
operation.
53. Invalid number format
An attempt has been made to set the numberFormat property to an improper
value.
The numberFormat is a text value consisting of a number of zeros,
followed by a decimal point, followed by 0 or more zeros, followed by 0
or more pound signs (#).
54. Too much recursion
HyperPAD has run out of stack space, a condition caused either by a
handler that repeatedly calls itself or other nested handlers.
55. Invalid communications port setting
An improper value for the modem, baud, parity, stopBits, or dataBits
property was encountered.
56. Can't find page
An attempt has been made to a number less than zero or greater than the
number of pages in the pad.
57. Out of memory
An operation requiring a large amount of memory has been attempted at a
time when memory is low and cannot be recovered by HyperPAD.
This condition occurs when you have pending handlers on pages that
cannot all be contained in memory at the same time.
________________________________________________________________________
Appendixes 291
________________________________________________________________________
APPENDIX 2: KEY CODES
The following table contains all of the keystrokes recognized by
HyperPAD. Use the table for:
1. Determining the numbers passed to the keyPress handler. For example:
handler keypress(keyNumber);
begin
if keyNumber is 7181 then
answer "ENTER was pressed";
end;
2. Determining the text returned by the key() function. For example,
key(7181) returns "enter". The following example uses the key() function
to evaluate a keypress:
handler keyPress(keyNumber);
begin
get key(keyNumber);
if it is "ENTER" then
answer "the ENTER key was pressed"
else if it is "SHIFT+PGDN" then
go to the next page
else if it is in "0123456789" then
answer "A number was pressed";
pass;
end;
If the key pressed was a letter, number, or punctuation, then that
character is returned by key().
3. Determining special key combination for the record command. For
example,
record "{alt+f}{enter}";
________________________________________________________________________
Appendixes 292
________________________________________________________________________
Key: Key Code: Key: Key Code:
------------------------------------------------------------------------
ENTER 7181 CTRL+PGUP 33792
ESCAPE 283 CTRL+PGDN 30208
TAB 3849 SHIFT+UP 18488
SHIFT+TAB 3840 SHIFT+DOWN 20530
BACKSPACE 13592 SHIFT+LEFT 19252
SLASH 13615 SHIFT+RIGHT 19766
SPACE 14624 SHIFT+PGUP 18745
ALT+EQUAL 33536 SHIFT+PGDN 20787
ALT+DASH 33280 SHIFT+HOME 18231
CTRL+BACKSPACE 3711 SHIFT+END 20273
CTRL+ENTER 7178 F1 15104
ALT+SLASH 13808 F2 15360
ALT+PERIOD 13552 F3 15616
CTRL+MINUS 3103 F4 15872
BIGPLUS 20011 F5 16128
BIGMINUS 18989 F6 16384
PERIOD 13358 F7 16640
SHIFT+DEL 21294 F8 16896
UP 18432 F9 17152
DOWN 20224 F10 17408
RIGHT 19712 F11 34048
LEFT 19200 F12 34304
HOME 18176 ALT+F1 26624
END 20224 ALT+F2 26880
PGUP 18688 ALT+F3 27136
PLUS 20011 ALT+F4 27392
MINUS 18989 ALT+F5 27648
INS 20992 ALT+F6 27904
DEL 21248 ALT+F8 28416
________________________________________________________________________
Appendixes 293
________________________________________________________________________
Key: Key Code: Key: Key Code:
------------------------------------------------------------------------
ALT+F9 28672 ALT+V 12032
ALT+F10 28928 ALT+W 4352
ALT+F11 35584 ALT+X 11520
ALT+F12 35840 ALT+Y 5376
CTRL+F1 24064 ALT+Z 11264
CTRL+F2 24320 ALT+1 30720
CTRL+F3 24576 ALT+2 30976
CTRL+F4 24832 ALT+3 31232
CTRL+F5 25088 ALT+4 31488
CTRL+F6 25344 ALT+5 31744
CTRL+F7 25600 ALT+6 32000
CTRL+F8 25856 ALT+7 32256
CTRL+F9 26112 ALT+8 32512
CTRL+F10 26368 ALT+9 32768
CTRL+F11 35072 ALT+0 33024
CTRL+F12 35328 CTRL+A 7681
SHIFT+F1 21504 CTRL+B 12290
SHIFT+F2 21760 CTRL+C 11779
SHIFT+F3 22016 CTRL+D 8196
SHIFT+F4 22272 CTRL+E 4613
SHIFT+F5 22528 CTRL+F 8454
SHIFT+F6 22784 CTRL+G 8711
SHIFT+F7 23040 CTRL+H 8968
SHIFT+F8 23296 CTRL+I 5897
SHIFT+F9 23552 CTRL+J 9226
SHIFT+F10 23808 CTRL+K 9483
SHIFT+F11 34560 CTRL+L 9740
SHIFT+F12 34816 CTRL+M 12813
ALT+A 7680 CTRL+N 12558
ALT+B 12288 CTRL+O 6159
________________________________________________________________________
Appendixes 294
________________________________________________________________________
Key: Key Code: Key: Key Code:
------------------------------------------------------------------------
ALT+C 11776 CTRL+P 6416
ALT+D 8192 CTRL+Q 4113
ALT+E 4608 CTRL+R 4882
ALT+F 8448 CTRL+S 7955
ALT+G 8704 CTRL+T 5140
ALT+H 8960 CTRL+U 5653
ALT+I 5888 CTRL+V 12054
ALT+J 9216 CTRL+W 4375
ALT+K 9472 CTRL+X 11544
ALT+L 9728 CTRL+Y 5401
ALT+M 12800 CTRL+Z 11290
ALT+N 12544 ALT+TAB 45056
ALT+O 6144 ALT+SPACE 45568
ALT+P 6400 ALT+BACKSPACE 46080
ALT+Q 4096 CTRL+ALT 46336
ALT+R 4864 BOTHSHIFTS 47104
ALT+S 7936 CTRL+EQUAL 47360
ALT+T 5120 CTRL+INSERT 47616
________________________________________________________________________
Appendixes 295
________________________________________________________________________
The remaining keys will only be understood by HyperPAD. These key
combinations will not be understood by other programs (if you use the
record and playback commands to force keys into a running program).
Key: Key Code: Key: Key Code:
------------------------------------------------------------------------
ALT+SHIFT 47872 CTRL+RIGHT 51968
CTRL+1 48128 CTRL+DOWN 53248
CTRL+2 48129 CTRL+CENTER 53504
CTRL+3 48130 CENTER 53760
CTRL+4 48131 CTRL+HOME 54016
CTRL+5 48132 CTRL+END 54272
CTRL+6 48133 CTRL+SHIFT+HOME 54528
CTRL+7 48134 CTRL+SHIFT+END 54784
CTRL+8 48135 CTRL+SHIFT+I 55552
CTRL+9 48136 SPACEPRESS 55808
CTRL+0 48137 CTRL+BIGPLUS 56320
CTRL+DEL 50688 CTRL+BIGMINUS 56576
CTRL+SHIFT+UP 50944 ALT+ESC 56832
CTRL+SHIFT+DOWN 51200 SHIFT+INSERT 57088
CTRL+SHIFT+LEFT 51456 CTRL+SHIFT+PGUP 57344
CTRL+SHIFT+RIGHT 51712 CTRL+SHIFT+PGDN 57600
CTRL+RIGHT 51968 ALT 57856
CTRL+LEFT 52480 CTRL 58112
________________________________________________________________________
Appendixes 296
________________________________________________________________________
________________________________________________________________________
Appendixes 297
________________________________________________________________________
APPENDIX 3 WRITING EXTENSIONS
INTRODUCTION
Extensions are .EXE programs created using the Microsoft C compiler
(version 4.0 or later) or the Microsoft Macro Assembler (version 5 or
later). An extension consists of a number of routines that appear to
HyperPAD as handlers or functions. Sample uses for an extension are:
0 Display a graphics picture (like the supplied GX2 extension)
0 Send the content of a field to the COM1 port
0 Sort the lines of text in a field
0 Control a videodisk player
You can define new handlers or functions in an extension, or intercept
existing messages, like idle or select. You pass messages to external
handlers and call external functions just as you would any other handler
or function in a script. In fact, you can think of your extensions as
being a script that is made up of handlers and functions.
Extensions receive messages just before the pad script. If you define
extensions in your Home pad, the handlers and functions in that
extension will be accessible from every pad. If you define extensions in
any other pad, the handlers and functions will only be accessible from
that pad.
You can pass parameters between HyperPAD and the handlers and functions
in your extension. Each parameter is passed as a HANDLE to text (a
handle is a pointer to another pointer). There are routines available
that you can call to assist in converting handles to other more usable
forms. These routines are called callbacks (because HyperPAD calls the
extension which then calls back a routine in HyperPAD). All of the
callbacks are described in detail later in this appendix.
The examples presented in this appendix are written in C instead of
assembly language for clarity.
________________________________________________________________________
Appendixes 298
________________________________________________________________________
HOW TO CREATE AN EXTENSION
To create an extension, follow these steps:
1. Use a text editor to create your source file.
2. Compile your source file using the following command:
cl /c /Alfw /Gs test.c
This command compiles a C file called TEST.C using a custom memory
model. You must use this memory model when compiling extensions in C.
The /Gs parameter instructs the compiler to turn off stack checking.
In assembly language, use the following command:
masm test.asm;
3. Use the LINK.EXE program to assemble an EXE file using the following
command:
link test,,,startup/NOE;
This command links the TEST.OBJ file with the library STARTUP.LIB that
is supplied with HyperPAD. This library replaces the standard C startup
code. The /NOE switch forces the linker to use the information in
STARTUP.LIB in place of those in the default C libraries.
After this step, you will have a complete extension called TEST.EXE.
4. Use the MOVER.EXE program to add the extension to a pad. Use the
following command:
mover mypad.pad add test.exe
This command copies the TEST.EXE file into the pad called MYPAD.PAD. If
you need to replace an already existing extension called TEST with a
fresh copy of TEST.EXE, use the command:
mover mypad.pad replace test.exe
You are now ready to use the pad with the newly defined handlers and
functions.
________________________________________________________________________
Appendixes 299
________________________________________________________________________
LIMITATIONS
If you are programming extensions in C, some library functions will not
work, namely the functions that assume SS equal to DS. Further,
functions that cause the C startup code to be linked will not work. You
can determine if the C startup code is linked if you receive the error
message:
unresolved external _main
Extension are limited to 64K in size. However, in low memory situations,
pads with extensions of this size may not load.
EXTENSION COMPONENTS
FUNCTION POOL
Included with each extension is a table that you must define, called the
function pool. The pool describes the name of each routine defined in
the extension, its entry point (a pointer to the routine), and whether
it is a function or a handler.
-----------------------------------
WHENLOADED() AND WHENUNLOADED()
Each extension can optionally include routines that is called when the
extension is loaded from disk and released from memory.
-----------------------------------
WHENLOADED()
The WhenLoaded() performs any initialization required by your extension.
This routine might perform memory allocation, global variable
initialization, and interrupt redirection as required by the other
routines in the extension. WhenLoaded() is called before the entire pad
is loaded from disk, so it cannot send messages to the current page.
-----------------------------------
WHENUNLOADED()
The WhenUnLoaded() is called when the extension is released from memory.
This routine might free any remaining memory blocks used by the
extension or perform any additional cleanup as required by the
extension.
________________________________________________________________________
Appendixes 300
________________________________________________________________________
A SAMPLE C EXTENSION
/*
** The following is a skeleton C extension.
**
** It defines a handler called "Sample" that does
** nothing. It returns the continuation value STOP to ** cause HyperPAD
to terminate the message.
*/
#include <stdarg.h>
#include "extern.h"
pascal far WhenLoaded()
{
}
pascal far WhenUnLoaded()
{
}
Sample(NumArgs,...)
int NumArgs;
{
return(STOP);<%0>
POOL pascal Pool[] = {
{ "Sample", /* name of the handler */
Sample, /* pointer to the handler */
0, /* reserved */
HANDLER}, /* this is a handler */
{ NULL, /* NULLs mean end table */
NULL,
0,
0} };
________________________________________________________________________
Appendixes 301
________________________________________________________________________
A SAMPLE ASSEMBLY LANGUAGE EXTENSION
;
; The following is a skeleton assembly language
; extension.
;
; It defines a handler called "Sample" that does
; nothing. It returns STOP to cause HyperPAD to
; terminate the message.
;
DOSSEG
.MODEL LARGE
include extern.inc
.DATA
SampleName db 'sample',0
Pool PoolStruct <SampleName,SampleProc,0,HANDLER>
PoolStruct <>
CODE
WhenLoaded proc far
ret
WhenLoaded endp
WhenUnLoaded proc far
ret
WhenUnLoaded endp
SampleProc proc far
mov ax,STOP
ret
SampleProc endp
end
________________________________________________________________________
Appendixes 302
________________________________________________________________________
PASSING DATA BETWEEN HYPERPAD AND YOUR EXTENSION
PASSING PARAMETERS
You can pass parameters to handlers and functions in an extension using
the normal PADtalk syntax. The extension, in turn, receives the
arguments on the stack, each as a HANDLE to a null-terminated text
string (a string that ends with the 0 character). The number of
parameters is passed lowest on the stack, followed by each parameter
that the handler or function was called with. Each parameter is in the
form of a handle to text.
In order to access the variable number of arguments, you must include
the standard C header file: stdarg.h. This file contains macros that
allow you to access the arguments passed on HyperPAD's stack. The
following example retrieves all of the passed parameters and prints
them.
int sample(NumArgs,...)
int NumArgs;
{
var_list args;
HANDLE hdl;
int i;
va_start(args,NumArgs);
for (i=0;i < NumArgs;i++) {
hdl = va_arg(HANDLE);
printf("Argument %d = %s\n",i,deref(hdl));
}
return(STOP);
}
________________________________________________________________________
Appendixes 303
________________________________________________________________________
The next example shows a function that receives two parameters (and only
2) and returns their sum:
int sample(NumArgs,...)
int NumArgs;
{
var_list args;
HANDLE hdl;
int number1,number2;
if (NumArgs != 2) return(STOP);
va_start(args,NumArgs);
number1 = htoi(va_arg(args,HANDLE));
number2 = htoi(va_arg(args,HANDLE));
ReturnValue(itoh(number1 + number2));
return(STOP);
}
RETURNING VALUES
Routines in extensions that implement HyperPAD functions can return
values to HyperPAD scripts. These values must be in the form of a handle
to text because that's how HyperPAD internally represents and stores all
variables. Returning values to HyperPAD is accomplished with the
callback function ReturnValue(). For example, the following C statement
returns a string to HyperPAD by first converting it to a handle:
ReturnValue(stoh("John Q. Smith"));
________________________________________________________________________
Appendixes 304
________________________________________________________________________
Each routine can return a continuation value to HyperPAD (either using
the return statement in C or through the AX register in assembly
language). This value indicates to HyperPAD what to do with the
message. The possible continuation values are:
Value: Description:
----------------------------------------------------
PASS pass the message on to the next layer in the object
hierarchy
STOP stop passing the message
PASS_TO_HYPERPAD pass the message on directly to HyperPAD, avoiding
the other objects in the hierarchy
ERROR do not pass the message on and stop all pending
handlers
HANDLING MEMORY
HyperPAD provides two different ways to allocate memory: pointers and
handles.
POINTERS
A pointer is an 8 byte (far) reference to a block of memory. Allocation
and deallocation of pointers is accomplished using the NewPtr() and
FreePtr() functions. The following declares a pointer and shows how to
use it:
PTR p; /* declare a pointer */
/* allocate a block of 100 bytes */
p = NewPtr(100);
/* copy some text into that memory */
strcpy(p,"This is a test");
/* free the memory */
FreePtr(p);
________________________________________________________________________
Appendixes 305
________________________________________________________________________
HANDLES
A handle is a pointer to another pointer which, in turn, points to a
block of memory. The double indirection (meaning the pointer to a
pointer) is necessary because memory blocks in HyperPAD are movable. The
following example shows how to allocate and use a handle:
HANDLE h; /* pointer to a pointer (a handle) */
/* allocate a handle of 100 bytes */
h = NewHandle(100);
/* copy some text into the handle
strcpy(deref(h),"This is a string");
FreeHandle(h);
Handle memory blocks can move during a memory allocation request. If
there is insufficient memory available to satisfy the request, HyperPAD
will attempt to shuffle the memory blocks to make room for the requested
number of bytes. Thus, during a memory allocation, HyperPAD may
invalidate the pointer to your memory block, but the handle will always
remain the same. At the end of the following example, the pointer "p" is
no longer valid:
HANDLE h1,h2; /* declare some handles */
PTR p; /* declare a pointer */
h1 = NewHandle(100); /* allocate the first handle */
p = deref(hdl); /* establish a local pointer */
h2 = NewHandle(100); /* declare another handle */
/*
** the local pointer "p" no longer points to the
** memory block referenced by the handle, h1.
*/
It is the responsibility of the extension to free all of the memory it
uses (This is a good use of the WhenUnLoaded() function). All of the
callback functions that allocate memory are noted in their descriptions
later in this appendix.
________________________________________________________________________
Appendixes 306
________________________________________________________________________
REFERENCING HANDLES
Often times, it is necessary to dereference a handle, or, in other
words, look at the memory referenced indirectly by the handle. In C, you
can use the dereference operator (*) as in the following example:
HANDLE h;
printf("the handle points to the text %s\n",*h);
A more readable way is to use the deref (defined in extern.h) macro
which performs the same function:
HANDLE h;
printf("the handle points to the text %s\n",deref(h));
In assembly language, use the following code to dereference a handle:
les bx,hdl ;ES:BX = hdl
les bx,es:[bx] ;ES:BX = *hdl
HYPERPAD CALLBACKS
Callbacks are functions defined in HyperPAD that extensions can use to
perform various tasks. Callbacks are useful for converting data to and
from handles, sending messages to HyperPAD and getting and setting the
content of a field. All of the routines are declared in a C header file
called extern.h (or, in Assembly language, extern.inc). These files must
be included in order to write extensions. In C this is done using the
following statement:
#include "extern.h"
In assembly, use the following statement:
include extern.inc
When calling a callback routine from assembly language, the registers
SI,DI,BP,SS,DS are preserved. All other registers are destroyed.
Callbacks return values in AX for 2 byte quantities and DX:AX for 4 byte
quantities (like handles and long integers). Unless otherwise noted,
the routines follow the pascal calling convention; they perform their
own stack cleanup. Other routines, such as printf(), sprintf(),
SendHPMsg(), and SendPageMsg(), follow the C calling convention.
________________________________________________________________________
Appendixes 307
________________________________________________________________________
MEMORY FUNCTIONS
The following are the memory functions:
Function: Explaination:
--------------------------------------------------------
NewHandle allocate a handle
FreeHandle free a handle
HandleSize get the size (in bytes) of a handle
LockHandle lock a handle (not movable)
UnLockHandle unlock a handle (movable)
ReAllocHandle change the size of a handle
NewPtr allocate a pointer
PtrSize get the size (in bytes) of a pointer
CONVERSION FUNCTIONS
The following are the conversion functions:
Function: Explaination:
--------------------------------------------------------
btoh boolean to handle
ftoh float to handle
htob handle to boolean
htof handle to float
htoi handle to integer
htol handle to long
htos handle to string
itoh integer to handle
ltoh long to handle
stoh string to handle
________________________________________________________________________
Appendixes 308
________________________________________________________________________
CONTAINER GET/SET FUNCTIONS
The following are the functions for getting or setting values in
containers:
Function: Description:
--------------------------------------------------------
GetFieldNum get field content by number
GetFieldName get field content by name
GetFieldID get field content by ID
SetFieldNum set field content by number
MESSAGE PASSING FUNCTIONS
The following are the external message passing functions:
Function: Description:
--------------------------------------------------------
Do execute a PADtalk command
SendPageMsg send a message to the current page
SendHPMsg send a message to HyperPAD
SCREEN HANDLING FUNCTIONS:
The following are the screen handling functions:
Function: Description:
--------------------------------------------------------
MakeWin make a window
RemWin remove the most recent window
PutStr put a string on the screen
HighLine highlight a line on the screen
________________________________________________________________________
Appendixes 309
________________________________________________________________________
EVENT HANDLING FUNCTIONS
The following are the event handling functions :
Function: Description:
--------------------------------------------------------
PeekEvent get the next event without removing it
GetEvent get the next event
UnGetEvent put event on top of the event queue
MISCELLANEOUS FUNCTIONS
The following are miscellaneous functions:
Function: Description:
--------------------------------------------------------
ReturnValue return a value to HyperPAD from a function
GetSharedArea get a pointer to the shared data area
GetTime get the value of a millisecond timer
________________________________________________________________________
Appendixes 310
________________________________________________________________________
CALLBACK REFERENCE
-----------------------------------
BTOH
Syntax:
hdl = btoh(b);
BOOLEAN b; /* boolean to convert */
HANDLE hdl;
Purpose: The btoh() function converts a boolean value to a handle. The
handle will contain the text "TRUE" if the value is non-zero, or "FALSE"
if the value is zero.
Note: This functions allocates memory that you must free using
FreeHandle().
-----------------------------------
DO
Syntax:
Do(hdl);
HANDLE hdl; /* handle to command to execute */
Purpose: The Do() function executes the HyperPAD command contained in
the handle hdl (just like the built-in HyperPAD do command). You can
execute any valid PADtalk command except the do command and commands
having begin...end blocks.
Examples:
/* make the command string */
hdl = stoh("beep 5");
/* execute the command string */
Do(hdl);
/* free the command string */
FreeHandle(hdl);
________________________________________________________________________
Appendixes 311
________________________________________________________________________
-----------------------------------
FREEHANDLE
Syntax:
FreeHandle(hdl)
HANDLE hdl; /* handle to free */
Purpose: The FreeHandle() function frees a memory handle that was
allocated using NewHandle().
Note: You will get unpredictable results if you attempt to free a handle
that has not been allocated. You must free all handles that you allocate
in your extension.
Examples:
HANDLE hdl;
hdl = stoh("beep;");
:
:
FreeHandle(hdl);
-----------------------------------
FREEPTR
Syntax:
FreePtr(ptr);
PTR ptr; /* pointer to free */
Purpose: The FreePtr() function frees a memory allocated using NewPtr().
Note: It is the responsibility of the extension to free all of the
pointers that it allocates. Freeing a pointer that has not been
allocated will cause unpredictable results.
________________________________________________________________________
Appendixes 312
________________________________________________________________________
-----------------------------------
FTOH
Syntax:
hdl = ftoh(d);
HANDLE hdl;
double d; /* float value to convert */
Purpose: The ftoh() function converts a double to a handle. The returned
value can be freed using FreeHandle().
-----------------------------------
GETEVENT
Syntax:
GetEvent(&Msg);
MSG Msg; /* message structure to be filled */
Purpose: The GetEvent() function retrieves the next event from the event
queue, placing it into the structure Msg.
Examples:
MSG Msg;
GetEvent(&Msg);
if (Msg.Event == EVENT_KEYPRESS) {
printf("a key was pressed\n");
}
-----------------------------------
GETFIELDID
Syntax:
hdl = GetFieldID(pageorbackground,FieldID);
BOOLEAN pageorbackground; /* page or background */
WORD FieldID; /* field ID */
HANDLE hdl;
Purpose: The GetFieldID() function returns the content of a page or
background field given its ID. If pageorbackground is TRUE, then FieldID
specifies a page field.
Otherwise, FieldID specifies a background field.
Note: This function returns a duplicate of the content. The returned
value can be freed using FreeHandle().
________________________________________________________________________
Appendixes 313
________________________________________________________________________
Examples:
HANDLE hValue;
/* get background field ID 3 */
hValue = GetFieldID(FALSE,3);
:
:
FreeHandle(hValue);
-----------------------------------
GETFIELDNAME
Syntax:
hdl = GetFieldName(pageorbackground,hName);
BOOLEAN pageorbackground; /* page or bkgd field? */
HANDLE hName; /* handle to field name */
HANDLE hdl;
Purpose: The GetFieldName() function retrieves the content of a
background or page field as referenced by its name. If pageorbackground
is FALSE (zero), then hName specifies a field on the background.
Otherwise, hName specifies a field on the page.
Note: This function returns a duplicate of the content. The returned
value can be freed using FreeHandle().
Examples:
HANDLE hName;
HANDLE hValue;
/* create a field name */
hName = stoh("Help");
/* get the field's value */
hValue = GetFieldName(TRUE,hName);
/* get rid of the name */
FreeHandle(hName);
:
:
/* get rid of the value */
FreeHandle(hValue);
________________________________________________________________________
Appendixes 314
________________________________________________________________________
-----------------------------------
GETFIELDNUM
Syntax:
hdl = GetFieldNum(pageorbackground,fieldnum);
BOOLEAN pageorbackground; /* page or background field? */
int fieldnum; /* field number */
HANDLE hdl;
Purpose: The GetFieldNum() function retrieves the content of a
background or page field as referenced by its number.
If pageorbackground is FALSE, then fieldnum specifies a background
field. Otherwise, fieldnum specifies the number of the page field. This
function returns the value contained in the specified field.
Note: This function returns a duplicate of the content. The returned
value can be freed using FreeHandle().
Examples:
HANDLE hValue;
hValue = GetFieldNum(TRUE,1); /* get page field 1 */
:
:
FreeHandle(hValue);
-----------------------------------
GETGLOBAL
Syntax:
hdl = GetGlobal(hGlobalName);
HANDLE hGlobalName; /* name of global to get */
HANDLE hdl;
Purpose: The GetGlobal() function returns a duplicate of the content of
a global variable. The returned value can be freed using FreeHandle().
Examples:
HANDLE hdl;
HANDLE hGlobalName;
/* create name of global */
hGlobalName = stoh("savedMenuBar");
________________________________________________________________________
Appendixes 315
________________________________________________________________________
/* get its value */
hdl = GetGlobal(hGlobalName);
/* free the global name */
FreeHandle(hGlobalName);
:
:
/* free the value, when done with it */
FreeHandle(hdl);
-----------------------------------
GETSHAREDAREA
Syntax:
pShared = GetSharedArea();
SHAREDPTR pShared;
Purpose: The GetSharedArea() function returns the pointer to the Shared
Data Area contained in the HPAD.EXE program. The format for the Shared
Data Area is described later in this appendix.
-----------------------------------
GETTIME
Syntax:
sz = GetTime();
DWORD sz;
Purpose: The GetTime() function returns the current value of the
millisecond timer. HyperPAD uses either the system clock or the real
time clock that are able to tick 1000 times per second. At each tick of
the clock, HyperPAD increments a value that this function returns. Thus,
if you call this function twice, the second call will return a larger
number.
This function is useful for delays and timing screen effects.
Examples:
DWORD t1;
t1 = GetTime();
:
:
if (GetTime() - t1 > 1000) {
// at least 1 second has passed
}
________________________________________________________________________
Appendixes 316
________________________________________________________________________
-----------------------------------
HANDLESIZE
Syntax:
sz = HandleSize(hdl);
HANDLE hdl; /* handle to block of memory */
int sz;
Purpose: The HandleSize() function determines the size in bytes of a
handle.
Examples:
HANDLE hdl;
hdl = stoh("This is a handle");
printf("%u",handlesize(hdl));
FreeHandle(hdl);
-----------------------------------
HIDEMOUSE
Syntax:
HideMouse();
Purpose: The HideMouse() function hides the mouse. You must hide the
mouse before writing directly to the screen (with PutCh(), MakeWin(),
etc.).
Note: If there is no mouse, calling this routine will have no effect.
-----------------------------------
HIGHLINE
Syntax:
HighLine(x1,x2,y,attr,Screen);
int x1,x2,y; /* coordinates of line */
int attr; /* attribute for the line */
PACKETPTR Screen; /* description of screen */
Purpose: The HighLine() function changes the attribute of the line
defined from point (x1,y) to point (x2,y) (in other words - highlight a
line). The attribute lies within a range of 0 to 255. The range of the
values for the two points is defined by the screen driver.
Note: Attribute 7 (light grey) will appear on all video card/monitor
combinations as white on black. Attribute 112 will appear as reverse
video on all video card/monitor combinations. All other attributes
cannot be guaranteed to appear on other hardware combinations.
________________________________________________________________________
Appendixes 317
________________________________________________________________________
Examples:
The following code fragment controls a highlighted bar in a region
defined by the rectangle (x1,miny)-(x2,maxy).
#include "extern.h"
#include "keycodes.h"
BOOLEAN Done = FALSE;
int x1 = 10,x2 = 70,y = 5;
int maxy = 5,miny = 10;
int newy;
MSG Msg;
HideMouse();
HighLine(x1,x2,y,112,Screen); /* bar on */
ShowMouse();
while (!Done) {
GetEvent(&Msg)
switch (Msg.Event) {
case EVENT_KEYPRESS:
switch (Msg.KeyWord) {
case kb_ENTER:
case kb_ESCAPE:
Done = TRUE;
break;
case kb_UP:
if (y > miny) y--;
else y = maxy;
break;
case kb_DOWN:
if (y < maxy) y++;
else y = miny;
break;
}
break;
}
if (newy != y) {
HideMouse();
HighLine(x1,x2,y,7,Screen); /* turn off */
y = newy;
HighLine(x1,x2,y,112,Screen); /* turn on */
ShowMouse();
}
}
________________________________________________________________________
Appendixes 318
________________________________________________________________________
-----------------------------------
HTOB
Syntax:
bool = htob(hText);
HANDLE hText; /* handle to text boolean value */
BOOLEAN bool;
Purpose: The htob() function converts a handle passed from HPAD to a
boolean (TRUE or FALSE). The function returns zero if the handle
contains the word "FALSE" and a non-zero value otherwise.
-----------------------------------
HTOF
Syntax:
d = htof(hdl);
HANDLE hdl; /* handle to text float value */
double d;
Purpose: The htof() function converts a handle to a double.
-----------------------------------
HTOI
Syntax:
i = htoi(hText);
HANDLE hText; /* handle to some text */
int i;
Purpose: The htoi() function converts a handle passed from HPAD to an
integer (an integer is a 2 byte quantity).
-----------------------------------
HTOL
Syntax:
l = htol(hText);
HANDLE hText; /* handle to text long value */
long l;
________________________________________________________________________
Appendixes 319
________________________________________________________________________
Purpose: The htol() function converts a handle passed from HPAD to a
long integer (a long integer is a 4 byte quantity).
-----------------------------------
HTOS
Syntax:
s = htos(hText);
HANDLE hText; /* handle to text */
STRING s;
Purpose: The htos() function converts a handle passed from HPAD to a
string. This function does nothing more than dereference the handle.
Thus, the following statements are equivalent:
ptr = *hText;
ptr = htos(hText);
ptr = deref(hText);
-----------------------------------
ITOH
Syntax:
hdl = itoh(i);
int i; /* integer to convert */
HANDLE hdl;
Purpose: The itoh() function converts an integer to a handle.
Note: This function allocates memory that you must free using
FreeHandle().
________________________________________________________________________
Appendixes 320
________________________________________________________________________
-----------------------------------
LOCKHANDLE
Syntax:
ptr = LockHandle(hdl);
HANDLE hdl; /* handle to be locked */
PTR ptr;
Purpose: The LockHandle() function freezes the memory block's position
so that it will not move (until it is either freed using FreeHandle() or
unlocked using UnLockHandle()). This is useful if you want to access the
memory block using a pointer, instead of a handle. There may be some
space and speed savings depending on the number of accesses to the
memory block.
The LockHandle() function returns a pointer to the memory.
Example:
HANDLE hdl;
PTR p;
hdl = stoh("This is a handle");
p = LockHandle(hdl);
:
printf("%s",p);
:
FreeHandle(hdl);
-----------------------------------
LTOH
Syntax:
hdl = ltoh(l);
long l; /* long value to convert */
HANDLE hdl;
Purpose: The ltoh() function converts a long to a handle.
Note: This function allocates memory that you must free using
FreeHandle().
________________________________________________________________________
Appendixes 321
________________________________________________________________________
-----------------------------------
MAKEWIN
Syntax:
MakeWin(x1,y1,x2,y2,attr,Screen);
int x1,y1,x2,y2; /* window coordinates */
int attr; /* window attribute 0..255 */
PACKETPTR Screen; /* pointer to video packet */
Purpose: The MakeWin() function creates a removable rectangular window
with the upper left corner at (x1,y1) and the lower right corner at
(x2,y2) on the screen described by Screen.
The attribute of the window is specified in the attr parameter and has a
valid range from 0 to 255.
You can create many windows that overlap. The windows are remembered in
a window stack; you can remove windows only in the order that they were
created.
Screen output is NOT clipped within the active window. For example,
PutCh() and PutStr() functions will write anywhere on the screen,
regardless of any window that may be open.
Examples:
PACKETPTR Screen;
SHAREDPTR pShared;
/* get a screen packet */
pShared = GetSharedArea();
Screen = pShared -> pVideoPackets[0];
/* make a window with color white on blue (31) */
MakeWin(10,10,70,20,31,Screen);
:
:
/* remove the window */
RemWin()
________________________________________________________________________
Appendixes 322
________________________________________________________________________
-----------------------------------
NEWHANDLE
Syntax:
hdl = NewHandle(NumBytes);
int NumBytes; /* number of bytes to allocate */
HANDLE hdl;
Purpose: The NewHandle() function allocates a block of movable memory.
The NumBytes parameter specifies the size of the memory block in bytes.
-----------------------------------
NEWPTR
Syntax:
p = NewPtr(NumBytes);
int NumBytes; /* number of bytes to allocate */
PTR p;
Purpose: The NewPtr() function allocates a memory block accessible via a
pointer. This function is similar to the C function malloc(). All memory
allocated using NewPtr() must be freed using FreePtr().
-----------------------------------
PEEKEVENT
Syntax:
PeekEvent(&Msg);
MSG Msg; /* message structure to fill out */
Purpose: The PeekEvent() function copies the next event from the event
queue into the message structure. The event will not be removed from the
event queue. PeekEvent() is equivalent to:
GetEvent(&Msg);
UnGetEvent(&Msg);
/* Msg now has the next event */
Use PeekEvent() to examine the next event without disturbing it.
Examples:
The following code fragment waits for a mouse button to be pressed. If a
mouse button is already pressed, the loop is skipped.
________________________________________________________________________
Appendixes 323
________________________________________________________________________
MSG Msg;
PeekEvent(&Msg); /* look at the next event */
if (!Msg.Buttons) {
GetEvent(&Msg);
PeekEvent(&Msg);
}
-----------------------------------
PTRSIZE
Syntax:
sz = PtrSize(ptr);
PTR ptr; /* pointer to memory block */
WORD sz;
Purpose: The PtrSize() function retrieves the size of a pointer. This
function returns the exact number of bytes of the memory allocation
requested using NewPtr().
-----------------------------------
PUTATTR
Syntax:
PutAttr(x,y,attr,Screen);
int x,y; /* where */
int attr; /* attribute to put there */
PACKETPTR Screen; /* description of screen */
Purpose: The PutAttr() function writes an attribute directly to the
screen.
Examples:
int i;
for (i=1;i < Width;i++) {
PutCh(i,1,196,Screen); /* write a '-' */
PutAttr(i,1,112,Screen); /* reverse video */
}
________________________________________________________________________
Appendixes 324
________________________________________________________________________
-----------------------------------
PUTCH
Syntax:
PutCh(x,y,ch,Screen);
int x,y; /* where */
int ch; /* character to put there */
PACKETPTR Screen; /* description of the screen */
Purpose: The PutCh() function writes a character (ch) to the screen
(Screen) at the location defined by (x,y).
Examples:
int i;
for (i=1;i < Width;i++)
PutCh(i,1,196,Screen); /* write a line of '-' */
-----------------------------------
PUTSTR
Syntax:
PutStr(x,y,str,Screen);
int x,y; /* place to put the string */
STRING str; /* pointer to string to print */
PACKETPTR Screen; /* pointer to screen information */
Purpose: The PutStr() function places a string at the given location on
the screen.
Examples:
int i;
PACKETPTR Screen;
:
:
for (i=1;i < Height;i++) {
PutStr(1,i,"Hello World",Screen);
}
________________________________________________________________________
Appendixes 325
________________________________________________________________________
-----------------------------------
REALLOCHANDLE
Syntax:
ReAllocHandle(hdl,newsz);
HANDLE hdl; /* handle to memory block */
WORD newsz; /* new size (in bytes) */
Purpose: The ReAllocHandle() function changes the size of a handle. The
handle will remain the same, but the memory block referenced by the
handle will change.
Examples:
HANDLE hdl
hdl = NewHandle(100); // allocate a handle
p = deref(hdl); // get local pointer
:
:
ReAllocHandle(hdl,200); // make handle bigger
p = deref(hdl); // must reassign p because
// it changed!
Note: After you reallocate a handle, you must re-assign any local
pointers you have to that handle.
-----------------------------------
REFRESH
Syntax:
Refresh();
Purpose: The Refresh() function redraws the current page on the display.
________________________________________________________________________
Appendixes 326
________________________________________________________________________
-----------------------------------
RELEASEHPAD
Syntax:
ReleaseHpad();
Purpose: The ReleaseHPAD() function causes HyperPAD to give up control
of the screen, keyboard, mouse, and timer. After calling ReleaseHPAD(),
an extension can change the video mode, read from the keyboard, or use
the mouse.
Note: RestoreHPAD() must be called before control is returned to
HyperPAD. After you call ReleaseHPAD(), the following callback functions
will not work:
GetEvent()
UnGetEvent()
PeekEvent()
ShowMouse()
HideMouse()
-----------------------------------
REMWIN
Syntax:
RemWin();
Purpose: The RemWin() function removes the most recently opened window
created with MakeWin().
See Also: MakeWin();
-----------------------------------
RESTOREHPAD
Syntax:
RestoreHpad();
Purpose: The RestoreHPAD() function restores the keyboard, timer, mouse,
and video mode that was previously given up by calling ReleaseHPAD().
This function will reset the video mode back to the mode appropriate for
the current pad.
________________________________________________________________________
Appendixes 327
________________________________________________________________________
-----------------------------------
RETURNVALUE
Syntax:
ReturnValue(hdl);
HANDLE hdl; /* handle to text value */
Purpose: The ReturnValue() function returns a value to HPAD. All values
returned to HyperPAD must be in the form of a handle to text. The
conversion routines can be used to assist in converting data to a handle
suitable for return to HyperPAD.
Examples:
To return an integer:
ReturnValue(itoh(10));
To return a string:
ReturnValue(stoh("Hello World"));
To return a boolean value:
ReturnValue(btoh(FALSE));
________________________________________________________________________
Appendixes 328
________________________________________________________________________
-----------------------------------
SENDHPMSG
Syntax:
SendHPMsg(hMsgName,NumArgs,...);
HANDLE hMsgName; /* handle to message name */
int NumArgs; /* number of arguments to follow */
Purpose: The SendHPMsg() function sends a message directly to HyperPAD.
hMsgName is a handle to the message name, like "select" or "keypress".
NumArgs specifies the number of arguments that follow (each argument
must be a handle to text). You can pass any number of arguments, as long
as NumArgs specifies the correct number.
Note: For assembly programmers, you must clean up the stack depending on
how many arguments you passed. If there are no arguments, pass 0 for
NumArgs.
Examples:
HANDLE hMsgName;
HANDLE hArg1,hArg2;
/* create message to send */
hMsgName = stoh("myhandler");
hArg1 = itoh(10);
hArg2 = itoh(20);
/* send message and arguments */
SendHPMsg(hMsgName,2,hArg1,hArg2);
/* free up message name and arguments */
FreeHandle(hMsgName);
FreeHandle(hArg1);
FreeHandle(hArg2);
________________________________________________________________________
Appendixes 329
________________________________________________________________________
-----------------------------------
SENDPAGEMSG
Syntax:
SendPageMsg(hMessage,NumArgs,...);
HANDLE hMessage; /* handle to message name */
int NumArgs; /* number of arguments */
Purpose: The SendPageMsg() function sends a message to the current page.
The hMessage parameter is a handle to the message name, like select or
keypress. NumArgs specifies the number of arguments that follow (each
argument must be a handle to text). You can pass any number of
arguments, as long as NumArgs specifies the correct number.
Note: For assembly programmers, you must clean up the stack depending on
how many arguments you passed. If there are no arguments, pass 0 for
NumArgs.
Examples:
HANDLE hMsgName;
HANDLE hArg1,hArg2;
/* what message to send */
hMsgName = stoh("myhandler");
hArg1 = itoh(10);
hArg2 = itoh(20);
/* send the message and passed parameters */
SendPageMsg(hMsgName,2,hArg1,hArg2);
/* free up the message and passed parameters */
FreeHandle(hMsgName);
FreeHandle(hArg1);
FreeHandle(hArg2);
________________________________________________________________________
Appendixes 330
________________________________________________________________________
-----------------------------------
SETFIELDID
Syntax:
SetFieldID(pageorbackground,FieldID,hValue);
BOOLEAN pageorbackground; /* page or bkgnd field? */
WORD FieldID; /* ID of field to set */
HANDLE hValue; /* new content for this field */
Purpose: The SetFieldID() function sets the content of a field based on
its ID. If pageorbackground is FALSE then FieldID specifies the ID of a
background field. Otherwise, FieldID specifies the ID of a page field.
The hValue parameter is a handle to the new content of this field.
Examples:
HANDLE hdl;
hdl = stoh("This is new content for field 1");
/* set the field's content */
SetFieldID(FALSE,4,hdl);
FreeHandle(hdl);
-----------------------------------
SETFIELDNAME
Syntax:
SetFieldName(pageorbackground,hName,hValue);
BOOLEAN pageorbackground; /* page or bkgd field? */
HANDLE hName; /* handle to name of field */
HANDLE hValue; /* handle to value to set */
Purpose: The SetFieldName() function sets the content of a field given
its name. If pageorbackground is FALSE, then hName specifies the name of
a background field. Otherwise, hName specifies the name of a page field.
The hValue parameter is a handle to the new value of the field.
________________________________________________________________________
Appendixes 331
________________________________________________________________________
Examples:
HANDLE hName;
HANDLE hValue
/* name of the field */
hName = stoh("Help Window");
/* create a new content */
hValue = stoh("press SPACE to continue");
/* set page field hName */
SetFieldName(TRUE,hName,hValue);
FreeHandle(hValue);
FreeHandle(hName);
-----------------------------------
SETFIELDNUM
Syntax:
SetFieldNum(pageorbackground,FieldNum,hValue);
BOOLEAN pageorbackground; /* page or background */
int FieldNum; /* field number */
HANDLE hValue; /* value to set */
Purpose: The SetFieldNum() function sets the content of a page or
background field given a field's number. If pageorbackground is FALSE,
FieldNum specifies a background field. Otherwise, FieldNum specifies a
page field. The hValue parameter is a handle to the new field's content.
Examples:
HANDLE hdl
/* create a value */
hdl = stoh("This is new field content");
/* set page field 1 to this value */
SetFieldNum(TRUE,1,hdl);
/* free the value */
FreeHandle(hdl);
________________________________________________________________________
Appendixes 332
________________________________________________________________________
-----------------------------------
SETGLOBAL
Syntax:
SetGlobal(hGlobalName,hValue);
HANDLE hGlobalName; /* handle to name of global */
HANDLE hValue; /* handle to value of global */
Purpose: The SetGlobal() function sets the value of a global variable
referenced by the name hGlobalName to the value hValue. If the global
variable does not exists, it will be created.
Examples:
HANDLE hGlobalName;
HANDLE hValue;
/* create name of global to set value of */
hGlobalName = stoh("savedmenubar");
/* create the new value */
hValue = btoh("FALSE");
/* set the global to the new value */
SetGlobal(hGlobalName,hValue);
/* free the value and global name */
FreeHandle(hGlobalName);
-----------------------------------
SHOWMOUSE
Syntax:
ShowMouse();
Purpose: The ShowMouse() function shows the mouse after hiding the mouse
using HideMouse().
Note: This routine has no effect if you don't have a mouse or the mouse
is already displayed.
________________________________________________________________________
Appendixes 333
________________________________________________________________________
-----------------------------------
STOH
Syntax:
hdl = stoh(str);
STRING str; /* pointer to string to convert */
HANDLE hdl;
Purpose: The stoh() function converts a string to a handle. This
function essentially allocates a block of memory and copies the string
into it.
Note: The returned value must be freed using FreeHandle().
-----------------------------------
UNGETEVENT
Syntax:
UnGetEvent(&Msg);
MSG Msg; /* filled out message structure */
Purpose: The UnGetEvent() function places the event structure Msg at the
beginning of the event queue such that it is the next event to be
retrieved.
Examples:
The following code fragment fakes a keyboard event that never happened
(the press of the ENTER key):
MSG Msg;
PeekEvent(&Msg); // set the Msg fields
Msg.ShiftState = 0;
Msg.Event = EVENT_KEYPRESS;
Msg.KeyWord = kb_ENTER;
Msg.AsciiCode = 13;
Msg.ScanCode = 28;
________________________________________________________________________
Appendixes 334
________________________________________________________________________
-----------------------------------
UNLOCKHANDLE
Syntax:
UnLockHandle(hdl);
HANDLE hdl; /* handle to memory block */
Purpose: The UnLockHandle() function unlocks a handle that has been
locked using Lockhandle(). This allows the memory block to move during
subsequent memory allocations. Another way to unlock a handle is to free
it using FreeHandle() (which will free and unlock the handle).
Examples:
HANDLE hdl;
hdl = stoh("This is a handle");
LockHandle(hdl);
:
:
UnLockHandle(hdl);
FreeHandle(hdl);
________________________________________________________________________
Appendixes 335
________________________________________________________________________
C ROUTINES DEFINED IN HYPERPAD
The following standard C routines are implemented as HyperPAD callback
routines:
printf()
sprintf()
USING FLOATING POINT MATH
You can use floating point math within C extensions in HyperPAD version
V1.00C or later. To use floating point, you must use the default
floating point library (/FPi). Internally, the C compiler generates
inline floating point calls using interrupts. The interrupt service
routines are contained within HyperPAD itself, so your extensions will
be small. Many of the floating point functions are defined as callback
functions.
The following math functions are defined in HyperPAD:
Since extensions share HyperPAD's stack, functions declared pascal
cannot return double values (because functions declared pascal return
values local to the DS of the extension, which is different from
HyperPAD's DS). Functions that return double values must be declared as
C functions. For example, the following function will not work
correctly:
double pascal sample()
{
}
The function must be rewritten as:
double sample()
{
}
________________________________________________________________________
Appendixes 336
________________________________________________________________________
DATA STRUCTURES USED BY EXTENSIONS
HyperPAD's data structures that extensions may access are:
DataStructure: Description:
--------------------------------------------------------
Function pool This structure declares information about the
handlers and functions contained in the extension.
Video packet This structure, located in HyperPAD, defines
information about the screen.
Message This describes the structure of a HyperPAD event
stored in the event queue.
Shared Data Area This structure, located in HyperPAD, defines
variables relevant to the HyperPAD environment.
________________________________________________________________________
Appendixes 337
________________________________________________________________________
FUNCTION POOL
The function pool is used to communicate the names, entry points, and
type of routines that you have declared in your extension. When your
extension is loaded, HyperPAD looks at this table and dynamically binds
the handlers and functions that you have declared with the scripts in
memory. It has the following definition:
typedef struct {
STRING Name; /* name of this procedure */
RTN EntryPoint; /* pointer to function */
WORD MsgNum; /* relocated message number */
WORD MsgType; /* FUNCTION or HANDLER */
} POOL, *POOLPTR;
The function pool is declared as follows (with a NULL entry at the end
to signify the end of the table):
POOL pascal Pool[] = {
{ "Sample", /* first entry */
Sample,
0,
HANDLER },
{ NULL, /* end of table */
NULL,
0,
0 } };
The MsgType field can be one of two values:
________________________________________________________________________
Appendixes 338
________________________________________________________________________
VDEO PACKET
The video packet is a structure containing screen information, such as
where the video segment is, the width, height, bytes per line, and some
other information. A pointer to a video packet is necessary to use any
of the callbacks that access the screen. It has the following structure:
typedef struct PacketStruct {
PTR Screen; /* screen */
BYTE bpl; /* bytes/line */
BYTE Height; /* height of screen */
BYTE Width; /* width of screen */
BYTE Flag; /* flag - booleans */
RTN SetMode; /* routine to set mode */
RTN CursorOFF; /* turns cursor off */
RTN CursorThin; /* makes cursor thin */
RTN CursorFat; /* makes cursor full height */
RTN ModeAvail; /* is this mode available? */
} PACKET, *PACKETPTR;
A pointer to the video packets is contained in the Shared Data Area. To
create a local copy, use the following code:
SHAREDPTR pShared; /* pointer to shared data */
PACKETPTR Screen; /* my video packet */
pShared = GetSharedArea();
/* get driver 0 */
Screen = pShared -> VideoPackets[0];
You can then use the packet for modifying the screen. For example:
/* create a window */
MakeWin(10,10,70,20,31,Screen);
/* put a title on it */
PutStr(13,10,"[ Window Title ]",Screen);
The coordinates of the screen are within the following range:
1 <= x <= screen width
1 <= y <= screen height
________________________________________________________________________
Appendixes 339
________________________________________________________________________
MESSAGE
The message structure contains the description of a keyboard or mouse
event. It has the following format:
typedef struct {
BYTE Event; /* event */
BYTE ShiftStatus; /* shift status */
BYTE MouseX; /* mouse x coordinate */
BYTE MouseY; /* mouse y coordinate */
BYTE Buttons; /* mouse buttons */
WORD KeyWord; /* the keyword - if */
/* Event == KEYPRESS */
BYTE AsciiCode; /* ASCII code */
BYTE ScanCode; /* scan code */
} MSG, *MSGPTR, **MSGHANDLE;
The types of events that can occur are as follows:
EVENT_IDLE
EVENT_LEFTBUTTONDOWN
EVENT_RIGHTBUTTONDOWN
EVENT_LEFTBUTTONUP
EVENT_RIGHTBUTTONUP
EVENT_KEYPRESS
EVENT_DOUBLECLICK
________________________________________________________________________
Appendixes 340
________________________________________________________________________
THE EVENT QUEUE
The event queue is a buffered stack of mouse and keyboard events. When
the pad user presses a key or moves the mouse, the event and other
pertinent data is inserted into the event queue at the end. Extensions
have the ability to peek, get, and unget events from the event queue.
For example, when the user presses ESC, an event is generated and the
structure is filled out as follows:
Event: Returns:
--------------------------------------------------------------------
ShiftStatus the status of the SHIFT, CTRL, and ALT keys at the
time of the event
MouseX the mouse x position at the time the key was pressed
MouseY the mouse y position at the time the key was pressed
Buttons the status of the mouse buttons at the time of the
event:
0=no buttons down,
1=left button down,
2=right button down,
3=both buttons down
KeyWord kb_ESC (as defined in the include file keycodes.h)
AsciiCode The ASCII code for this key (in this case=27)
ScanCode The scan code for this key (in this case=1)
________________________________________________________________________
Appendixes 341
________________________________________________________________________
When the left mouse button is pressed, the structure is filled as
follows:
Function: Description:
--------------------------------------------------------
ShiftStatus This status of the shift keys at the time the
button was pressed
MouseX, MouseY The mouse position where the left button was pressed
KeyWord, AsciiCode, Not used for mouse events
ScanCode
Note: The event EVENT_IDLE is returned by GetEvent() whenever the event
buffer is empty. The valid fields are: Buttons, ShiftStatus, MouseX,
MouseY.
ShiftStatus is bit defined as follows:
Bit No.: Returned when:
---------------------------------------
bit 0 right SHIFT key pressed
bit 1 left SHIFT key pressed
bit 2 CTRL key pressed
bit 3 ALT key pressed
The following is a C routine that uses the event buffer to wait for a
key. Notice that the keypress event remains in the event queue after
this routine exits.
WaitForKey()
{
MSG Msg;
do {
GetEvent(&Msg);
} while (Msg.Event != EVENT_KEYPRESS);
UnGetEvent(&Msg);
}
________________________________________________________________________
Appendixes 342
________________________________________________________________________
SHARED DATA AREA
The Shared Data Area is a structure contained within the HPAD.EXE
program that contains program name, video driver information, and
command line information. The format of this area is as follows:
typedef struct {
BYTE flags; /* 0 */
DWORD CmdLineBits; /* 1 */
char program_parms[128]; /* 5 */
char program_name[80]; /* 133 */
char spawn_name[80]; /* 213 */
char spawn_parms[128]; /* 293 */
char saved_pad[80]; /* 421 */
BYTE return_code; /* 501 */
BYTE CardType[2]; /* 502 */
BYTE MonitorType[2]; /* 504 */
BYTE CardMem[2]; /* 506 */
char CardName[30]; /* 508 */
PACKETPTR *pVideoModes; /* 538 */
int (pascal far *StartRtn)(); /* 542 */
int (pascal far *StopRtn)(); /* 546 */
int (pascal far *SaveKey)(WORD); /* 550 */
char OriginalDir[64]; /* 554 */
WORD EnvSeg; /* 618 */
DWORD SerialNo; /* 620 */
WORD EnvSegSz; /* 624 */
RTN SetNorm; /* 626 */
DWORD Reserved; /* 630 */
PTR TradeNamePtr; /* 634 */
} SHARED,*SHAREDPTR;
When you run HPAD from the DOS command line, the HPAD.EXE program
determines the program parameters, video card information, and available
video modes and remembers this information in the Shared Data Area. The
other fields in the Shared Data Area are used when HyperPAD runs another
application, and are useless to the extension.
________________________________________________________________________
Appendixes 343
________________________________________________________________________
The useful fields in the Shared Data Area are described below:
Field: Description:
---------------------------------------------------------------------
Flags A set of six Booleans in the bits of the Flag byte
(see the following table)
CmdLineBits Contains bits representing which command line
parameters the user supplied on the command line
programParms The original program command line
programName The name of the program, including the directory from
which it was run
CardType Contains the video card(s) installed in the computer.
CardType[0] is the primary adapter.
MonitorType Contains the moniter type(s) attached to the video
card(s)
CardMem Contains the amount of memory on each of the video
card(s)
pVideoModes Pointer to an array of video screen drivers.
pVideoPacket[0] is the default driver. This is the only
way to get a video packet from within an extension.
StartRtn Routine to start playback of keys in the recorded
keystroke buffer
StopRtn Routine to stop the playback of recorded keys from the
keystroke buffer
SaveKey Routine to save a key in the keystroke buffer of
HPAD.EXE
OriginalDir Saved directory to change to if returning to HyperPAD
from a launched program
EnvSeg Segment of HyperPAD's copy of the DOS environment
SerialNo The serial number of this copy of the HyperPAD Reader.
EnvSegSz Number of bytes for the environment. This can be larger
than the environment, leaving room for expansion.
SetNorm Routine to set the normal 80x25 text mode on exit.
TradeNamePtr Pointer to the title of HyperPAD. Examining this string
will determine if you are running in the Reader,
HyperPAD Easy, or HyperPAD.
________________________________________________________________________
Appendixes 344
________________________________________________________________________
The Flags byte is set up as follows:
Bit No. Description:
-----------------------------------------------------------------
bit 0 1 = exiting to DOS,
0 = executing another program
bit 1 1 = pause after launching program,
0 = return to HPAD immediately after launching program
bit 2 1 = mouse installed,
0 = no mouse
bit 3 1 = first time HyperPAD was loaded,
0 = HyperPAD has run another program at least once
bit 4 1 = don't disturb the screen if running another program,
0 = clear screen before launching program, set screen
when returning from launching another program
bit 5 1 = DesqView is present,
0 = DesqView is not present
________________________________________________________________________
Appendixes 345
________________________________________________________________________
The CmdLineBits field contains bits representing which command line
parameters were specified when HyperPAD was loaded from the command
line. If a bit is set, then the corresponding command line parameter was
used.
Bit No. Description:
-----------------------------------------------
bit 0 /NOMSG
bit1 /25
bit 2 /43
bit 3 /50
bit 4 /NOSHOW
bit 5 /NOMOUSE
bit 6 /NOIDLE
bit 7 /MONO
bit 8 /LCD
bit 9 /B&W
bit 10 /GREY
bit 11 /COLOR
bit 12 /AUTOSAVE
bit 13 reserved
bit 14 /NOKB
bit 15 /NO15
bit 16 /ENHANCEDKB
bit 17 /NORTC
bit 19 /NOEM
________________________________________________________________________
Appendixes 346
________________________________________________________________________
This page left blank intentionally
________________________________________________________________________
Appendixes 347
________________________________________________________________________
APPENDIX 4: SUPPORT FOR SHOW PARTNER F/X
INTRODUCTION
Brightbill-Roberts, makers of HyperPAD, also publishes a popular family
of programs for creating screen shows for display on IBM Enhanced
Graphics Adapter (EGA), MultiColor Graphics Array (MCGA), Video Graphics
Array (VGA), and Hercules monochrome systems. HyperPAD 2.0 supports
images and screen shows created by Show Partner F/X, Show Partner, and
PC Partner. Using HyperPAD's fxshow command, you can now view graphic
presentations, demos, and animations from within HyperPAD.
SHOW PARTNER FILE TYPES
HyperPAD 2.0 supports the screen show and image files listed in the
following table. These files can be run from within HyperPAD using a
special program called FXSHOW, which is included in your HyperPAD
package:
File Type: Description:
----------------------------------------------------------------------
.GX2 The .GX2 file format is a popular standard for storing
color images. Brightbill-Roberts' Show Partner F/X,
Show Partner, and PC Partner create .GX2 files. Lotus
Freelance Plus and Ashton-Tate Applause II also create
.GX2 images that HyperPAD can use.
.PRO The .PRO file format is used for the scripts created by
Show Partner F/X to control screen shows.
.PR2 The .PR2 file format is the result of using the F/X
Master Maker utility to master a .PRO script file. By
mastering a script, a Show Partner F/X user prevents
anyone from changing the screen show in any way.
.SLD The .SLD file format is used by PC Partner, a limited
version of Show Partner F/X that is bundled with many
LCD display devices.
________________________________________________________________________
Appendixes 348
________________________________________________________________________
USING THE FXSHOW COMMAND
HyperPAD supports the files listed above with a special program called
FXSHOW, which is included in your HyperPAD package. To use FXSHOW with
HyperPAD, youmust have already created images or screen shows with one
of the products listed above.
When you start HyperPAD, it looks in its home directory for a file
called FXSHOW.EXE; when you ran SETUP, this file was copied to the
HyperPAD home directory for you. If HyperPAD located FXSHOW, an
additional credit will appear at the bottom of the screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If HyperPAD was successful in locating this file, you can then use the
fxshow command, which is described in Chapter 11, "Commands". When you
use the fxshow command, HyperPAD shrinks down to 3K and runs FXSHOW.EXE,
passing it the file to view.
Specifying a SLD, PRO, or PRO file causes HyperPAD to view that file and
then return to HyperPAD at the point where you left off. (If you need to
perform some extra commands upon returning to HyperPAD, include them in
a resume handler on that page).
You can also specify GX2 files to view. In this case, HyperPAD assembles
a show from the GX2 files that you specified and begins cycling them.
When the you have viewed all of the GX2 files, control is returned to
HyperPAD. If you press ESC during the show, FXSHOW temporarily stops the
show and displays a list of the GX2 files in the show that it created.
At this point, you can press ESC again and return to HyperPAD, or
highlight a GX2 file in the list and continue the show.
________________________________________________________________________
Appendixes 349
________________________________________________________________________
APPENDIX 5: HYPERPAD UTILITIES
EXTENSION MOVER
The MOVER.EXE program copies an extension into a pad, deletes an
extension from a pad, or replaces an existing extension in a pad with
another extension having the same name. Adding extensions to a pad
increases the pad size by the size of the extension, plus a small amount
of code size.
mover <pad name> replace | add | delete <extension name>
mover <pad name>
Examples:
The following example moves an extension called TEST.EXE into the Home
pad:
mover home add test
To replace the extension in the phone pad called "lookup" with a new
copy:
mover phone replace lookup
mover phone rep lookup
To delete an extension from the Home pad called "rtns":
mover delete rtns
mover home del rtns
To get a list of the extensions (and the handlers and function defined
in those extensions) just supply the name of the pad. The following
example lists the extension information in the Home pad:
mover home
If you don't supply an extension, HyperPAD assumes ".PAD" for pads and
".EXE" for extensions.
See Appendix 3 for more information about writing extensions.
________________________________________________________________________
Appendixes 350
________________________________________________________________________
PAD INFO
The PADINFO.EXE program prints out information about you pad. The
following information is listed:
Information: Explanation:
------------------------------------------------------------------
Pad Name Full DOS pathname of the pad.
Pad access Either read/write (for normal pads) or
read only for pads with the Can't Modify
option set in the Protect dialog box.
Can't delete pad Indicates if the Can't Delete option is
checked in the Protect dialog box.
Home pad Yes if the pad is a Home pad.
Access by password only Yes if the By password only option is set
in the Protect dialog box.
User Level 1 to 5 depending on the user level.
PADINFO will also tell you if the pad is serialized. The serial number
is used by the Reader.
At the end of the above information, PADFINO lists the extensions, the
extension size, the extension version number, and the handlers and
function that are within each extension.
STRIP
The STRIP.EXE program removes the text portion of all of the scripts of
a pad. This utility is useful if you want to distribute your pads
without revealing how the pad was created.
strip ad name
Examples:
strip home.pad
strip phone.pad
To remove the scripts from all of the pads in a directory:
strip *.pad
If you attempt to access a script after the text has been removed,
HyperPAD will display the error "Cannot edit mastered script".
________________________________________________________________________
Appendixes 351
________________________________________________________________________
If you want to remove a single script from a button or field:
1. Copy the button or field using the Copy command from the Edit menu.
2. Create a new pad by selecting New from the File menu
3. Paste the button of field into the new pad using the Paste command
on the Edit menu.
4. Exit HyperPAD and run STRIP.EXE with the new pad you just created.
5. You now have a copy of the field or button without the text of the
script which you can copy back to the original pad.
COMPACT
The COMPACT utility compacts a pad without having to run HyperPAD.
compact ad name
Examples:
compact home.pad
compact myphone
To compact all of the pads in the current directory:
compact *.pad
After compacting each pad, the number of bytes that was saved is
printed.
________________________________________________________________________
Appendixes 352
________________________________________________________________________
________________________________________________________________________
Appendixes 353
________________________________________________________________________
APPENDIX 6: RUNNING HYPERPAD ON A NOVELL NETWORK
INTRODUCTION
If you have purchased a license to install HyperPAD on a network, you
can give many users access to a single copy of HyperPAD program located
on a file server.
This appendix contains some notes intended for the network adminstrator
who wants to install HyperPAD on a network. The description is specific
to Novell networks, but much of the material presented here applies to
other networks as well.
INSTALLATION
Follow these steps to install HyperPAD on a Novell network:
1. Create a directory on the file server for HyperPAD's program files.
The files that must be included here are:
HPAD.EXE
HPAD.OVL
HPAD2.OVL
HPAD.MSG
HPAD.PRN
HPAD.INI (optional)
The user's rights to this directory should be ROS (read, open, and
search).
2. In order to prevent users from violating the license agreement, the
HPAD.EXE file should be marked execute-only so that users will be unable
to copy it. The overlay files (HPAD.OVL and HPAD2.OVL) cannot be marked
in this manner because of HyperPAD's overlay manager.
3. If you have any read-only pads that you want shared by many users,
they should be copied into this area. For example, you may have a
HOME.PAD that is loaded by default for each user. Any help files or
other read-only pads should also be included in this directory.
Any pads that the users can modify should be copied into the user's
private directory area. Do not flag pads shareable read-write as this
will cause problems if many users update the same pad simultaneously
(which HyperPAD doesn't support).
________________________________________________________________________
Appendixes 354
________________________________________________________________________
4. Grant the appropriate users access to this directory area. In the
system login script (or login script of each user), add the statement:
set HPADNET="."
This causes HyperPAD to look for pads first in the user's directory
area. Further, HyperPAD will create the HPAD.INI in this directory.
SHARING PADS
If a pad is marked for read-write access, only one HyperPAD user can
open it at a time. An attempt by a second user on the network to open a
file already in use will result in an error message to the second user.
You can allow more than one user to open a single pad if it is marked
read-only. You can do this within HyperPAD by setting the Can't modify
option in the Protect dialog box to on. In this case, HyperPAD opens the
pad in shared, read-only mode. These pads can still be modified through
PADtalk (by modifying field contents and object properties), but the
pages that are modified will never be saved to disk.
If a pad is currently being used by more than one user on a network, and
one of these users attempts to make the pad read-only, an error will be
displayed indicating that the pad is already in use. The pad cannot be
changed to read-write until there is only one current user.
The cantModify property can be changed using the PADtalk statement:
set the cantModify of pad to true;
set the cantModify of pad to false;
Notes:
HyperPAD opens the HPAD.MSG and HPAD.PRN files using a shared, read-only
mode so that many users can access these files at the same time.
In order for HyperPAD to share pads, you must be using MS-DOS version
3.0 or better.
________________________________________________________________________
Appendixes 355
________________________________________________________________________
WHERE HYPERPAD LOOKS FOR FILES
HyperPAD looks for files in the following order:
1. In the current directory
2. In the directory specified by the HPADNET environment variable (if
present)
3. In the original directory from which HyperPAD was started
4. The directory where HPAD.EXE resides
5. Each directory in the DOS path
6. On the B: drive (if HyperPAD was started from the A: drive on a low
density disk)
As an administrator, you can make HyperPAD search for pads first in the
HPADNET directory. This is set in the DOS environment using the
following DOS command:
set HPADNET=S:\ACCOUNTS\JIM
To specify the current directory:
set HPADNET=.
By setting this variable, you can adjust where HyperPAD looks for pads
and the configuration file HPAD.INI.
When you exit HyperPAD, HyperPAD writes the configuration file HPAD.INI
into the directory specified by HPADNET. If this environment variable
doesn't exist, HyperPAD will attempt to write the file into the same
directory as the HyperPAD program files. If the user doesn't have writes
to this area, the file will not be written.
________________________________________________________________________
Appendixes 356
________________________________________________________________________
This page left blank intentionally.
________________________________________________________________________
Appendixes 357
________________________________________________________________________
APPENDIX 7: EDGE TYPES
The following illustration shows the available edge types in HyperPAD:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Appendixes 358
________________________________________________________________________
This page left blank intentionally.
________________________________________________________________________
Appendixes 359
________________________________________________________________________
APPENDIX 8: ASCII TABLE
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Appendixes 360
________________________________________________________________________
This page left blank intentionally.
________________________________________________________________________
Appendixes 361
________________________________________________________________________
APPENDIX 9: WORKING WITH FLOPPY DISKS
As a pad developer, keep in mind that HyperPAD is a disk-based system,
and give thought to the issues involved when a user runs the pads you've
developed on a system with dual floppy drives and no hard disk.
HyperPAD can help you ensure that your users don't lose data when
switching disks. To keep users from losing data, do everything possible
to make sure that the current pad has been properly closed before
another pad is opened.
USING THE GO STATEMENT FOR CHANGING DISKS
HyperPAD allows the user to remove disks from the drive after a
go statement fails to find a specified pad. HyperPAD
displays a Where Is dialog box for the user to complete after changing
disks.
The go statement has an optional parameter that allows you to display
your own message in place of HyperPAD's Where Is dialog box.
go to pad "A:SAMPLE.PAD"
with diskchange "Insert Disk 2";
This example closes the current pad and displays the message "Insert
Disk 2" in a dialog box. If the user selects <<Ok>>, then HyperPAD
attempts to load the pad "A:SAMPLE.PAD". The message will continue to be
displayed until the disk with the pad has been inserted into the A:
drive. If the user selects <Cancel> or presses ESC, then the original
pad will be loaded. (If the original disk is not in the drive, then the
user will be instructed to insert the original disk.)
The user can also remove the disk containing HPAD2.OVL (Program Disk 2).
When the overlay is requested (when HyperPAD is compiling a script, for
example), the user will be prompted for the disk containing the overlay
(using the Where Is dialog box). Once the overlay has been loaded, the
user will be prompted to insert the disk containing the pad. Changes to
the pad will be lost if the user does not reinsert the disk with the
current pad.
Note:
If you run HyperPAD on a low density disk from the A: drive, HyperPAD
will search for pads on the B: drive (if there is one).
________________________________________________________________________
Chapter 7: Chunk Expressions 59
________________________________________________________________________
CHAPTER SEVEN: CHUNK EXPRESSIONS
In an English-like intuitive manner, chunking precisely accesses any
piece of data from anywhere within your pad. You can specify individual
or groups of characters, words, items or lines from a container, or even
pinpoint parts of other chunks. The following are examples of chunking
used to access information:
put char 1 of page field 1 into msg;
print the last word of field "Last Name";
delete the first line of MyWordList;
SIMPLE CHUNK EXPRESSIONS
There are three forms of a simple chunk expression. These examples show
each form using character (abbreviated char) chunks.
The first form specifies any character within the container, in this
case the first character.
char 1 of page field 1
The second form specifies a range of characters (a group) within the
container, in this case the first 10 characters.
char 1 to 10 of page field 1
The last uses an ordinal to specify the character within the container,
in this case, the third character.
the third character of page field 1
________________________________________________________________________
Chapter 7: Chunk Expressions 60
________________________________________________________________________
The available ordinals are:
Ordinal: Example Chunk:
------------------------------------------------------------
first the first character of field 1
second the second character of field 1
third the third character of field 1
fourth the fourth character of field 1
fifth the fifth character of field 1
sixth the sixth character of field 1
seventh the seventh character of field 1
eight the eight character of field 1
ninth the ninth character of field 1
tenth the tenth character of field 1
any any character of field 1
middle the middle character of field 1
last the last character of field 1
The special ordinals any, middle, and last depend on the contents of the
container. The ordinal any specifies a random character, word, item, or
line, and middle selects the middle character, word, item, or line.
CHARACTER CHUNKS
Character chunks are determined by offsets within the container. The
following example returns the character at position 5 ("o").
char 5 of "hello there"
All characters, including spaces and carriage returns, are treated as
chunking characters.
WORD CHUNKS
Word chunks are delimited by spaces (" ") or carriage returns. For
example,
________________________________________________________________________
Chapter 7: Chunk Expressions 61
________________________________________________________________________
word 2 of "this is a test"
will return the word "is". Notice that the word itself is returned
stripped of any spaces or carriage returns that surround it.
________________________________________________________________________
Chapter 7: Chunk Expressions 62
________________________________________________________________________
ITEM CHUNKS
Item chunks are delimited by commas (","). For example,
item 2 of "doctor,lawyer,clerk,"
will return "lawyer". In fact, the text between the first and second
comma is returned, even if there are spaces and many words. For example,
item 2 of "doctor Williams ,lawyer Seeley ,clerk Betty"
will return "lawyer Seeley ". Notice that the commas are not returned.
LINE CHUNKS
Line chunks are delimited by carriage returns. For example, if there is
a field with the following text:
doctor Williams
lawyer Seeley
clerk Betty
the following chunk expression
line 2 of field 1
will return "lawyer Seeley". Like item chunks, anything between the
carriage returns is returned, including spaces, words and items. Since
the text in fields may be word wrapped, the actual number of lines in a
field and the number of lines on the screen may not always be the same.
Also, line chunks are returned without their carriage return delimiters.
SPECIFYING CHUNKS OF CHUNKS
In addition to simple chunking expressions, combine chunking types to
further pinpoint a piece of text. Always order the statement from the
smallest chunk to the largest chunk. Each chunk type is separated by the
word of. For example:
char 1 of word 6 of page field 1
char 5 to 8 of the second item of field "Address"
char 1 of word 2 of item 6 of the last line of field 1 of
page 10
the middle item of any line of field "Zippy Messages"
________________________________________________________________________
Chapter 7: Chunk Expressions 63
________________________________________________________________________
CHUNKING DESTINATIONS
In addition to retrieving pieces of text, you can use chunk expressions
as destinations for text. For example:
put "hello" into word 6 of page field 1;
put pg fld 2 before the first line of pg fld 1;
When pinpointing a chunk as a destination, specify if you want to
replace the chunk (by using into), insert before the chunk (by using
before) or insert after the chunk (by using after).
If you use into, the expression supplied will replace the specified
destination chunk. For example, if field 1 contains "HyperPAD", then the
command:
put "Extension" into char 6 to 8 of "HyperPAD"
will change field 1 to "HyperExtension".
If you specify a non-existent item as the destination, HyperPAD will
create blank items as filler. For example, suppose field 1 contains
"John Smith", then the following statement
put "Sue" into item 4 of field 1;
will change field 1 to "John Smith,,,Sue". Notice that HyperPAD inserted
3 commas in order to make "Sue" the fourth item. The same will happen
for line chunks as well.
Using before and after as destinations with items and lines inserts a
delimiter. For example, the following statement
put "Hello There" after the last line of page field 1;
appends a line after page field 1 and sets it to "Hello There". HyperPAD
inserts a carriage return to create the correct number of lines. The
same is true of items.
________________________________________________________________________
Chapter 9: Colors 69
________________________________________________________________________
CHAPTER NINE: COLORS
Some PADtalk properties and commands require that you specify a color.
Traditionally on personal computers, colors are represented by a
foreground color and a background color combination, or attribute. There
are always 256 attributes available in character mode, but these are
translated by some hardware systems to black and white. Colors 0 to 127
are normal intensity combinations, and colors 128 to 255 are high
intensity combinations.
There are 16 possible colors, each corresponding to a number. Each color
can be used as a background or foreground (16*16=256).
0 black 8 dark grey
1 blue 9 light blue
2 green 10 light green
3 cyan 11 light cyan
4 red 12 light red
5 magenta 13 light magenta
6 brown 14 light brown
7 grey 15 white
SPECIFYING COLORS
The color names from this table can be used to specify a color in an
English-like manner, as in the following example:
set the fillColor of button 1 to red;
set the acceleratorColor of pg btn "help" to light red;
put yellow into myColor;
You can combine the color keywords using the word on to form a
foreground/background attribute specification. When no background is
specified, black is assumed. The syntax for such a combination is as
follows:
<foreground color> on <background color>
________________________________________________________________________
Chapter 9: Colors 70
________________________________________________________________________
For example, the following statement sets the fill color of button 1 to
be light blue background with red lettering.
set the fillColor of button 1 to red on light blue;
COLOR NUMBERS
The color constants are translated by HyperPAD to single numbers between
0 and 255 using the following formula:
color = (background * 16) + foreground
For example, the color red on white translates to:
color = (white * 16) + red
color = (15 * 16) + 4c
color = 244
Thus, the following two statements are equivalent:
set the fillColor of button 1 to red on white;
set the fillColor of button 1 to 244;
Representing colors as numbers allows you to algorithmically adjust the
colors of objects, as in the following example:
-- ask for the foreground color number
ask "type in foreground color number";
put it into fcolor;
-- ask for the background color number
ask "type in background color number";
put in into bcolor;
-- set the color
set the color of page field 1 to (bcolor * 16) + fcolor;
The colors available are determined by the graphics card and monitor
used. The color constants 0 through 7 are low intensity, whereas colors
8 through 15 are high intensity. On some monitors, you may need to
finely adjust the contrast to see the high intensity colors.
Using a high intensity color as a background is blinking on most
hardware configurations. HyperPAD disables this blinking capability to
provide you with the maximum number of color combinations (256). You can
specify the higher intensity colors using the word blinking:
set the color of button 1 to blinking grey on red;
________________________________________________________________________
Chapter 9: Colors 71
________________________________________________________________________
When you design pads for monochrome systems, all of the 256 available
colors are translated to black and white. In general, it is safe to use
the following color combinations:
color 7 (grey) white on black
color 112 (black on grey) reverse video
These are the default colors for all objects.
On LCD systems, such as some laptops, the color combinations may be
different.
________________________________________________________________________
Chapter 11: Commands 99
________________________________________________________________________
CHAPTER ELEVEN: COMMANDS
This chapter provides an alphabetical listing of all the commands
available in PADtalk. Each command is described in detail, its syntax is
given and examples are offered.
Command: Description:
-----------------------------------------------------------------------
add Add to a container
answer Ask a question with buttons as choices
ask Ask a question, allowing user to type response
close Close a file
convert Convert date and time data to a different format
delete Delete a chunk from a container
dial Dial a number with a modem
divide Divide a container by an amount
do Execute an expression as a statement
edit script Edit the script of a HyperPAD object
find Find text somewhere in your pad
flushCache Write changed pages from memory to disk
fxShow Execute the Show Partner F/X runtime
get Put an expression into the local variable "it"
global Declare a global variable
go Change to another page, background, or pad
hide Hide an object
hilite Highlights text in a field
multiply Multiply a container by an amount
noSound Turn the speaker off (from sound or play)
play Play music in the background
playBack Play back previously recorded keystrokes
pop page Change to a previously saved page
print Print information from a pad
________________________________________________________________________
Chapter 11: Commands 100
________________________________________________________________________
Command: Description:
-----------------------------------------------------------------------
push page Save a page for later recovery using pop
put Copy information to a container
query Create a subset of pages based on criteria
read Read chunks from a file
record Record keystrokes for later playback
run Run another program
send Send a message to another object
set Modify object properties
setDefaultPopupColors Sets the popup colors to the default
SetPopupColors Sets the colors used to display popups
show Make an object visible
sort Sort the pad
sound Turn the speaker on a a particular frequency
subtract Subtract an expression from a container
visual Set up an effect for the next page change
wait Wait some number of miliseconds
write Write text to a file
-----------------------------------
ADD
Syntax:
add <expression> to <destination>;
Purpose: The add command adds the value of the expression to the value
of the destination and places the result into the destination.
The <expression> must evaluate to a number or be a container holding a
number. The <destination> must be a container.
Note: You will receive a runtime error if either the <expression> or the
<destination> is not a number.
Examples:
add 5 to page field 23;
add 45.67 to word 2 of page field 1;
________________________________________________________________________
Chapter 11: Commands 101
________________________________________________________________________
-----------------------------------
ANSWER
Syntax:
answer question [with <button1> [,<button2> [,<button3>]]];
Purpose: The answer command allows you to create dialog boxes that ask a
question. The user responds by choosing one of the buttons supplied. The
dialog box is similar to other HyperPAD dialog boxes and is always
centered on the page. You can specify up to 3 buttons to choose from.
The Answer dialog box looks like this:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The <question> is the text within the dialog box. The text can be many
lines long, in which case it is word-wrapped. Use carriage returns to
improve the readability of your messages.
The user can choose one of up to three buttons you supply in <button1>,
<button2>, <button3>. If you don't specify any buttons to choose from,
HyperPAD uses the two default buttons: <<Ok>> and <Cancel>.
When the user accesses the dialog box, it remains on-screen until a
choice is selected. After the user responds, either by selecting a
choice or pressing ESC, the dialog box is removed and the selected
button text is placed into the local variable it. For example, if the
user selects <<Ok>>, it will contain "Ok". If the user selects <Cancel>,
it will contain "cancel". If the user presses ESC, then the variable it
will be empty.
________________________________________________________________________
Chapter 11: Commands 102
________________________________________________________________________
Examples:
answer "Ok to quit?";
answer "Continue printing?" with "Yes","No";
answer "What color?" with "red","blue","green";
answer "Error printing!" with "Ok";
The following handler asks the user if it is Ok to quit:
handler cancel;
begin
"Ok to quit?" with "Yes","No";
if it is "Yes" then quit;
end;
See Also: ask
-----------------------------------
ASK
Syntax:
ask question [with <default response>];
Purpose: The ask command allows you to gather information from the pad's
user by creating a dialog box in which the user types a response. The
Ask dialog box presents a question as a prompt, a text box in which to
type a response, and <<Ok>> and <Cancel> buttons.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
When the user presses the <<Ok>> button, the response is put in the
local variable it. If there is no response, or <Cancel> is selected, the
local variable it will be empty.
________________________________________________________________________
Chapter 11: Commands 103
________________________________________________________________________
If you supply a default answer, it is presented in the text box as the
default response. Then, when the user begins typing in a different
response, the proposed answer is replaced by the typed one.
Note: You cannot change the proposed buttons in the Ask dialog box. They
will always be Ok and Cancel.
Examples:
ask "What is your name?";
The following uses ask to go to the page that the user specifies. If the
user cancels the dialog box, the process stops:
handler select;
begin
while true do
begin
ask "Go to which page?" with currentPage + 1;
if it is empty then exit;
go to page it;
end;
end;
See Also: answer
-----------------------------------
CLOSE
Syntax:
close <file number>;
Purpose: The close command closes a previously opened file. All files
must be closed after you are finished with them. (You can open a file
using the create and open functions.)
Examples:
close fh;
The following example writes the contents of field 1 to a file:
put create("data.dat") into fh;
write field 1 to fh;
close fh;
Note: This command sends the close message.
See Also: create, open, read, write
________________________________________________________________________
Chapter 11: Commands 104
________________________________________________________________________
-----------------------------------
CONVERT
Syntax:
convert container to <format> [and <format>];
convert var1 to seconds;
convert var1 to dateItems;
convert var1 to [long | short | abbreviated] date;
convert var1 to [long | short] time;
convert var1 to [long | short | abbreviated] date and
[long | short] time;
Purpose: This command converts dates to different formats. The range of
dates HyperPAD understands starts from Saturday, January 1, 1583 -- the
starting date of the Gregorian Calendar. Using convert, you can input a
numerical date, like "5/8/90", and translate it to written form, like
"Tuesday, May 8, 1990".
The following are explanations of target formats using January 1, 1990
at 5:00:00 PM as an example.
Date Format: Example:
-----------------------------------------------------------------
date (same as short date) 1-1-90 The dash (-) is the only date
separator output by convert
long date Monday, January 1, 1990
abbreviated date Mon, Jan 1, 1990
seconds 12843766800 The number of seconds since
1-1-1583
time 5:00 PM
long time 5:00:00
dateItems 1990,1,1,17,0,0,2 (year, month, day, hour,
minute, second, day of week)
________________________________________________________________________
Chapter 11: Commands 105
________________________________________________________________________
Container formats: The power of convert is derived from the flexible
representation of the container being converted. The following are
allowed:
1. Both the dash and slash (-,/) can be used as date separators.
2. Date item lists can be modified creating an invalid date and then
normalized by converting it to another format. The following example
modifies the dateItems list to figure out the date 40 days from today:
get the seconds; --get today's date and time
convert it to dateItems; --convert to date item list
add 40 to item 3 of it; --add 40 days
convert it to longDate; --normalize
answer "40 days from now is" && it;
The next example modifies the dateItems list to figure out what the date
and time will be 18 hours from now:
get the seconds; --get today's date in seconds
convert it to dateItems; --convert to date item list
add 18 to item 4 of it; --add 18 hours
convert it to longDate and time; --normalize
answer "18 hours from now is" && it;
3. The formats that you can convert from are loose. The following are
suitable formats for convert:
Example: Format:
-----------------------------------------------------
Jan 1, 1990 date
January 1, 1990 date
Jan 1, 90 date
Jan 1, 1990 11:20 date and time
Mon, Jan 1, 90 11:20 AM date and time
11:20 time
11:20 PM time
11:20 Jan 1, 1990 time and date
11:20 Mon, Jan 1, 1190 time and date
65 seconds
1990,1,1,17,00,2 dateItems
________________________________________________________________________
Chapter 11: Commands 106
________________________________________________________________________
Examples:
This function returns the day of the week of the first day of the
current month:
function firstDay;
begin
get the date;
convert it to dateItems; --represent as date items
put 1 into item 3 of it; -- put 1 as day of the month
convert it to long date; -- convert to string
return word 1 of it; -- return day of week
end;
This handler computes tomorrows date:
handler tomorrow;
begin
get the seconds;
add 60 * 60 * 24 to it;
convert it to long date;
answer "Tomorrows date is" && it;
end;
Comments: The following months and days of the week and their
abbreviations are recognized by HyperPAD:
Keyword: Abbreviation:
------------------------------------------
january jan
february feb
march mar
april apr
may may
june jun
july jul
august aug
september sep
october oct
november nov
december dec
________________________________________________________________________
Chapter 11: Commands 107
________________________________________________________________________
Keyword: Abbreviation:
------------------------------------------
sunday sun
monday mon
tuesday tue
wednesday wed
thursday thu
friday fri
saturday sat
See Also: time, longTime(), seconds(), date(), longDate()
-----------------------------------
DELETE
Syntax:
delete <chunk> from <container>;
delete <container;>
Purpose: The delete command can be used to remove a chunk of
information, or all the information from a container. The number of
characters removed from the container is specified by using a chunking
expression involving items, words, lines or characters (see the section
on Chunking).
If you do not specify a chunk to be deleted, HyperPAD will delete all of
the characters in the container. For example:
delete page field 1;
delete salesTax;
Chunks are defined by the characters that are around them. When you
delete items and lines from a container, you also remove the delimiter
(either a comma or carriage return) that defines it. For example,
deleting a line from a field would delete the carriage return at the end
of the line (if there is one).
The following example deletes items from a field. Suppose field 1
contains "Jim, John, Sally, Lisa". The following statement:
delete item 2 to 3 of field 1;
results in field 1 containing "Jim, Lisa". Note that "John, Sally," was
deleted, including the commas.
________________________________________________________________________
Chapter 11: Commands 108
________________________________________________________________________
When to use it: When you want to remove a specific part of a
container's value while keeping the rest intact.
Examples:
delete myvar;
delete page field 5; -- removes all chars in page field 5
The following example deletes the current line from page field 1:
get the currentLine of page field 1;
delete line it from page field 1;
The next example deletes all of the lines that contain the word "BAD".
Care is taken to make sure that the loop is performed the correct number
of times because the number of lines change as we delete lines:
put the number of lines of page field 1 into numlines;
put 1 into i;
while i numlines do
begin
if line i of page field 1 contains "BAD" then
begin
delete line i of page field 1;
subtract 1 from numlines;
end
else add 1 to i;
end;
-----------------------------------
DIAL
Syntax:
dial [pulse | tone | noHayes] <number> [with <modem commands>];
Purpose: With dial, you can call any telephone number (using a modem)
for voice communication. Specify pulse or tone dialing, depending on
your phone service (the default is pulse).
While dialing, you are presented with a message, indicating that dialing
is in progress
If the dial is successful, a dialog box will be displayed requesting
that you pick up the phone. The modem will remain connected until this
dialog box is removed (by selecting the <<Ok>> button).
The dial command performs the following steps when dialing the phone:
1. The modem port is initialized using the current settings of the
global properties modem, dataBits, stopBits, parity, and baud.
________________________________________________________________________
Chapter 11: Commands 109
________________________________________________________________________
2. The modem is initialized using the Hayes modem command "ATV1E0",
causing the modem to echo responses to HyperPAD. HyperPAD waits for the
modem to respond "Ok".
3. The <expression> is prefixed with "ATDP" or "ATDT" depending on if
you specified tone or pulse. Specifying <modem commands> replaces this
default prefix with your own.
For example, the following dial commands are the same:
dial "5551212" with "ATDT";
dial tone "5551212";
4. The <expression> is ended with a semi-colon and a carriage return.
5. The Progress box is displayed and the new expression is sent to the
modem.
6. When the number has completed dialing, a dialog box is displayed
indicating that it is Ok to pick up the phone.
7. After you select the <<Ok>> button from this dialog box, the text
"ATH0" is sent to the modem and HyperPAD waits for the modem to respond
"Ok".
If dial is unsuccessful, you will receive an error message .
This error is not a normal runtime error, however, and will not stop
execution of your script. You can determine if an error occurred by
using the result() function. The result() will be the text "not dialed"
if there was an error, or empty if the dial was successful.
If you have a Hayes incompatible modem, you can use the noHayes option
to dial the phone. In this case, HyperPAD will not send any modem
commands to your modem. The dial command performs the following steps:
1. The modem port is initialized using the current settings of the
global properties modem, dataBits, stopBits, parity, and baud.
2. If you specified <modem commands>, HyperPAD will prefix it to
<expression>.
3. HyperPAD sends the new expression to the serial port. HyperPAD will
not wait for a response; it will return immediately.
For example:
dial nohayes "5551212";
dial nohayes "D 5551212;" & return;
The nohayes option is also useful to initialize your serial port.
________________________________________________________________________
Chapter 11: Commands 110
________________________________________________________________________
The following example uses dial to initialize the COM1 port to
1200,N,8,1:
set the modem to "com1";
set the baud to 1200;
set the parity to "none";
set the stopBits to 8;
set the dataBits to 1;
dial nohayes empty;
Examples:
dial "315-463-1234";
dial "315-463-1234" with "ATZ";
dial pulse "9,18002341624";
if result() is "not dialed" then
answer "Can't dial the phone";
The following example prompts for a number, then dials it. Special care
is taken to check for an area code enclosed in parenthesis. This means
that the number is long distance and should be preceded by a 1.
ask "Number to dial:";
if char 1 of it is "(" then
begin
-- get rid of parenthesis
get substitute(it,"(","");
get substitute(it,")","");
-- long distance
put 1 before it;
end;
get substitute(it," ","");
dial it;
if the result is not empty then
answer "Error dialing the phone!";
Note: The serial port is not initialized until you issue the dial
command.
See Also: baud, parity, stopBits, dataBits, modem
________________________________________________________________________
Chapter 11: Commands 111
________________________________________________________________________
-----------------------------------
DIVIDE
Syntax:
divide <destination> by <expression>
Purpose: The divide command divides <destination> by <expression> and
places the result back into <destination>. The <expression> must be a
number or a container holding a number. The <destination> must be a
container.
Note: You will receive a runtime error if either the <destination> or
the <expression> is not a number.
Examples:
divide page field 23 by 4;
divide salesTax by 0.07;
-----------------------------------
DO
Syntax:
do <expression>
Purpose: The do command compiles and executes the <expression>. This
command provides a mechanism for executing statements from within a
handler that haven't been compiled.
The do command executes statements the same way as the message box.
Thus, you can use the do command to evaluate expressions, putting the
result into the message box. The following example puts the result of a
calculation into the message box:
do "3 + 4 - " && page field 1;
You can only execute one command at a time. Thus, the <expression> can
contain many statements.
The do command must compile the specified statement, which may cause a
slight delay in your script execution. The compiler must be located in
the disk file "HPAD2.OVL", which must be accessible for this command to
work.
________________________________________________________________________
Chapter 11: Commands 112
________________________________________________________________________
Examples:
do "go to the next page";
answer "Go where" with "next","previous";
do "go to" && it && "page";
The following statements execute the contents of field 1:
do page field 1;
-----------------------------------
EDIT SCRIPT
Syntax:
edit [the] script of <object>;
Purpose: This command is used to edit the script of different objects.
This is the same as selecting the object's Info dialog box and selecting
the <Script...> button.
Examples:
edit the script of page "Preferences";
edit the script of page button 3;
edit the script of background "Template";
edit the script of pad;
-----------------------------------
FIND
Syntax:
find [part | whole] <expression> [in <field>];
Purpose: The find command locates text anywhere in your pad. If you
restrict the search to a single background field, only text on any page
in that field will be locate. If you don't restrict the search to a
particular background field, find will locate text in any field in your
pad. (The find command will not locate text on the painting layer of the
page or background.)
HyperPAD searches differently for a part than it does for a whole. The
whole option tells HyperPAD to locate only whole words; that is, only
occurrences that are enclosed by word delimiters (such as spaces, end of
________________________________________________________________________
Chapter 11: Commands 113
________________________________________________________________________
lines, and punctuation) will be found. The part option tells HyperPAD to
locate the text anywhere, even if it occurs within another word.
For example, consider a field containing "John is a lawyer". The
following statement will not find a match:
find whole "law";
The next statement, however, will find a match:
find whole "is";
Using find part, HyperPAD will find occurrences anywhere within the
target text, even if the expression occurs within a word. For example,
consider the same text "John is a lawyer". The following statement will
find a match:
find part "law";
Up to 10 strings can be specified. If more than one is given, find will
locate any of the expressions in the destination. For example:
find whole "john","joe","jack"
After finding an occurrence, the user can press ENTER to search for the
next instance of the string. If the user presses ENTER, the search
begins on the current page where the previous find left off.
If the user presses any other key, the search is terminated.
If find locates a match within a locked field, you are taken to the page
containing the match and the focus is set to the default object (because
a locked field cannot receive the focus). If the user presses ENTER to
locate the next match, the search begins on the next field after the
locked one.
If you use find from the message box, the Find in Progress box is
displayed while HyperPAD searches; two beeps will sound if no matches
are found. If you execute find from a script, the Find in Progress box
and beeps won't occur.
Determine the result of the find command using the result() function. If
the find is successful, result will return "found". Otherwise, result
will return "not found".
Examples:
To find John anywhere in the pad:
find "John";
________________________________________________________________________
Chapter 11: Commands 114
________________________________________________________________________
To find John in the "first name" field:
find "John" in field "First Name";
The following button handler locates the next occurrence of the
highlighted text. If the user hasn't highlighted any text, the Ask
dialog box will appear and ask for something to find:
handler select;
begin
get the selectedText;
if it is empty then ask "Find What?";
if it is empty then exit;
find it;
if the result is "not found" then
answer "Can't find" && it with "Ok";
end;
-----------------------------------
FLUSHCACHE
Syntax:
flushCache;
Purpose: This command writes to disk all of the pages in memory that
have been changed and empties the cache. Internally, HyperPAD keeps
recently accessed pages in an area of the memory called the cache. When
the cache becomes too large to fit in the memory, a page that hasn't
been used in a long time is removed from the cache and written to disk.
When to use it: Anytime you need more free memory for a particular
operation, use this command. Also, use flushCache to prevent thrashing.
(Thrashing is the constant disk access that occurs when the cache is
full. For each new page read from the disk, a page must be written out.)
Examples:
flushCache;
The following example frees up the maximum amount of memory before
cycling through all of the pages in a pad:
flushCache;
for i = 1 to the number of pages do
go to page i;
Note: This command sends the flushCache message. The cache is flushed
when the message is received by HyperPAD.
See Also: maxDirtyPages, autoSave
________________________________________________________________________
Chapter 11: Commands 115
________________________________________________________________________
-----------------------------------
FXSHOW
Syntax:
fxshow <fileName>;
Purpose: This command is used to display images or screen shows from
within HyperPAD. The fxshow command requires an external file called
FXSHOW.EXE. The <fileName> parameter is the DOS filename of the .PRO,
.PR2, .SLD, or .GX2 file you want to view.
When HyperPAD loads for the first time, HyperPAD looks for the file
FXSHOW.EXE in the same directory as HPAD.EXE. If the file is found, you
will see an additional credit message displayed at the bottom of the
screen informing you that fxshow is available. You cannot use the fxshow
command if FXSHOW.EXE is not located in this directory.
The fxshow command causes HyperPAD to shrink down to 3K and run the
program FXSHOW.EXE, passing it information about what files to load.
Refer to Appendix 4, "Support for Show Partner F/X" for more
information.
When running the show, HyperPAD does the following:
1. Switches to the directory containing <fileName>.
2. If no extension is specified, searches for files in this order:
*.PRO, *.PR2, *.SLD, *.GX2.
3. Issues the suspend message to run FXSHOW.EXE.
4. Runs the show.
5. Returns control to HyperPAD.
This is very similar to running a program with the run command, except
that HyperPAD first changes to the directory containing the files you
run.
Examples:
fxshow "sample";
fxshow "C:\FX\SAMPLE\SAMPLE";
fxshow "d:\pics\*.gx2";
Note: This command sends the fxshow message. The handler for this
message is implemented in HyperPAD.
________________________________________________________________________
Chapter 11: Commands 116
________________________________________________________________________
-----------------------------------
GET
Syntax:
get <expression>;
Purpose: Use get to retrieve a value and put it into the local variable
it. The <expression> can be a constant, a literal, a function, or a
container (the value of a variable, a field's contents, or the contents
of the message box).
Examples:
get 1 + 2 * 3;
get field 1 of page 25;
get word 1 to 5 of line 6 of field id 2 of page 88;
Using the local variable it will enhance script readability and
execution speed, as shown in the following example:
get the selectedText;
if it is empty then ask "What do you want to find?";
if it is empty then exit;
find it;
See Also: put
-----------------------------------
GLOBAL
Syntax:
global <var1> [<var2>,...];
Purpose: The global statement allows you to declare a global variable. A
Global variable is accessible to all handlers, not just the handler in
which it is defined. Global variables remain until you exit HyperPAD or
run another program.
Note: The global command cannot be used in a do command or in the
message box.
When to use it: If you want a particular variable to maintain its value
between handlers or pads, you must define it as a global variable.
Examples:
global taxAmount,salesAmount,userName;
________________________________________________________________________
Chapter 11: Commands 117
________________________________________________________________________
-----------------------------------
GO
Syntax:
go [to] [pad] <padName> [with diskChange <expression>];
go [to] <background> [of [pad] <padName> [with diskChange
<expression>]];
go [to] <page> [of <background>] [of [pad] <padName> [with diskChange
<expression>]];
go back;
go help;
go home;
Purpose: The go command changes to another page, background or pad. The
destination indicates which page (and if necessary, which pad) will be
displayed. If the destination specifies only a pad, HyperPAD goes to the
default page (the page which was last accessed) of that pad. You can
alter the destination by supplying a container as the destination.
The diskChange option allows you to specify that the destination pad may
be on a different disk. In this case, the user will be asked to switch
disks using the <expression> that you supply as a prompt. For example:
go to pad "a:phone" with diskChange "Insert Disk 2";
When you supply the diskChange parameter:
1. The current pad is closed.
2. HyperPAD displays a dialog box with the message the you supplied.
3. The user can then remove a disk and insert the disk containing the
desired pad. If the user selects <<Ok>>, HyperPAD will attempt to load
the pad from the new disk.
If the user is unable to insert the correct disk and presses <Cancel> at
the dialog box, HyperPAD will attempt to load the original pad. If
unable to do so, HyperPAD will ask the user to insert the original
disk...and will continue to do so until the original disk has been
inserted.
The go home and go help statements are special because they use
HyperPAD's special file searching method to locate the pad.
________________________________________________________________________
Chapter 11: Commands 118
________________________________________________________________________
The statement
go to pad "HOME";
may not be unable to locate the Home pad because it may not be in the
current directory or path. Thus, if you want to access either the Home
or Help pads you should use go home and go help.
go back - is the same as selecting Back from the Go menu.
go recent - goes to the most recently accessed page (the one that you
just came from).
You can also use ordinal types with the go command. The allowed ordinal
types are:
first, second, third,...,tenth
next
previous
any
middle
this
recent
If you attempt to go to a page beyond the end of the pad, the result()
function will return "no such page"; otherwise, it will return empty.
Examples:
go to page 1;
go to page 1 of background 2;
go to background "template";
go "phone";
go to pad "phone";
go to pad "phone" with diskChange "Insert Disk 2";
go to page 2 of pad "Phone";
go to page 1 of background 2 of pad "Phone" with
diskChange "Insert Disk 2";
go to the next page;
go to page (currentPage() + 10);
go to page ("taxNumber" && i);
________________________________________________________________________
Chapter 11: Commands 119
________________________________________________________________________
go to any page;
go to the recent page;
go to the first page of pad "Phone"
ask "Go to what pad?"; -- ask for a name
go to pad it;
ask "Go to what page?"; -- ask for name or number
go to page it;
Note: Remember, pads are only referenced by name. Thus, the only way to
go to a pad is to supply the DOS name of the pad:
go to pad "phone";
Pages and backgrounds, however, can be referenced by either their number
within the pad, their ID, or their name. For example:
go to page 10; -- by page number
go to page id 56; -- by page ID
go to page "status"; -- by page name
When going to backgrounds, HyperPAD really goes to pages on the
specified background. The following list summarizes what happens with
different go statements involving backgrounds:
The following statement goes to the first page on the first background
that you created.
go to background 1;
The next statement goes to the first page after the current page that is
on a different background.
go to the next background;
The next statement goes to the fifth page that uses background 2.
go to page 5 of background 2;
The next statement goes to the next page after the current page that
uses the same background.
go to the next page of this background;
________________________________________________________________________
Chapter 11: Commands 120
________________________________________________________________________
-----------------------------------
HIDE
Syntax:
hide <object>;
Purpose: The hide command allows you to make the specified button or
field invisible. This command actually modifies the visible property of
the target object. In fact, the following two statements are equivalent:
hide page button 1;
set the visible of page button 1 to false;
When to use it: If you want a button or field to become visible only
when certain criteria are met, you can use hide and show to toggle the
object's visibility.
Examples:
hide page field 1;
hide background button 3;
See Also: show, visible
-----------------------------------
HILITE
Syntax:
hilite [<chunk>];
hilite <field>;
hilite the message box;
Purpose: This command highlights text within a field or the message box.
The text that gets highlighted is copied into the selectedText.
When highlighting text, the text becomes highlighted on the screen.
________________________________________________________________________
Chapter 11: Commands 121
________________________________________________________________________
Examples:
hilite char 1 to 5 of page field 1;
hilite line 1 of page field 1;
hilite the last line of me;
hilite field "Last Name";
hilite the message box;
hilite word 2 of msg;
The following example locates the word "lawyer" in a field and
highlights it.
get offset("lawyer",field "occupation");
if it is 0 then exit;
hilite char it to (it + 5) of field "occupation";
See Also: selectedText
-----------------------------------
MULTIPLY
Syntax:
multiply <destination> by <expression>;
Purpose: This command multiplies the value of the <destination> by the
value of the <expression> and places the result into the <destination>.
The expression must be a number or a container holding a number. The
destination must be a container.
Note: You will receive a runtime error if the <destination> or the
<expression> are not
both numbers.
Examples:
multiply page field 1 by 6;
multiply totalAmount by salesTax;
multiply the message box by 10;
See Also: add, subtract, divide
________________________________________________________________________
Chapter 11: Commands 122
________________________________________________________________________
-----------------------------------
NOSOUND
Syntax:
noSound;
Purpose: This command stops any music or tones that are currently being
played.
Examples:
sound 2000; -- start a sound
wait 200; -- 200 milliseconds
noSound; -- turn it off
The following example plays notes for 5 seconds.
play "abcdefg";
wait 5000;
noSound;
Note: This command sends the noSound message which is implemented in
HyperPAD.
-----------------------------------
PLAY
Syntax:
play <expression>;
Purpose: The play command allows you to play music in the background
while other HyperPAD tasks are taking place.
________________________________________________________________________
Chapter 11: Commands 123
________________________________________________________________________
The <expression> is a string containing note and music commands:
Command: Description:
-----------------------------------------------------------------
A-G Play this note.
+,# Make the preceding note sharp.
- Make the preceding note flat.
Ln Set the length of each note to n. L1= full note, L2 = 1/2
note, L3= 1/4 note (default). The range of n is 1 to 64.
MN Play normal. Each not will play 7/8 of the time given by L.
ML Music legato. Each note will play the full time given by L.
MS Music staccato. Each note will play 3/4 of the time given by
L.
On Sets the current octave to n. The default is 2, the range of
octaves is 0 to 6. Middle C is at the beginning of octave 3.
Pn Pause = n. The range of n is 1 to 64.
Tn Tempo = n. This sets the number of L4 quarter notes in one
minute. The range of n is 32-255. The default is 120.
>n Increases the octave of the next note by 1.
<n Decreases the octave of the next note by 1.
. Increases the playing time of the note (L*T) by 50%. Multiple
periods can appear after a note (multiples the playing time
by 3/2). Periods may also appear after a pause.
Note: Any spaces in your play string are ignored.
Music continues to play in the background until there are no more notes
to play. You can stop the music by issuing a noSound command. You can
determine if music is playing using the isSound() function.
Examples:
play "cdefgabc";
play "O1 L16 T12O A O2 P4.. B.";
Notes: This command sends the play message. When the message is received
by HyperPAD, the music will begin playing in the background.
See Also: noSound, isSound()
________________________________________________________________________
Chapter 11: Commands 124
________________________________________________________________________
-----------------------------------
PLAYBACK
Syntax:
playBack;
Purpose: The playBack command starts the replay of keys that have
previously been recorded using the record command.
HyperPAD begins executing a playBack command on the next idle message.
If keys are played back within HyperPAD, the first key will be pressed
at the beginning at the next idle (when HyperPAD checks for key
presses). The real power, however, is in HyperPAD's ability to play back
keys while other programs are running, like in the following example:
record "/frHOUSE.WK1{enter}";
playback;
run "C:\LOTUS\123.EXE" with programDirectory;
Note: This command sends the playBack message. The playBack command is
executed when this message is received by HyperPAD.
See Also: record
-----------------------------------
POP PAGE
Syntax:
pop page [into <container>];
Purpose: The pop page command removes the last pushed page from the page
stack and either goes to it or places it into a container.
The push page command allows you to remember where you are in your pad
as if you had placed a bookmark on that page.
Then, when you want to return there, you use the pop page command. You
can place a series of these bookmarks, in which case pop page will take
you to those pages in the reverse order in which you placed them.
________________________________________________________________________
Chapter 11: Commands 125
________________________________________________________________________
If you use the form
pop page;
you will actually be taken there (you will change pages and possibly the
pad). You can also put the references to that page into a variable:
pop page into pageRef;
pageRef will contain a page reference similar to the following:
page id 2 of pad "C:\HOME.PAD";
Examples:
The following statements show several different uses of the page stack.
The first example remembers the current page, fetches the user's name
from the Home pad, and returns.
push this page;
go home;
go to page "preferences";
put page field "User Name" into userName;
pop page;
push recent;
pop page into pageRef;
get the last word of pageRef;
go to the first page of pad it;
See Also: push page
-----------------------------------
PRINT
Syntax:
print <expression> [at <x>,<y>];
print <page reference>;
print <number> pages;
Purpose: The print command prints either a page, a group of pages, or an
expression at an optional X,Y location.
Printing pages within HyperPAD is controlled by the current settings in
the Print Page dialog box, the Page Setup dialog box, and the Printer
Setup dialog box. Printing pages with the print command is exactly the
same as choosing Print from the File menu and selecting the Pages
option.
________________________________________________________________________
Chapter 11: Commands 126
________________________________________________________________________
For example:
print page 1;
print page "status";
print the next page;
print 10 pages;
Printing text, on the other hand, is not controlled by the current print
settings. You must turn the printer on and off manually (using the
printer property) and eject pages by sending formfeeds from your script.
The following steps are taken:
1. Turn the printer on.
2. Do your printing.
3. Turn the printer off.
The print command keeps track of the printhead position internally. When
you first turn the printer on, the print head is positioned at 1,1 on
the page. As you print characters across the page, the print head X
position changes to different coordinates, such as 10,1. As you print
carriage returns, the X position is reset to 1 and the Y position is
incremented, like 1,10. When you print an end of page (formfeed) the
print head position is reset to 1,1.
You can directly locate the print head using the print at syntax. For
example:
print "hello world" at 10,10;
When using this syntax, you can only move the print head to the right on
the current line or down on the page. The printhead cannot backtrack
over already printed text.
Examples:
print page field 1;
print page field 1 & return & page field 2;
print formfeed;
print page field "First Name" at 10,10;
________________________________________________________________________
Chapter 11: Commands 127
________________________________________________________________________
The following example prints the AUTOEXEC.BAT file:
set the printer to on;
put open ("C:\AUTOEXEC.BAT") into fh;
if the result is not empty then exit;
while the result is not "eof" do
begin
read 1 line from fh;
print it & return;
end;
set the printer to off;
close fh;
The following handler prints all the page fields in a pad:
handler select;
begin
ask "Which pad?" with currentPad();
if it is empty then exit;
go to pad it;
for i = 1 to the number of pages do
begin
go to page i;
for j = 1 to the number of pg flds do
print page field j & return;
end;
end;
-----------------------------------
PUSH
Syntax:
push <page description>;
push recent;
Purpose: The push page command saves a page identifier on the page
stack. The push page command remembers a page and pad so that you can
later return there with the pop page command. You can think of this
command as placing a bookmark at a location within a pad.
________________________________________________________________________
Chapter 11: Commands 128
________________________________________________________________________
The push recent syntax saves the page that you just came from on the
page stack. This is particularly useful for returning back there later,
like in the following example:
This handler belongs in a pad script.
handler openPad;
begin
push recent;
pass;
end;
When you want to return from where you came:
handler select;
begin
pop page;
end;
When to use it: Use the push page command when you want to remember a
particular location within a pad so that you can later return there.
Examples:
The following script visits every page of a background, sending a
message to one of its fields and then returns to the page it started
from.
handler select;
begin
put 0 into total;
push this page;
for i=1 to the number of pages of bkgnd 2 do
begin
go to page i of bkgnd 2;
send "reCalc" to field "Item Cost";
add pg fld "Item Cost" to total;
end;
pop page;
answer "The total was" && total;
end;
Some other examples:
push this page;
push recent;
push previous page;
push next page;
________________________________________________________________________
Chapter 11: Commands 129
________________________________________________________________________
push first page;
push page 2 of bkgnd 4;
See Also: pop page
-----------------------------------
PUT
Syntax:
put <expression> [into <destination>];
Purpose: The put command places information into a container: either a
field, a variable, or the message box. The <expression> can be text,
numeric, a numeric expression, or a container. The <destination> must be
a container.
Expressions are evaluated before they are stored in the destination. So,
if you put an arithmetic equation, its result is placed into the
destination.
If no destination is specified the result is placed into the message
box.
The put command is probably the most often used command in PADtalk. It
provides the only mechanism for copying data from one location to
another.
Examples:
put 10 into page field 1;
put longDate() into the message box;
put "Wowee" after word 7 of pg fld id 8;
put page field "subTotal" into page field "total";
put 10 into field 1 of page 6 of background 2;
put empty into me;
The following two statements are the same:
put "hello";
put "hello" into the message box;
The next two statements are also the same:
put "hello" into it;
get "hello";
See also: get
________________________________________________________________________
Chapter 11: Commands 130
________________________________________________________________________
-----------------------------------
QUERY
Syntax:
query <expression>;
query clear;
Purpose: The query command creates a subset of pages based on some
criteria. The query command goes to each page of a particular background
and evaluates a boolean (true or false) expression. If the expression is
true, then the page is included in the query. If the expression is
false, then the page is excluded from the query. A subset of the pages
that meet the criteria is formed.
The following example will include only pages that contain "John" in the
"name" field.
query field "Name" contains "John";
If you want to query on a numeric field:
query field "Total" > 10;
The following statement shows the versatility of the query command. It
results in a random set of about half of the pages of any background
being included in the query.
query random(2) = 1;
Once the query has been established, the pad user can view only those
pages included in the subset. Using the built-in navigation tools
(including PGUP and PGDN), the user can move between the pages in the
group. While a query is active, the user can also print and sort those
pages.
Although you can use PADtalk commands to access other pages in the pad,
in order to restore the pad to its pre-query state, you must clear the
query with the query clear command.
The query will also be cleared if you perform another query, exit to
DOS, or run another program.
For larger queries, HyperPAD may be required to create a temporary file
to hold some query information. The file will reside in the program
directory (where HPAD.EXE is located) and will have the same name as
your current pad but with an ".IDX" file extension.
The result of the query can be determined using the result() function.
The result() will return "found" if the query found at least one page;
otherwise the result() will return "not found".
________________________________________________________________________
Chapter 11: Commands 131
________________________________________________________________________
Examples:
query field 1 contains "Smith";
if the result is "not found" then
answer "No pages in query.";
query field 1 = 3 and field 2 10;
query field 1 = 3 and field 2 10 or state = "NY";
See Also: find, sort
-----------------------------------
READ
Syntax:
read from <fileNumber> until end;
read from <fileNumber> until <character>;
read <expression> characters | items |
words | lines from <fileNumber>;
Purpose: The read command reads data from a file into the local variable
it. You can only read from files that have been opened using the open()
function.
The syntax read from <fileNumber> until end is used to read all the
characters that remain in the file starting at the current position in
the file.
put open("data.dat") into fh;
read from fh until end;
close fh;
put it into field 1;
The syntax read from <fileNumber> until <character> is used to read all
of the characters up to the next occurrence of character starting at the
current position. For example:
put open("data.dat") into fh;
read from fh until "A";
close fh;
put it into field 1;
The syntax read <expression> characters | items | words | lines from
<fileNumber> is used to read a number of characters, words, items, of
lines from the file into the variable it.
________________________________________________________________________
Chapter 11: Commands 132
________________________________________________________________________
For example:
put open("data.dat") int fh;
read 1 character from fh;
put it;
read 6 words from fh;
put it;
read 5 items from fh;
put it;
read 2 lines from it;
put it;
Words are surrounded by either spaces or carriage returns, items are
determined by commas, and lines are defined by carriage returns.
When reading from files, HyperPAD translates carriage return/line-feed
pairs to single carriage returns.
You can determine if you have reached the end of file using the result()
function. If you have reached the end of file, the result() returns
"eof". Otherwise, the result() will be empty. The end of file is
determined by either an end of file marker (Hex 1A) or by reading the
number of characters determined by the file size. For example:
Examples:
read from file_number until end;
read from file_number until "@";
read n+1 words from file_number;
read 1 line from file_number;
This example reads the AUTOEXEC.BAT file into page field 1:
put the open of "C:\AUTOEXEC.BAT" into fh;
read from fh until end;
close fh;
put it into page field 1;
The next handler reads a text file of names and addresses into the PHONE
pad. Each record in the text file is separated by a blank line. The
format of the phone record in the text file is as follows:
Name
Phone Number
Address
Name
Phone Number
Address
________________________________________________________________________
Chapter 11: Commands 133
________________________________________________________________________
The address field can take up as many lines as necessary, as long as a
blank line is understood as separating the records:
handler readPhoneRecords;
begin
put open ("PHONE.TXT") into fh;
repeat
doMenu "new page";
read 1 line from fh;
put it into field "Name";
read 1 line from fh;
put it into field "Phone Number";
read 1 line from fh;
put empty into "Address";
repeat
read 1 line from fh;
if it is not empty then
put it after the last line of address;
until it is empty;
put address into field "Address";
until the result is "eof";
close fh;
end;
Note: The <fileNumber> parameter is a number returned by the open()
function.
See Also: write, create(), append(), open()
-----------------------------------
RECORD
Syntax:
record <expression>;
Purpose: This command records keystrokes for later playback using the
playBack command. The number of keystrokes you can record is 100.
Recorded keystrokes remain in memory when you run other programs. If
there are any keys in the buffer when another program is launched, they
are immediately played back when the running program is started.
The <expression> contains the keystrokes that you want played back.
Letters and punctuation are types in as normal, like:
record "hello";
Special keys and key combinations are placed inside brackets, like:
record "{alt+f}Njunk.pad{enter}";
________________________________________________________________________
Chapter 11: Commands 134
________________________________________________________________________
A complete list of all of the special keys and key combinations is
located in Appendix 2, "Key Codes". The record command will translate
all of the keys in the <expression> to numbers.
In addition to keystrokes, there is a special command that you can place
within brackets called pause. For example:
record "{escape}{enter}{pause:5000}";
The pause command waits a specified number of milliseconds before
continuing keystroke playback. Thus, {pause:500} waits for half a
second.
When to use it: When combined with the run command, the record and
playback commands are particularly useful because you can pump
keystrokes into other programs.
Examples:
record "this is a test";
record "{alt+f}ophone{enter}";
The following runs BASICA, loading a program called DEMO and running it:
handler select;
begin
record "load ^"DEMO.BAS^"{enter}run{enter}";
playBack;
run "BASICA.EXE";
end;
Notes: This command sends the record message. HyperPAD handles the
record message.
See Also: playBack
-----------------------------------
RUN
Syntax:
run <program>;
run <program> with programDirectory;
run <program> with pause;
run <program> with programDirectory,pause;
Purpose: The run command executes other programs you use on your
computer. While the external program is running, HyperPAD shrinks to 3K,
________________________________________________________________________
Chapter 11: Commands 135
________________________________________________________________________
giving the program as much memory as possible. When you exit the
external program, HyperPAD resumes where it left off.
The pause parameter causes HyperPAD to display the message
Press any key to return to HyperPAD
before returning to HyperPAD. HyperPAD will resume after any keystroke
or mouse button press.
The programDirectory option controls which directory the program will be
executed from. If specified, the current directory will be changed to
the directory containing the program. If it is not specified, the
current directory will remain unchanged. This parameter is used mainly
with programs that require you run them from their own directory.
When running another program, HyperPAD performs the following steps:
1. If the extension is not supplied, HyperPAD looks for .EXE, .COM, and
.BAT files.
2. If a directory is specified with the filename, HyperPAD looks only
in that directory for the program.
3. If no directory is specified, HyperPAD searches the following areas
(in this order) for the program:
a. The current directory.
b. The directory specified by the environment variable HPADNET.
c. The program directory (where HPAD.EXE is located).
d. The startup directory (where HPAD.EXE was started from).
e. Every directory specified in the path.
You can determine the return code of the a program using the result()
function. Normally, you can determine the return code of a program in a
batch file using the DOS errorlevel batch command. In HyperPAD, this
number is returned by the result() function.
Examples:
To return temporarily to the MS-DOS prompt:
run environment("COMSPEC");
To run a standard program:
run "C:\123\123.EXE" with programDirectory;
To run a batch file called C:\BATS\TEST.BAT:
run "C:\COMMAND.COM /c C:\BATS\TEST.BAT";
________________________________________________________________________
Chapter 11: Commands 136
________________________________________________________________________
To run a batch file leaving room for a larger environment:
run "C:\COMMAND.COM /e:2048 /c C:\BATS\TEST.BAT";
To run a program and pause before it returns:
run "FORMAT.COM A:" with pause;
Abbreviations: programDir, progDir
-----------------------------------
SEND
Syntax:
send <message> <parameter list> to <object>
Purpose: The send command sends a message, along with its parameters, to
a specific object. It allows you to redirect a message's normal travel
up the hierarchy to another object.
When to use it: Use the send command when you want some action to be
performed that is handled by some other object or handler.
It can also be used to bypass a message handler in the hierarchy.
Parameters: The <message> parameter is any message for which a handler
has been defined in the hierarchy of the receiving object. The
characters of the message must be enclosed in double quotes, like
"select". The optional <parameter list> is a list of values separated
by commas that will be used by the receiving message handler.
Examples:
send "select" to page button "Quit";
send "keyPress" 7181 to me; -- simulate ENTER
send "changeTemp" "up",5 to fld "Thermostat";
The following statement avoids the other objects in the hierarchy by
sending a message directly to HyperPAD:
send "doMenu" "new page" to hyperpad;
The send message will travel up the hierarchy of the receiving object.
________________________________________________________________________
Chapter 11: Commands 137
________________________________________________________________________
The following example sends a message to one of two routines. It either
adds or multiplies two numbers, depending on which option the user
wants:
handler _add(n1, n2);
begin
put n1 + n2;
end;
handler _multiply (n1,n2);
begin
put n1 * n2;
end;
handler select;
begin
answer "add or multiply" with "add", "multiply";
if it is not empty then
send "_" & it 10,12 to me;
end;
Note: The send command changes the value of the me object, but does not
change the value of target or currentObject. You can only send messages
to objects within the current pad. If you send a message to another
page, that page does not become the current page (i.e. it will not
receive the openPage message). Parameter expressions are evaluated
before the message is sent.
-----------------------------------
SET
Syntax:
set [the] <property> [of <object>] to <value>;
Purpose: The set command establishes property values of the objects in
your pads. With set, you can modify properties affecting buttons,
fields, pages, backgrounds, pads, the message box, the menu bar, the
status bar and the tool box.
The properties that you can set for the different objects are described
in Chapter Twelve, "Properties".
Examples:
set hilite of page button 1 to true;
set lockScreen to false;
set the color of page field 4 to black on white;
________________________________________________________________________
Chapter 11: Commands 138
________________________________________________________________________
-----------------------------------
SETDEFAULTPOPUPCOLOR
Syntax:
setDefaultPopupColor;
Purpose: This handler resets the colors of the popup menus to the same
values that HyperPAD uses to display the pull down menus. These colors
are modified depending on your computer's graphics card and the command
line parameters /mono, /lcd, /B&W, and /color.
See Also: popup(), setPopupColors
-----------------------------------
SETPOPUPCOLORS
Syntax:
setPopupColors <menu color>,<highlight color>,
<letter color>,<dimmed color>;
Purpose: This handler sets the display colors for future popup menus.
The colors are used as follows:
Color: Description:
----------------------------------------------------
Menu color The color of the menu, including the border
Highlight color The color of a highlighted choice
Letter color The color of the accelerator characters of the
choices (specified with the & within the choice)
Dimmed color The color of dimmed choices (specified with the @
character within the choice)
Examples:
setPopupColors 31,112,27,123;
setPopupColors light green,black on grey,red,light grey;
See Also: popup(), setDefaultPopupColors
________________________________________________________________________
Chapter 11: Commands 139
________________________________________________________________________
-----------------------------------
SHOW
Syntax:
show <object>;
Purpose: The show command makes the specified button or field visible;
this is the same as setting the visible property of the object to true.
When to use it: If you want a button or field to become visible only if
certain criteria are met.
Examples:
show page button 3;
show page field 7;
The following two statements are equivalent:
show button 1;
set the visible of button 1 to true;
See Also: hide, visible
-----------------------------------
SORT
Syntax:
sort [ascending | descending] [text | numeric | date]
by <expression>;
Purpose: The sort command reorders the pages belonging to a background
according to a specified condition.
The sort command works by cycling though all the pages of a particular
background and evaluating an expression. The result of the expression is
saved and used as a sort key. Once all of the sort information has been
gathered, the pages are sorted in the specified order.
For example, the following statement sorts a pad by the first background
field:
sort by field 1;
For each page in the current background, the expression field 1 is
evaluated and used as sort criteria. Suppose that there are 5 pages in
this pad, each using the same background.
________________________________________________________________________
Chapter 11: Commands 140
________________________________________________________________________
After sort has cycled through all of the pages and evaluated the
expression, the situation is as follows:
at page 1, field 1 = "Sue"
at page 2, field 1 = "John"
at page 3, field 1 = "Zev"
at page 4, field 1 = "Lisa"
at page 5, field 1 = "Jim"
After sorting, the pages will be reordered as follows:
page 5 will become page 1 ("Jim")
page 2 will become page 2 ("John")
page 4 will become page 3 ("Lisa")
page 1 will become page 4 ("Sue")
page 3 will become page 5 ("Zev")
When there are multiple backgrounds in the pad, sort may appear to give
incorrect results because pages in the pad that use different
backgrounds will remain in their same positions. For example, suppose we
have 7 pages, 5 pages using background 1 and 2 pages using background 2.
We perform the same sort on the first page of background 1:
page 1, background 1, field 1 = "Sue"
page 2, background 2
page 3, background 1, field 1 = "John"
page 4, background 1, field 1 = "Zev"
page 5, background 2
page 6, background 1, field 1 = "Lisa"
page 7, background 1, field 1 = "Jim"
After sorting, the pad will be organized as follows (notice that the
pages of background 2 remained in their relative positions in the pad):
page 7, background 1 ("Jim")
page 2, background 2
page 3, background 1 ("John")
page 6, background 1 ("Lisa")
page 5, background 2
page 1, background 1 ("Sue")
page 4, background 1 ("Zev")
The sort command treats the data differently if you specify text,
numeric, or date. For text data, HyperPAD alphabetizes the data. For
numeric data, HyperPAD compares numeric quantities. For dates, HyperPAD
compares the data as dates (dates can be represented using any format
the convert command recognizes).
________________________________________________________________________
Chapter 11: Commands 141
________________________________________________________________________
The optional parameter ascending (the default) specifies that you want
the data sorted with the lowest values near the front; descending
specifies the opposite.
For larger sorts, a disk file may be required to hold temporary sorting
data. In such a case, HyperPAD creates a temporary file in either the
directory specified by the TMP environment variable, or if TMP is not
specified, in the directory from which you launched HyperPAD.
To make sorting faster, therefore, you can have TMP specify a directory
on a RAM disk, as in the following DOS command:
SET TMP=D:\
Examples:
sort descending by field "name";
sort by the last word of field "name";
sort numeric by field "age";
sort ascending date by field "birthday";
See Also: query, find
-----------------------------------
SOUND
Syntax:
sound <frequency>;
Purpose: The sound command turns the speaker on at a given frequency.
The sound will remain on until you turn it off using the noSound
command.
Examples:
sound 2000;
wait 500; -- half a second
noSound;
Notes: This command sends the sound message. When the handler reaches
HyperPAD, the sound handler is executed.
________________________________________________________________________
Chapter 11: Commands 142
________________________________________________________________________
-----------------------------------
SUBTRACT
Syntax:
subtract <expression> from <destination>;
Purpose: The subtract command subtracts the value of the expression from
the value of the destination and places the result into the destination.
The <expression> must be a number or a container holding a number. The
<destination> must be a container.
Note: You will receive a runtime error if the <expression> and
<destination> are not both numbers.
Examples:
subtract 5 from page field 23;
-----------------------------------
VISUAL
Syntax:
visual [effect] <effectName> [<direction>]
[with delay <expression>];
Purpose: The visual command sets up an effect to be used during the next
page or pad change. Instead of simply replacing one page with another
(which is the default) you can select an effect which alters the manner
in which a page is placed on-screen.
Once the effect has been executed, it is reset to the replace effect
(the default). So, you must specify an effect each time you want it to
occur.
The following list includes all the effects and their usable directions:
Effect: Direction:
----------------------------------------------------------
box in, out
drip none
fade none
hsplit in, out
peel upperleft, lowerleft, upperright, lowerright
quad none
replace none
________________________________________________________________________
Chapter 11: Commands 143
________________________________________________________________________
When to use it: Visual effects are useful if you want to capture your
audience's attention without distracting them from the information
you're relating.
Examples:
The following example goes to the next or previous page depending on
whether the SHIFT key is depressed when the button was selected. It uses
an appropriate visual direction as a user feedback device.
handler select;
begin
if the shiftKey is "down" then
begin
visual effect scroll down;
go to the previous page;
end
else
begin
visual effect scroll up;
go to the next page;
end
end;
Comments: The visual effect is set to replace when the next idle message
is sent (upon completion of all pending handlers).
-----------------------------------
WAIT
Syntax:
wait <milliseconds>;
Purpose: This command waits a specified number of milliseconds. Pressing
CTRL+BREAK will terminate the wait command and stop execution of the
script.
The delay is the same for all computers. HyperPAD uses either the real
time clock (on AT style computers) or the system clock (interrupt 8) so
that it ticks 1000 times per second.
Examples:
wait 5000; -- 5 seconds
wait i * 1000; -- if i = seconds
________________________________________________________________________
Chapter 11: Commands 144
________________________________________________________________________
-----------------------------------
WRITE
Syntax:
write <expression> to <fileNumber>;
Purpose: The write command adds data to an open file. Only files opened
with the append() or create() function can be used with this command.
Examples:
To write a field to a file:
put create("data.dat") into fh;
write page field 1 to fh;
close fh;
Use the return constant to end a line:
write page field "name" & return to fh;
write page field "address" & return to fh;
write page field "phone number" & return & return to fh;
Note: Single carriage returns are translated to carriage return/line-
feed pairs. All files are automatically closed when the user exits or
runs another application using the run command.
________________________________________________________________________
Chapter 4: Containers 41
________________________________________________________________________
CHAPTER FOUR: CONTAINERS
HyperPAD offers four storage facilities, called containers, in which you
can store data. These four containers are fields, variables, the message
box, and the selectedText. Each of these containers can hold up to 32000
characters (depending on available memory).
The commands get and put allow you to manipulate the contents of
containers (Use set with the selectedText). For example:
put "hello there" into page field 1;
put 18.2 * 56.78 into subTotal;
put "Please Wait..." into the message box;
set the selectedText to "hello there";
FIELDS
Fields are display and retrieval areas for text within your pads. Fields
do not have a fixed length, as they do in some database programs. They
can hold any length of text up to 32000 characters, making them
efficient storage devices. The following examples show how to manipulate
a field's contents using the PADtalk commands put and get.
put "This is a test" into field "Status";
put field 2 before word 2 of field "Status";
get page field id 6; -- into "it"
________________________________________________________________________
Chapter 4: Containers 42
________________________________________________________________________
VARIABLES
A variable is a named container that you can use to store data within
your script. Like fields, variables can hold up to 32000 characters. The
name of a variable can be up to 255 characters long, but it is usually
beneficial to keep the name a readable length. Variable names must start
with a letter, underscore (_) or $ and contain no spaces. The following
are examples of variable names:
TaxResult
R6
i
$fixedAmount
CalculatedTotal
_total_with_adjustments
You do not need to declare variables before using them in HyperPAD (as
you do in other languages). You just put something into them.
Variables in HyperPAD have no type, as they do in other languages.
HyperPAD makes no distinction between text and numbers. Thus, the
following operations are legal:
10 + i
"10" + i
(word 2 of "hello 5 there") + 67.89 - i
56 & i & "hello"
If you attempt to apply a mathematical operator to text, however, you
will receive an error message. For example:
5 + "hello"
Because variables in HyperPAD can be either textual or numeric, the
number 0 and the text quantity empty ("") have special meaning. In fact,
they are equivalent. When a variable is first introduced, its value is
initially empty (""). If the variable is then used in a comparison with
another text quantity, the value will be empty (no length). If it is in
a comparison with a number, its value will be 0.
The equivalence of 0 and empty is important when performing comparisons.
Consider the following comparison in PADtalk:
if i is empty then......
When HyperPAD compares the two quantities (i and empty), it will attempt
to convert both to numbers (HyperPAD first tries to compare numbers,
then text). If i is initially empty, then the conversion will change the
________________________________________________________________________
Chapter 4: Containers 43
________________________________________________________________________
value of i to 0. When this occurs, you can rewrite the comparison as
follows:
if i & "x" is "x" then......
This forces HyperPAD to compare two quantities as text and avoid its
internal conversion to numbers.
Internally, HyperPAD keeps track of whether a variable is textual or
numeric. HyperPAD will not perform any internal conversions if the
variable is being used in accordance with its current type. This greatly
speeds up script execution by reducing internal conversions.
LOCAL VARIABLES
A local variable is a temporary storage container used during the
execution of a handler. When the handler has completed execution, the
local variables are relinquished. The following is a handler that uses a
local variable called temp:
handler select;
begin
put 10 * 5 into temp;
put temp into page field 1;
end;
Access to local variables is faster than access to any other type of
container. Thus, to speed up a script you may want to copy global
variables or field contents into a local variable, like in the following
example:
put page field 1 into temp; -- make a copy
for i = 1 to 10 do
if line i of temp is "lawyer" then beep;
This example stores the data from a field in the local variable temp to
speed up the loop that follows.
Every handler reserves a special local variable called it. This is used
to hold temporary results and is even used by some commands to return
values. For example:
get page field 1; -- puts the data into "it"
put it into the message box;
ask "What is your name?"; -- puts response into "it"
if it is "joe" then beep;
Using the variable it enhances the readability of your PADtalk scripts.
________________________________________________________________________
Chapter 4: Containers 44
________________________________________________________________________
GLOBAL VARIABLES
Global variables are accessible from all handlers and functions. Global
variables stay around until you exit HyperPAD or run another program.
You can tell your handler that a variable is global using the global
statement. The following statement declares two global variables
lineCount and totalPrice:
global lineCount,totalPrice;
When you are done using global variables, you may want to delete their
values to save memory. You can do this using the delete or put command:
put empty into lineCount;
delete totalPrice;
The following handler uses a global variable called previousText to
store the user's last response to the ask statement:
handler select;
begin
global previousText;
ask "Where do you live" with previousText;
put it into previousText;
end;
PARAMETER VARIABLES
Parameter variables are place holders that attach names to values which
are passed to handlers and functions. Parameter variables are similar to
local variables in that they can only be used within the handler in
which they are declared. The following example shows a handler that
declares some parameter variables and how to call it:
handler CalculateResult(interest,periods);
begin
put interest * periods / 365 into page field 1;
end;
handler select;
begin
CalculateResult 12 / 100,36;
end;
________________________________________________________________________
Chapter 4: Containers 45
________________________________________________________________________
THE MESSAGE BOX
The message box is a container that has two uses:
1. You can display messages for the pad user.
2. You can type in commands and execute them immediately.
The following example uses the message box to tell the user to wait:
show the message box;
put "Please Wait..." into the message box;
The message box is the default destination of the put command. For
example, the following statements do the same thing:
put "Please Wait...";
put "Please Wait..." into the message box;
The message box can be referred to by:
the message box
message
msg
msg box
THE SELECTEDTEXT
The selectedText is another storage facility into which you can put
information. Also, text is automatically stored here when the user
highlights text in a field (using the SHIFT+ARROW keys or dragging the
mouse). You can use put and get to retrieve its contents:
put the selectedText into page field 1;
get the selectedText; -- put it into "it"
However, unlike other containers, you can only set its value using the
set command:
set the selectedText to "hello there";
set the selectedText to empty;
Changing the value of the selectedText has no effect on the display.
________________________________________________________________________
Chapter 6: Control Structures 51
________________________________________________________________________
CHAPTER SIX: CONTROL STRUCTURES
HyperPAD usually executes commands in the sequence they appear in your
script. Control structures change this linear sequence. You can create
loops, conditional statements (commands that get executed only if
certain conditions exist), and selection statements (which select a
block of statements from a list).
HyperPAD's control structures are similar to Pascal's:
if...then...else conditional
case conditional
while...do looping
repeat...until looping
for...do looping
-----------------------------------
IF STATEMENT
Syntax:
if <expression> then
<statement>
[else
<statement>];
Purpose: The if structure specifies that a statement should be executed
only if a certain condition is true. If the condition is false, then
either no statement is executed or the else statement is executed. The
if statement responds directly to the user of your pad by executing
commands based on the user's actions. For example, if step four is not
completed, then do not allow the user to advance to the next page.
<Expression> must return a Boolean value (either true or false).
<Statement> is a single PADtalk statement. Multiple statements are
enclosed in a begin...end block.
Note: The entire if statement ends with a semi-colon.
Examples:
A simple if statement:
if it is "Ok" then quit;
________________________________________________________________________
Chapter 6: Control Structures 52
________________________________________________________________________
An if statement that executes more than one statement:
if page field 1 contains "lawyer" then
begin
visual effect scroll up;
go to the next page;
end;
A complex if..then..else statement:
if field "Last Name" is empty then
begin
go to page 1;
put "went to page 1";
end
else
begin
go to page 2;
put "went to page 2";
end;
-----------------------------------
CASE STATEMENT
Syntax:
case <expression> of
<expression> : statement;
<expression> : statement;
:
:
[otherwise : statement;]
end;
Purpose: The case statement give scripts the power to choose from more
than two alternatives without specifying numerous if statements.
With a case statement, you set up a number of conditions, each with its
own "action". When the case statement is executed, the action associated
with the met condition is executed.
A case statement consists of an expression (the selector) and a list of
statements, each associated with an expression. The case statement
selects for execution the statement that is equal to the current value
of the selector. When the statement has completed execution, control
goes to the end of the case statement.
You are not limited to a single statement for each expression. If you
want to execute more than one statement if a match is found, use the
begin...end construct to enclose the statements.
________________________________________________________________________
Chapter 6: Control Structures 53
________________________________________________________________________
If there is no match for the selector, HyperPAD executes the statement
following the word otherwise. Be sure to include an otherwise statement
if there is a possibility that no matches will be found or HyperPAD will
give a runtime error. Your otherwise statement does not have to generate
an action, simply create a blank statement after that expression.
Examples:
The following is a typical case statement:
case mycolor of
"blue" : go to page id 4;
"red" : begin
visual effect scroll up;
go to page id 4;
end;
otherwise: answer "Don't know this color.";
end;
The following illustrates the versatility of the case statement. The
selector and each of the possible matches are expressions. If no match
is found, nothing happens.
case trim(salary) of
4 + 5/yearly_salary : put salary*100 into msg;
56*min(field1,field2) : put salary*200 into msg;
otherwise : ;
end;
Comments:
A common mistake when scripting is to forget the end; that ends the case
statement. You must end each begin...end construct as well as the entire
case statement.
If you do not want a statement to be executed when a match is found, use
an empty statement (just place a semi-colon after the colon). For
example:
"blue" : ; -- do nothing
________________________________________________________________________
Chapter 6: Control Structures 54
________________________________________________________________________
The selector is evaluated for every comparison in the case statement.
For speed, keep the most often matched cases near the top. If the
selector involves a complex expression, put the result of the expression
into a temporary variable first, then use the temporary variable as the
selector, like in the following example:
get page field 1 & page field 2;
case it of
"jim" : put it after page field 1;
"john" : put it;
otherwise : answer "Don't know you!";
end;
HyperPAD case statements follow a looser syntax than their Pascal
counterparts. HyperPAD allows any valid expression to be used as a
match, but in Pascal, only ordinals can be used as matches. This makes
the case statement especially handy for evaluating text, as in the
following example:
case (word 2 of item 6 of line 4 of field "last name") of
"smith" : go to pad "smith";
"jones" : go to pad "jones";
"fisher" : go to pad "fisher";
otherwise : go to page "help";
end;
-----------------------------------
WHILE...DO STATEMENT
Syntax:
while <conditional expression> do
statement;
Purpose: A while loop is used to execute a statement repeatedly while a
condition remains true. As soon as the condition is false, the loop
terminates execution. The while loop will skip the statement if the
condition is initially false.
To execute numerous statements inside the loop, enclose them in a
begin..end block.
________________________________________________________________________
Chapter 6: Control Structures 55
________________________________________________________________________
Examples:
This loop cycles through all the pages of a pad:
put 1 into count;
while count < the number of pages do
begin
visual effect fade;
go to the next page;
add 1 to count;
end;
This loop locates the last backslash in dirname:
while (i>1) and (character i of dirname is not "\") do
subtract 1 from i;
-----------------------------------
REPEAT...UNTIL STATEMENT
Syntax:
repeat
<statement 1>
<statement 2>
:
:
until <condition>;
Purpose: The repeat...until control structure executes a block of
statements until some condition is met. The sequence of statements is
executed at least once. After each execution, the condition is
evaluated. When the condition becomes true, execution falls out to the
bottom of the loop.
Examples:
The following example prints out all the names in a pad:
set the printer to on;
put the number of pages into count;
repeat
print field "last name" & return;
subtract 1 from count;
until count < 1;
set the printer to off;
This example waits for the mouse button to be clicked:
repeat until mouseClick();
________________________________________________________________________
Chapter 6: Control Structures 56
________________________________________________________________________
Comments:
The differences between while and repeat are as follows:
1. Statements in a repeat loop are always executed once. A while loop
executes only if a specific condition is met, but be careful; the
while statement will not execute its statement at all, if the condition
is initially false.
2. The repeat control structure executes statements while a condition
is false. The while control structure executes statements only while a
condition is true. These two scripts point out the difference between
repeat and while:
repeat while (i = 10 do
: begin
: :
: end;
until (i = 10);
3. Repeat can hold multiple statements without enclosing them in a
begin...end block.
-----------------------------------
FOR STATEMENT
Syntax:
for <variablename> = <start value> [down] to
<stop value> [step<increment>] do statement;
<variable name> is the index variable to be stepped through the range of
values.
<start value> is the initial value of the index.
<stop value> is the ending value of the index.
<increment> is the amount to be added to the index each time through the
loop. By default, this is 1 (or -1, if "down to" is specified).
Purpose: A for loop executes a statement a fixed number of times. The
index counts the number of executions as it loops through the script.
When it reaches the specified number, it drops out of the loop. This is
especially useful because the counting variable can also be used inside
the loop. For example:
For i = 1 to 10 do
go to page i;
The counting variable i is used inside the loop.
________________________________________________________________________
Chapter 6: Control Structures 57
________________________________________________________________________
By default, the index is incremented by 1 each time through the loop.
You can change the increment by adding a step value, which is, a value
(or amount) added to the index each time through the loop. For example:
For i = 1 to 10 step 2 do go to page i;
Specify a downward direction for the index by giving a start value that
is less than the end value and using the keyword down. This causes the
index to be decremented by 1 each time through the loop.
For example:
For i = 10 down to 1 do go to page i;
To specify more than one statement to be executed each time through the
loop, enclose the statements in a begin...end block.
Examples:
Cycle through 10 pages:
for i = 1 to 10 do
go to the next page;
Count how many directories deep we are:
put the directory into dirName;
put 0 into count;
for i = length(dirName) down to 1 do
if character i of dirName is "\" then add 1 to count;
Ends up with 11 in the Message Box:
put 1;
for i = 1 to 100 step 10 do
add 1 to msg;
Ends up with 21 in the message box:
put 1;
for i = 100 down to 1 step 5 do
add 1 to msg;
________________________________________________________________________
Chapter 6: Control Structures 58
________________________________________________________________________
The following handler prints out a cosine graph taken from the "Pascal
User Manual and Report":
handler select;
begin
put 16 into xlines; --line spacing/abscissa unit
put 32 into xlimit; --char widths/ordinate unit
put 34 into zeroy; --length of graph in lines
put 1/xlines into delta;
put 8*atan(@procedurelist = 1.0) into twopi;
put empty into it;
for point = 0 to xlimit do
begin
put delta * point into x;
put exp(-X)*sin(twopi*x)into y;
put round(scale*y) + zeroy into ypos;
repeat
put space after it;
subtract 1 from ypos;
until ypos = 0;
put "*" & return after it;
end;
put it into page field 1;
end;
_______________________________________________________________________
Chapter 5: The Current Object 47
________________________________________________________________________
CHAPTER FIVE: THE CURRENT OBJECT
This chapter describes HyperPAD's facilities for referencing the current
object, the object that first received the message, and the object whose
script is currently executing. Reference each of these directly with the
object names: currentObject, target, and me.
THE CURRENT OBJECT
The current object is either a highlighted button, or a field that is
highlighted or being edited. The current object will only change when
the focus changes, either by pressing TAB or clicking on a different
object.
You can refer to the current object in a script using the reserved
object name currentObject, like the following example:
set the color of the currentObject to red;
put "hello there" into the currentObject;
Also, you can determine the full name of the current object using the
currentObject() function:
put the currentObject;
if word 1 of currentObject() is "bkgnd" then
answer "The current object is on the background";
This function returns the name of the current object in the form:
page button id 2
page field id 5
bkgnd button id 45
bkgnd field id 3
_______________________________________________________________________
Chapter 5: The Current Object 48
________________________________________________________________________
THE TARGET
The target references the object that initially received the message.
This is the object at the start of the hierarchy for this message,
either a button, a field, or a page. Use the target as an object in
scripts, like in the following examples:
put "Wowee" into the target;
if the hilite of the target then
set the focus to button "Help";
set the check of the target to false;
set the color of the target to blue;
You can also refer to the name of the target using the target()
function. Examples of returned text are:
page field id 2
bkgnd button id 1
page id 3
These statements use the target () function:
put the target into the message box;
if word 2 of target() is "button" then
set the check of the target to 31;
A good example of the use of target is shown with the following two page
handlers that modify a button's border when the mouse enters the
button's rectangle.
handler mouseEnter;
begin
if word 2 of target() is "button" then
set the edgeType of the target to 2;
end;
handler mouseLeave;
begin
if word 2 of target() is "button" then
set the edgeType of the target to 1;
end;
_______________________________________________________________________
Chapter 5: The Current Object 49
________________________________________________________________________
THE CURRENT EXECUTING OBJECT
The owner of the currently executing script can be referred to by the
object named me. For example:
put the name of me into the message box;
get the rectangle of me;
if the loc of me is "10,10" then
set the loc of me to 20,20;
The following statements belong in a field's script:
put "Hello World" into me;
put page field 2 before me;
Note: Care must be taken when using me, make sure that the use of me is
consistent with the type of object that owns the script. For example,
you would not want to put the following statement into a button's
script:
put "hello world" into me;
This statement will only work within a field's script.
REFERENCING CURRENT OBJECTS WITH "THIS"
You can reference the current page, background, or pad with the word
this. For example, all of the following refer to current objects in the
hierarchy.
this page
this background
this pad
You can use these object names in your PADtalk statements:
go to this page;
put the name of this background into msg;
if the name of this pad is "home" then quit;
set the cantDelete of this page to true;
You cannot use the word this to refer to buttons or fields.
________________________________________________________________________
Chapter 13: Functions 219
________________________________________________________________________
CHAPTER THIRTEEN: FUNCTIONS
INTRODUCTION
This chapter describes all of the functions available in HyperPAD. Each
HyperPAD function returns a single value to your script.
CALLING A FUNCTION
To make a function call within a script, use the following syntax:
put min(10,12) into msg;
put the min of 10,12 into msg;
If the function doesn't have any arguments, then use the following
syntax:
put screenWidth() into msg;
put the screenWidth into msg;
You cannot mix the two syntax together. For example, the following are
wrong:
put the min(10,12) into msg;
put min of 10,12 into msg;
FUNCTION SEND MESSAGES
All functions in HyperPAD are send as messages. For example, the
function call min(4,5) sends a min message with two parameters: 4 and 5.
This allows you to redefine any of the built-in function available in
HyperPAD by replacing the function with your own.
For example, the following redefines the built-in function min():
function min;
begin
return 6;
end;
Redefining built-in functions prevents your scripts lower in the
hierarchy from accessing the real function. If the above redefinition of
the min() function occurred in a pad script, then all of the background,
pages, button, and fields, of that pad which use the min() function
would not work.
________________________________________________________________________
Chapter 13: Functions 220
________________________________________________________________________
In the next example, suppose you wanted HyperPAD to look for files in a
certain directory on your hard disk that isn't specified in the DOS
path. In this case, the findFile() function, which normally searches the
DOS path for files, will not find files in your special directory. You
could redefine the findFile() function and place it into the pad script
of your Home pad so that all pads that use findFile() will work
properly.
function findFile(fileName);
begin
return fileExists("C:\DOCUMENTS\OLD\" & fileName);
end;
FUNCTION LISTING BY TOPIC
COMPUTER FUNCTIONS
The following is a complete list of computer functions in HyperPAD:
coprocessor freeMem mouseLoc
cup graphicsCard mouseX
cursorLoc mouseButton mouseY
cursorX mouseClick screenHeight
cursorY mouseExists screenWidth
CONVERSION FUNCTIONS
The following are the conversion functions in HyperPAD:
charToNum numToChar
DATE AND TIME FUNCTIONS
The following are the date and time functions in HyperPAD:
date longTime time
longDate seconds
________________________________________________________________________
Chapter 13: Functions 221
________________________________________________________________________
DOS FUNCTIONS
The following are the DOS functions in HyperPAD:
append dosVersion files
commandLine drive fileSize
create drives findFile
directory environment fullName
dirs fileExists longFiles
diskSpace fileOpen open
FINANCIAL FUNCTIONS
The following are the HyperPAD financial functions:
annuity stdev compound
variance
KEYBOARD FUNCTIONS
The following are the keyboard functions in HyperPAD:
altKey key shiftKey
ctrlKey
________________________________________________________________________
Chapter 13: Functions 222
________________________________________________________________________
MATHEMATICAL FUNCTIONS
The following are the mathematical functions in HyperPAD:
abs exp2 round
acos fact sin
asin ln sqrt
atan ln1 sum
average max tan
cos min trunc
exp product
exp1 random
PAD INFORMATION FUNCTIONS
The following functions return information about pads:
currentBackground freeSize target
currentObject isSound version
currentPad number of
currentPage padSize
TEXT HANDLING FUNCTIONS
The following are the text handling functions in HyperPAD:
clean offset substitute
leftString proper upper
lenght repeatChar
lower rightString
________________________________________________________________________
Chapter 13: Functions 223
________________________________________________________________________
MISCELLANEOUS FUNCTIONS
The following are the miscellaneous functions in HyperPAD:
choose paramCount popup
param params result
-----------------------------------
ABS
Syntax:
abs(<number>)
Purpose: The abs() function returns the absolute value of a number;
which is always a positive number, even if the <number> is negative.
Examples:
The following example puts 9 into page field 1.
put the abs of 9 into page field 1;
The next example puts 33 into the message box.
put abs (-33) into the message box;
-----------------------------------
ACOS
Syntax:
acos(<number>)
Purpose: The acos() function returns the arc cosine of a number. The arc
cosine (inverse cosine) is the angle whose cosine is <number>. The angle
is given in degrees.
Examples:
The following example puts 60 into page field 1.
put the acos of 0.5 into page field 1;
See Also: asin(), atan()
________________________________________________________________________
Chapter 13: Functions 224
________________________________________________________________________
-----------------------------------
ALTKEY
Syntax:
altKey()
Purpose: The altKey() function returns the status of the ALT key. It
returns either down or up.
Examples:
put the altKey into the message box;
See Also: shiftKey(), ctrlKey()
-----------------------------------
ANNUITY
Syntax:
annuity(<rate>,<periods>);
Purpose: This function computes the present or future value of an
annuity. <Rate> represents the interest rate per period. <Periods> is
the number of periods.
HyperPAD uses the following formula:
(1-(1+rate)^-periods)/rate
Examples:
To compute the monthly payment of a loan of $10,000.00 at 11% for 10
years:
put 10000 into total; --amount borrowed
put 11/100/12 into interest; -- interest per month
put 10*12 into numPayments; -- 10 years*12 mo/yr
put total/annuity(interest,numPayments) into payment;
HyperPAD puts the number 137.75 into the container payment.
As another example, to determine the present value in 2 years of an
investment of $1000.00 that earns 18% interest, use the following
statement:
put 1000*annuity(18/100,2) into future_value;
HyperPAD puts 1565.64 into the container future_value.
See Also: compound()
________________________________________________________________________
Chapter 13: Functions 225
________________________________________________________________________
-----------------------------------
APPEND
Syntax:
append(<filename>)
Purpose: The append() function accesses and opens an existing file
moving the DOS file write position to the end of the file so that data
can be added using the write command.
The value returned by append() is a number that is used to refer to that
file. You must supply this number in order to use the write and close
commands.
If you attempt to append a file that doesn't exist, no file is opened
and the result() function will return "no such file". If the append
function is successful, the result() function will return empty. When
you give the file's name (in the script) you must follow DOS file naming
conventions. If no pathname is specified, HyperPAD searches the current
directory.
The file is closed when the user exits HyperPAD, issues a run command,
or explicitly closes the file with the close command.
Examples:
The following example appends a line to your AUTOEXEC.BAT file:
put the append of "C:\AUTOEXEC.BAT" into fh;
if the result is empty then --append successful?
begin
write return & "rem this is appended" to fh;
close fh;
end;
See Also: write, close, open(), read
-----------------------------------
ASIN
Syntax:
asin(<number>)
Purpose: This function returns the arc sine of a number. The arc sine
(inverse sine) is the angle whose sine is <number>.
Examples:
put the asin of .789 into page field 1;
See Also: acos(), atan()
________________________________________________________________________
Chapter 13: Functions 226
________________________________________________________________________
-----------------------------------
ATAN
Syntax:
atan(<number>)
Purpose: This function returns the arc tangent of a number. The arc
tangent (inverse tangent) is the angle whose tangent is <number>.
Examples:
put the atan of 1 into page field 2;
See Also: acos(), asin()
-----------------------------------
AVERAGE
Syntax:
average(<number>,<number>[,<number>...])
Purpose: The average() function averages a group of numbers.
The numbers can be constants or containers with numeric values. You can
supply any number of parameters (at least two are required) to this
function.
The formula used is:
(num1+num2+num3+...+numN)/N
Examples:
get the average of (field 1, 10, field4);
put the average of 10,67,10.67,page field 2 into msg;
See Also: stdev()
-----------------------------------
CHARTONUM
Syntax:
charToNum(<string>)
Purpose: This function returns the ASCII value of the specified
character. If a string is given, charToNum() only returns the value of
the first character.
Examples:
put the charToNum of "a" into "list";
________________________________________________________________________
Chapter 13: Functions 227
________________________________________________________________________
put the charToNum of "L" into field 3;
See Also: numToChar()
-----------------------------------
CHOOSE
Syntax:
choose(<index>,<argument>[,<argument>...]
Purpose: The choose() function chooses the Nth parameter
from the parameter list. The arguments may be any combination of values,
strings, or containers. If the index is larger than the number of
arguments, choose() returns empty.
A good use for this function is in performing an "array" lookup. The
statement:
put choose(2,10,12,14);
puts the value 12 into the message box, because 12 was the second
parameter (after the 2).
Examples:
put choose(3,"A",word 1 of page field 1,"C");
put choose(i,page field 1,page field 2,page field 2) into
page field 2;
-----------------------------------
CLEAN
Syntax:
clean(<string>)
Purpose: The clean() function strips a text string of unreadable
characters, returning a text string that does not contain control codes
or any other non-printable characters.
Examples:
put the clean of it into the message box;
put clean(page field 1) into page field 1;
You can use clean() to strip unreadable characters from text read into
HyperPAD from a file:
read 3 lines from fh;
put clean(it) into field 1;
________________________________________________________________________
Chapter 13: Functions 228
________________________________________________________________________
-----------------------------------
COMMANDLINE
Syntax:
commandLine()
Purpose: The commandline() function returns the exact command line that
was used to run HyperPAD from the DOS prompt. The command line can be up
to 128 characters. No special DOS characters (like |, >, <) are returned
because they are transparent to applications.
Because HyperPAD ignores any command line parameters it doesn't
recognize, authors can implement their own command line switches.
Examples:
If the user started HyperPAD with the following command:
HPAD PHONE /43 /nomsg /geewiz
The commandline() returns "PHONE /43 /nomsg /geewiz".
This example tests for a user-defined command line option:
if "/geewiz" is in the commandLine then
begin
visual effect peel;
go to page "stuff";
end;
-----------------------------------
COMPOUND
Syntax:
compound(<rate>,<periods>)
Purpose: This function computes the future value of an account that
earns compound interest. <Rate> is the interest rate for the period,
<periods> is the number of periods.
The formula for the above syntax is:
(1+rate)^periods
________________________________________________________________________
Chapter 13: Functions 229
________________________________________________________________________
Examples:
To determine the future value in 2 years of an investment of $1000.00
that earns 18%, use the following statement:
put 1000*compound(18/100,2) into future_value;
This puts 1392.4 into the message box.
See Also: annuity()
-----------------------------------
COPROCESSOR
Syntax:
coprocessor()
Purpose: This function returns true if there is a math processor (80x87)
installed.
-----------------------------------
COS
Syntax:
cos(<angle>)
Purpose: This function returns the cosine of an angle, which must be
specified in degrees.
Examples:
put the cos of 45 into page field 12;
See Also: sin(), tan()
-----------------------------------
CPU
Syntax:
cpu()
Purpose: The cpu() function returns the microprocessor in use, either
8086, 80186, 80286, or 80386. HyperPAD doesn't differentiate between the
8088 and 8086 microprocessors, it returns 8086 for 8088 machines.
Examples:
put the cpu into cpuType;
put cpu() into the message box;
________________________________________________________________________
Chapter 13: Functions 230
________________________________________________________________________
-----------------------------------
CREATE
Syntax:
create(<filename>)
Purpose: The create() function creates a new file with the specified
filename that can be used with the write command. The returned value is
a number that is used to refer to the file with the write and close
commands.
If a file with that name already exists, its length is truncated to
zero, so the new data replaces any previous data. If create() is
successful, the result() function returns empty; if there is an error,
the result() function will return "open error".
A file created with create() can be written to using the write command.
HyperPAD creates the file in the current directory if no path is
specified in <filename>.
All files are closed when the user exits HyperPAD, issues a run command,
or explicitly closes the file with the close command.
Examples:
put the create of "C:\HPAD\DATA.DAT" into myFile;
The following example uses create() to create a new file of page scripts
from the current pad:
put the create of "SCRIPTS.TXT" into fh;
if the result is not empty then exit;
for i = 1 to the number of pages do
write (the script of page i) & return to fh;
close fh;
See Also: append(), open(), write, read
-----------------------------------
CTRLKEY
Syntax:
ctrlKey()
Purpose: This function returns the status of the CTRL key. If the CTRL
key is pressed, it returns down, and if the CTRL key is not pressed it
returns up.
Examples:
put the ctrlKey into msg;
________________________________________________________________________
Chapter 13: Functions 231
________________________________________________________________________
-----------------------------------
CURRENTBACKGROUND
Syntax:
currentBackground()
Purpose: The currentBackground() function returns the number of the
background used by the current page.
Examples:
put the currentBackground into the message box;
See Also: currentPage(), currentObject(), currentPad()
-----------------------------------
CURRENTOBJECT
Syntax:
currentObject()
Purpose: This function returns the name of the object that currently has
the focus in the following format:
(page | background) (button | field) id <number>
Some examples of text returned by currentObject() are:
page button id 4
page field id 9
background field id 1
background button id 89
Examples:
if word 4 of the currentObject is 4 then
go to page 5;
Abbreviations: curObj()
See Also: target, me
________________________________________________________________________
Chapter 13: Functions 232
________________________________________________________________________
-----------------------------------
CURRENTPAD
Syntax:
currentPad()
Purpose: The currentPad() function returns the full DOS filename of the
current pad including the drive letter and directory.
For example, if the current pad is HOME.PAD, then currentPad() might
return:
C:\HPAD2\HOME.PAD
Examples:
put the currentPad into the message box;
This function is especially useful in determining the directory of the
pad you are currently using. The following example extracts the
directory from the name of the current pad and loads another pad from
that same directory:
get currentPad(); -- it = current pad
get substitute(it,"\",","); -- "\" changed to ","
delete the last item of it; -- get rid of filename
get substitute(it,",""\"); -- "," changed to "\"
go to pad it & "\PHONE.PAD" -- append new name
Abbreviations: curPad()
See Also: currentPage(), currentBackground(), currentObject()
-----------------------------------
CURRENTPAGE
Syntax:
currentPage()
Purpose: This function returns the number of the current page. This is
not the page's ID number; it is the number that corresponds to the
page's position in the pad.
Examples:
put currentPage() into msg;
go to page (currentPage() + 2);
________________________________________________________________________
Chapter 13: Functions 233
________________________________________________________________________
The following example shows you how to alter the Next command on the Go
menu so that on the last page of the pad, the command will do nothing.
handler doMenu(d);
begin
if d is "Next" then
if the currentPage = the number of pages then
put "Last page.";
pass;
end;
Abbreviations: curPage()
See Also: currentObject(), currentBackground(), currentPad()
-----------------------------------
CURSORLOC
Syntax:
cursorLoc()
Purpose: This function returns the current X,Y coordinates of the
cursor. The returned text string describes the character cell where the
hardware text cursor (the blinking cursor) is located; for example,
"10,12" specifies character position 10 horizontally and character
position 12 vertically.
Examples:
put the cursorLoc into the message box;
put the cursorLoc into page field 5;
See Also: cursorX, cursorY, cursor
________________________________________________________________________
Chapter 13: Functions 234
________________________________________________________________________
-----------------------------------
CURSORX
Syntax:
cursorX()
Purpose: This function returns the X coordinate of the cursor. The
X coordinate of the hardware text cursor (the blinking cursor) is its
current horizontal position or column location. For example, 10
specifies the tenth horizontal character cell.
Examples:
if cursorX() > 40 then put "right side of page";
put the cursorX into the message box;
See Also: cursorY(), cursorLoc(), cursor
-----------------------------------
CURSORY
Syntax:
cursorY()
Purpose: This function returns the Y coordinate of the cursor. The
Y coordinate of the hardware text cursor (the blinking cursor) is its
current vertical position or character location. For example, 12
represents the twelfth vertical character cell.
Examples:
if cursorY() > 12 then
put "bottom half of page" into page field 4;
put the cursorY into the message box;
See Also: cursorLoc(), cursorX(), cursor
-----------------------------------
DATE
Syntax:
date()
Purpose: This function returns the short form of the current date. The
date is a text string showing Month/Day/Year (MM/DD/YY), for example:
12/25/90
________________________________________________________________________
Chapter 13: Functions 235
________________________________________________________________________
Examples:
if char 1 to 5 of the date is "12/25" then
answer "It's Christmas!" with "Yippee";
See Also: longDate()
-----------------------------------
DIRECTORY
Syntax:
directory([<driveletter>])
Purpose: The directory() function returns the working directory on any
drive. The returned value includes a drive letter and the complete
pathname.
get the directory; -- get the current directory
get the directory of "F"; -- get dir on drive F
The drive letter parameter is optional. If one is not specified,
directory() will return the current directory. A value of empty means
that the specified drive was invalid.
Examples:
put the directory into page field "Current Directory";
The following example searches the current directory on all drives for a
file called JUNK.TXT:
put the drives into driveList;
for i = 1 to the number of items of driveList do
begin
get the directory of item i of driveList;
if the last char of it is not "\" then
put "\" after it;
if fileExists(it & "JUNK.TXT") then
answer "Found it in directory" && it with "Ok";
end;
Abbreviations: dir()
See Also: currentDirectory()
________________________________________________________________________
Chapter 13: Functions 236
________________________________________________________________________
-----------------------------------
DIRS
Syntax:
dirs([<pathname>])
Purpose: The dirs() function returns a list of all the sub-directories
within a specified directory. If you don't specify the optional
pathname, HyperPAD returns a list of sub-directories from the current
directory.
get the dirs; -- subdirs of current directory
get dirs("C:\"); -- subdirs of root on C:
This function will return a list of sub-directories resembling the
following format:
[.. ]
[123 ]
[WORD ]
[SAMPLES ]
The ".." means that there is a parent directory.
Examples:
put the dirs into page field "Directory List";
put dirs("C:\LOTUS") into page field "Dirs";
if ".." is not in dirs() then
answer "You are currently in a root directory";
See Also: drives(), files(), longFiles()
-----------------------------------
DISKSPACE
Syntax:
diskSpace([<driveletter>])
Purpose: The diskSpace() function returns the amount of free space on
the specified drive in bytes. If the optional drive letter is not
specified, then the free space from the current drive is returned.
Examples:
put the diskSpace of "E" into page field 4;
put the diskSpace into background field 1;
________________________________________________________________________
Chapter 13: Functions 237
________________________________________________________________________
-----------------------------------
DOSVERSION
Syntax:
dosVersion()
Purpose: This function returns the DOS version. Both the major version
number and the minor version number are returned, like the following:
3.0
3.3
4.0
Examples:
put the dosVersion in the message box;
-----------------------------------
DRIVE
Syntax:
drive()
Purpose: This function returns the current drive.
Examples:
if the drive is "C" then put "this is a hard disk"
in page field 3;
See Also: drives()
________________________________________________________________________
Chapter 13: Functions 238
________________________________________________________________________
-----------------------------------
DRIVES
Syntax:
drives()
Purpose: The drives() function returns a list of valid disk drives in an
item delimited list, like the following:
A:,B:,C:
Examples:
The following example puts the drives into a field, putting each drive
letter on a different line:
put substitute(the drives,",",return) into pg fld 1;
The following statements let the user select a drive letter from a list:
get popup(drives(),35,10);
if it is not 0 then
answer "You chose drive" && item it of drives();
-----------------------------------
ENVIRONMENT
Syntax:
environment(<environstring>)
Purpose: This function returns the DOS environment setting for the
passed DOS environment variable. The environment() function searches the
list of environment variables for an entry corresponding to the passed
argument.
The environment() function is useful for finding the location of the
command processor (the COMSPEC variable). It may also be useful to
retrieve user-defined environment variables that may control a pad.
Examples:
put the environment of "path" into the msg;
________________________________________________________________________
Chapter 13: Functions 239
________________________________________________________________________
The following example uses environment() to locate COMMAND.COM.
Normally, there is an environment string called COMSPEC that has its
directory:
get environment("COMSPEC"); --try the environment
if it is empty then
get findFile("COMMAND.COM"); --try the path
if it is empty then
get "C:\COMMAND.COM"); --last resort - drive C
if not fileExists(it) then
answer "Unable to locate the command processor.";
-----------------------------------
EXP
Syntax:
exp(<number>)
Purpose: This function returns the value of e raised to the power of the
argument. E equals 2.7182818, the base of the natural logarithm.
Examples:
The following statement puts 54.59815 into the message box:
put the exp of 4 into msg;
See Also: exp1(),exp2()
-----------------------------------
EXP1
Syntax:
exp1(<number>)
Purpose: This function returns the value of one less than e raised to
the power of the argument. E equals 2.7182818, the base of the natural
logarithm.
Examples:
The following statement puts 8102.083928 into the message box:
put the exp1 of 9 into msg;
See Also: exp(), exp2()
________________________________________________________________________
Chapter 13: Functions 240
________________________________________________________________________
-----------------------------------
EXP2
Syntax:
exp2(<number>)
Purpose: This function returns the value of 2 raised to the power of the
argument. To calculate the power of other numbers, use the power (^)
operator.
Examples:
put exp2(6*2) into the message box; -- 64
put the exp2 of 4 into x; -- 16
See Also: exp(), exp1()
-----------------------------------
FACT
Syntax:
fact(<number>)
Purpose: This function returns the factorial of the specified number.
The factorial of a number is equal to:
number*(number - 1) * (number *...* (number - n)
where n = number - 1.
Examples:
put the fact of 6 into it; -- 720
put the fact of 10 into msg; -- 3628800
-----------------------------------
FILEEXISTS
Syntax:
fileExists(<filename>)
Purpose: The fileExists() function allows you to determine if the file
you specified exists. This function returns true or false. You can
specify any valid DOS filename, including a path.
Examples:
put the fileExists of "MY.PAD" into IT;
________________________________________________________________________
Chapter 13: Functions 241
________________________________________________________________________
if fileExists("C:\123\123.COM") then
run "C:\123\123.COM" with programDirectory;
-----------------------------------
FILEOPEN
Syntax:
fileOpen(<title>,<prompt>,<file extension>)
Purpose: This function allows the user to select a file from the File
Open dialog box. This is the same dialog box that HyperPAD uses when you
select Open from the File menu.
Parameter: Description:
-------------------------------------------------------------
<title> Title of the dialog box
<prompt> Text above the filename field in the dialog box.
<file extension> Extension of the files that HyperPAD displays in the
list box, like "WK1" or "DOC". This parameter can also
include a path specification, like "C:\123\*.WK1".
The fileOpen() function returns empty if the user selected Cancel,
otherwise it returns a complete DOS path specification (with drive
letter) for the file that the user selects.
For example:
C:\123\SHEETS\HOUSE.WK1
Examples:
put fileOpen("Open File","File Name:","C:\*.COM");
put the fleOpen of
"My Open File Box",
"Type in the file name:",
"..\*.WK1,..\*.DOC,..\*.TXT";
________________________________________________________________________
Chapter 13: Functions 242
________________________________________________________________________
-----------------------------------
FILES
Syntax:
files([<filemask>])
Purpose: The files() function returns a list of all the filenames
separated by carriage returns that match a search mask.
If no search mask is specified, files() returns all of the files in the
current directory (*.*). The files are returned in the following manner:
HOME.PAD
PHONE.PAD
ZAP.PAD
The files are sorted according to the value of the fileSortMethod
property, which is 1 by default (sort ascending by filename).
Examples:
put the files into page field 4;
put files ("*.EXT") into page field 4;
See Also: longFiles(), fileSortMethod
-----------------------------------
FILESIZE
Syntax:
fileSize(<filename>)
Purpose: This function returns the size in bytes of the specified file.
If the file does not exist, fileSize() returns 0.
Examples:
put fileSize("README.DOC") into the message box;
if the fileSize of "DATA.DAT" < 30000 then
doMenu "Import...";
________________________________________________________________________
Chapter 13: Functions 243
________________________________________________________________________
-----------------------------------
FINDFILE
Syntax:
findFile(<fileName>)
Purpose: This function searches for a file using HyperPAD's built-in
search technique. HyperPAD looks in the following places in the
following order:
1. Search the current directory.
2. Search the directory pointed to by the HPADNET environment variable
(if there is one).
3. Search the directory where HPAD.EXE exists.
4. Search the directory where HyperPAD was started.
5. Search all directories specified in the DOS path.
6. Search the B: drive if the Program disk is in A and A is a low
density disk (360K).
If the file is located, you are returned the full DOS path name. If the
file cannot be located, findFile() returns empty.
Examples:
if findFile("DATA.DAT") is not empty then
answer "Can't find the data file";
get the findFile of "readme.doc";
See Also: fileExists(), fullName()
-----------------------------------
FREEMEM
Syntax:
freeMem()
Purpose: The freeMem() function returns the number of bytes of free
memory. The number is not the total memory in the computer; nor is it
the total amount of memory for your pad. It returns the free memory at
the time you call the function.
Examples:
put the freeMem into the message box;
See Also: padSize(), freeSize()
________________________________________________________________________
Chapter 13: Functions 244
________________________________________________________________________
-----------------------------------
FREESIZE
Syntax:
freeSize()
Purpose: The freeSize() function returns the number of bytes of free
space in the current pad. This number is constantly changing as you use
your pad.
Note: The free space in read-only pads (pads whose
cantModify property is set to true) will never change.
Examples:
if the freeSize >` 4000 then doMenu "Compress";
See Also: freeMem(), padSize()
-----------------------------------
FULLNAME
Syntax:
fullName(<pathname>)
Purpose: The fullName() function takes a partial file specification and
returns a full DOS path name for the file. The following table shows
samples of what this function returns, depending on the parameter
supplied to the fullName() function:
Current Directory: Parameter: Returns:
-------------------------------------------------------------
C:\HPAD2 .. C:\
C:\HPAD\PADS ..\ACCOUNTS\..\.. C:\
C:\HPAD2 C:.. C:\HPAD2
C:\HPAD2\PADS C:\ C:\
C:\HPAD2 C: C:\HPAD2
C:\HPAD2 ..\..\DOS C:\DOS
________________________________________________________________________
Chapter 13: Functions 245
________________________________________________________________________
Examples:
put the fullName of "D:..\DOS" into msg;
ask "What directory";
put fullName(it) into msg;
This function can be used to validate DOS filenames:
ask "Pad to load"; -- get a pad name
get fullName(it); -- make sure it's a full name
if fileExists(it) then
go to pad it; -- go to the pad
-----------------------------------
GRAPHICSCARD
Syntax:
graphicsCard()
Purpose: The graphicsCard() function returns the video card in use. The
following are possible returned values:
Monochrome
CGA
Extended CGA
Extended CGA-PLASMA
Hercules Monochrome
EGA
Extended EGA
MCGA
VGA
Extended VGA
Leading EDGE Internal Graphics Adapter
Unknown
Examples:
put graphicsCard into the msg;
if the graphicsCard is not "monochrome" then
LoadGX2 "PICTURE.GX2";
if the graphicsCard() is "vga" then
go to pad "phone50";
________________________________________________________________________
Chapter 13: Functions 246
________________________________________________________________________
-----------------------------------
ISSOUND
Syntax:
isSound()
Purpose: This function returns true if music is playing or a sound
command is active. Otherwise, the function returns false.
Examples:
put isSound() into the msg;
if not isSound() then play "ABC";
To wait until some music is finished playing:
play "ABCDEFG";
repeat until not isSound();
See Also: play, sound, noSound
-----------------------------------
KEY
Syntax:
key(<keyNumber>)
Purpose: This function translates a key (the type passed with the
keyPress message) to text.
Keys are normally encoded into numbers in the following manner:
scan code * 256 + ascii code
For example, the scan code of the ENTER key is 28, the ASCII code is 13,
so the key code is 256*28 + 13 = 7181. The key() function translates the
number 7181 to the string "ENTER".
In addition to normal letters, digits, and punctuation, key() returns
strings like "ENTER", "F1", "ALT+T" for special keys and key
combinations. The possible values returned by key() are listed in
Appendix 2, "Key Values".
________________________________________________________________________
Chapter 13: Functions 247
________________________________________________________________________
Examples:
put the key of k into It;
handler keyPress(k);
begin
if the key of k is "escape" then quit
else pass;
end;
See Also: keyPress
-----------------------------------
LEFTSTRING
Syntax:
leftString(<string>,<numchars>)
Purpose: The leftString() function returns the specified number of
characters in a string beginning from the left.
For example, leftString("Hello World",7) returns "Hello W".
Note: This function requires exactly two arguments.
Examples:
put the leftString of "This is a string", 6 into msg;
See Also: rightString()
________________________________________________________________________
Chapter 13: Functions 248
________________________________________________________________________
-----------------------------------
LENGTH
Syntax:
length(<expression>)
Purpose: The length() function returns the number of characters in a
string. The string can be a literal string or a container.
The following two statements are equivalent:
the number of characters of page field 1;
length(page field 1);
Examples:
if the length(page field 1) > 10 the beep;
put length(userName) into userNameLength;
Abbreviations: len()
See Also: number of
-----------------------------------
LN
Syntax:
ln(<number>)
Purpose: This function returns the natural logarithm of the number. The
natural logarithms are based on the constant e, 2.7182818. The argument
must be positive.
Examples:
put the ln of 6 into it; -- 1.791759
put the ln of 89076 into msg; -- 11.397245
See Also: ln1()
________________________________________________________________________
Chapter 13: Functions 249
________________________________________________________________________
-----------------------------------
LN1
Syntax:
ln1(<number>)
Purpose: This function returns the natural logarithm of the sum of one
plus the number. The natural logarithms are based on the constant e,
2.7182818. The argument must be positive.
Examples:
put ln1(7) into msg;
See Also: ln()
-----------------------------------
LONGDATE
Syntax:
longDate()
Purpose: This function returns the long form of the current date. The
long date is a text string showing day of the week, month, day, and
year; for example:
"Monday, December 25, 1989"
Examples:
put longDate() into the msg;
put "Today's date is" && the longDate into page field 8;
get the longDate;
convert it to abbreviated date;
put in into msg;
See Also: date(), time(), longTime()
________________________________________________________________________
Chapter 13: Functions 250
________________________________________________________________________
-----------------------------------
LONGFILES
Syntax:
longFiles([<filespec>])
Purpose: The longFiles() function lists the filenames, extensions, size,
and modification date and time for all files matching the specified
filespec. If <filespec> isn't given, HyperPAD assumes "*.*" in the
current directory and lists all those files. Below is a sample list:
FILENAME.EXT 12345678 12-21-89 12:40p
FILENAME.EXT 34577310 01-30-90 11:20a
Examples:
put longFiles("*.EXE") into page field 4;
-----------------------------------
LONGTIME
Syntax:
longTime()
Purpose: The longTime() function returns the current time in the long
format. The long time is a text string showing hours/minutes/seconds AM
or PM (HH:MM:SSxx). For example:
12:30:56 PM
Examples:
put the longTime into background field time;
The following handler in a pad script updates the time displayed in the
message box constantly:
handler idle;
begin
put the longTime;
end;
See Also: time(), seconds()
________________________________________________________________________
Chapter 13: Functions 251
________________________________________________________________________
-----------------------------------
LOWER
Syntax:
lower(<string>)
Purpose: The lower() function returns the specified string in lowercase
letters. Characters that are not letters are left unchanged. For
example, lower("HyperPAD 123") returns "hyperpad 123".
Examples:
put lower(page field 1) into page field 1;
ask "What is your name";
put lower(it) into page field "Name";
See Also: upper()
-----------------------------------
MAX
Syntax:
max(<num>,<num>[,<num>...])
Purpose: The max() function returns the largest number in a series of
numbers. The numbers can be constants or containers. Any number of
arguments can be specified as long as there are at least two.
Examples:
The following example puts 77 into the message box.
put the max of 23,43,77 into the message box;
See Also: min()
________________________________________________________________________
Chapter 13: Functions 252
________________________________________________________________________
-----------------------------------
MIN
Syntax:
min(<num>,<num>[,<num>...])
Purpose: The min() function returns the smallest number in a series of
numbers. The numbers can be constants or containers. Any number of
arguments can be specified as long as there are at least two.
Examples:
The following example puts 34 into page field 3.
put min(34,67,89) into page field 3;
See Also: max()
-----------------------------------
MOUSEBUTTON
Syntax:
mouseButton()
Purpose: The mouseButton() function returns the current status of the
mouse buttons. The response from this function is a text string
describing the status:
0 No buttons are pressed.
1 The left button is pressed.
2 The right button is pressed.
3 Both left and right buttons are pressed.
4 The middle button is pressed (three-button mouse).
Examples:
if mouseButton() = 1 then
put "Button pressed" into the message box;
The next example waits for all mouse buttons to be released.
repeat until mouseButton() is zero;
See Also: mouseClick(), mouseExists(), mouseLoc()
________________________________________________________________________
Chapter 13: Functions 253
________________________________________________________________________
-----------------------------------
MOUSECLICK
Syntax:
mouseClick()
Purpose: The mouseClick() function returns true if the mouse button has
been pressed since the last idle message was sent; otherwise it returns
false.
Examples:
if mouseClick() then beep;
for i = 1 to 10 do go to next page;
if the mouseClick then
answer "You pressed the mouse during the show.";
See Also: mouseButton(), mouseExists(), mouseLoc()
-----------------------------------
MOUSEEXISTS
Syntax:
mouseExists()
Purpose: This function returns true if the mouse is installed and the
mouse software is loaded and working, and false if the mouse is not
installed.
Examples:
put mouseExists() into the message box;
get the mouseExists;
This example installs a keyPress handler that allows keys to pass
through only if there isn't a mouse present:
handler keyPress(k);
begin
if not the mouseExists then pass;
end;
See Also: mouseClick(), mouseButton(), mouseLoc()
________________________________________________________________________
Chapter 13: Functions 254
________________________________________________________________________
-----------------------------------
MOUSELOC
Syntax:
mouseLoc()
Purpose: The mouseLoc() function returns the current X,Y coordinates of
the mouse. For example:
10,12
Examples:
put mouseLoc() into background field "Mouse Location";
if the mouseLoc is "1,1" then beep;
See Also: mouseX(), mouseY()
-----------------------------------
MOUSEX
Syntax:
mouseX()
Purpose: The mouseX() function returns the current X coordinate of the
mouse. The X coordinate of the mouse is its current horizontal position
or column location.
Examples:
put the mouseX into the message box;
See Also: mouseLoc(), mouseY()
-----------------------------------
MOUSEY
Syntax:
mouseY()
Purpose: The mouseY() function returns the current Y coordinate of the
mouse. The Y coordinate of the mouse is its current vertical position or
row location.
Examples:
put the mouseY into the message box;
See Also: mouseLoc, mouseX
________________________________________________________________________
Chapter 13: Functions 255
________________________________________________________________________
-----------------------------------
NUMBER OF
Syntax:
number(chars | words | items | lines) of <container>
number(backgrounds | pages)
number([page | background] buttons)
number([page | background] fields)
Purpose: The number() function returns whether the number of objects, or
returns the number of characters, words, items, or lines within a
container.
Examples:
The different forms of number() are shown here:
put the number of pages into msg;
put the number of backgrounds into msg;
put the number of pages of background 2 into msg;
put the number of page buttons into msg;
put the number of fields into msg;
put the number of flds of pg 1 of bkgnd 4 into msg;
put the number of characters of msg into msg;
put the number of words of item 6 of page field 1;
put the number of lines of page field "File List";
To show all of the pages:
for i = 1 to the number of pages do
go to the next page;
________________________________________________________________________
Chapter 13: Functions 256
________________________________________________________________________
To print all the button scripts in a pad:
set the printer to on;
for i = 1 to the number of backgrounds do
begin
go to page 1 of background i;
for j = 1 to the number of background buttons do
print the script of background button j;
end;
for i = 1 to the number of pages do
begin
go to page i;
for j = 1 to the number of page buttons do
print the script of page button j;
end;
set the printer to off;
Abbreviations: chars, flds, pgs, cds
See Also: length()
-----------------------------------
NUMTOCHAR
Syntax:
numToChar(<number>)
Purpose: The numToChar() function returns the ASCII character associated
with the specified number (an integer from 0 to 255).
Examples:
The following example puts the letter "A" into the message box:
put the numToChar of "65" into page field 3;
To get a random capital letter:
put numToChar(random(26) + 64) into msg;
________________________________________________________________________
Chapter 13: Functions 257
________________________________________________________________________
-----------------------------------
OFFSET
Syntax:
offSet(<findstring>,<targetstring>)
Purpose: The offset() function returns the character number where the
first string appears in the second. If the first string doesn't occur
within the second, offset() returns 0.
Examples:
The following example puts 5 into the message box:
put offSet("blue", "the blue ocean");
The next example puts 2 into the message box:
put offSet("e", "hello there mate") into msg;
The next example replaces all occurrences of one string with another:
function
replaceIt(targetString,searchString,repString);
begin
if repString is in searchString then exit;
put length(searchString) into l;
while searchString is in targetString do
begin
get offSet(SearchString);
put repString into char it to it+l of targetString;
end;
return targetString;
end;
To use this function:
put replaceIt(page field 1,"lawyer","attorney") into page field 1;
________________________________________________________________________
Chapter 13: Functions 258
________________________________________________________________________
-----------------------------------
OPEN
Syntax:
open(<filename>)
Purpose: The open() function opens a file for reading and places the
file pointer at the beginning of that file. The function returns a file
number that you will need to refer to that file. A file opened with the
open() function, can only be read, it cannot be modified.
If HyperPAD can't locate the specified file, the result() function will
return "no such file". If open() is successful, the result() function
will return empty.
Once you have opened a file, you can read from it using the read
command. When you are done with the file, be sure to close it using the
close command.
Examples:
put open("DATA.DAT") into the msg;
To open a file and read its entire contents into a field:
put open("DOCUMENT.TXT") into fh;
if the result is empty then
begin
read from fh until end;
put it into field "Document";
close fh;
end
else
answer "Error opening file";
See Also: close(), read
________________________________________________________________________
Chapter 13: Functions 259
________________________________________________________________________
-----------------------------------
PADSIZE
Syntax:
padSize()
Purpose: This function returns the size of the pad in bytes.
Examples:
put the padSize into the message box;
The following function uses padSize() to determine if there is room to
expand the pad by a certain number of bytes.
function roomForExpansion(numBytes);
begin
return the padSize > the diskSpace + numBytes;
end;
-----------------------------------
PARAM
Syntax:
param(<paramnumber>)
Purpose: The param() function returns the value of the nth parameter of
the parameter list passed to the currently executing handler or
function.
If there are not any parameters or <paramnumber> is too large, then
empty is returned.
Examples:
Use param to put all of the passed parameters into a separate line of a
field:
handler makeList;
begin
for i = 1 to the paramCount do
put param(i) into line i of page field 1;
end;
________________________________________________________________________
Chapter 13: Functions 260
________________________________________________________________________
The next example uses param() to define a max() function:
function max;
begin
put param(1) into m;
for i = 2 to the paramCount do
if param(i) > m then put param(i) into m;
return m;
end;
See Also: paramCount(), params()
-----------------------------------
PARAMCOUNT
Syntax:
paramCount()
Purpose: The paramCount() function returns the total number of
parameters passed to the currently executing handler, regardless of the
number of place holders declared by the handler or function. This
function is the only way to determine the actual number of arguments
passed to a handler or function.
Examples:
get the paramCount;
The next example uses paramCount() to determine the number of
parameters, then checks to see if any of the parameters can be found in
background field 1:
function findMany;
begin
for i = 1 to the paramCount do
begin
find param(i) in field 1; --find parameter
if the result is "found" then
begin
return true; --found one!
exit;
end;
end;
return false; --can't find any
end;
See Also: param(), params()
________________________________________________________________________
Chapter 13: Functions 261
________________________________________________________________________
-----------------------------------
PARAMS
Syntax:
params()
Purpose: The params() function returns a list of the parameters passed
to the currently executing handler or function. The values of the
arguments (not the expressions themselves) are returned in a list,
separated by commas. The expressions are evaluated before the parameter
list is returned. For example, if the following call is made to a
handler called stuff:
stuff(10,"hello",45,56);
then the params() function will return the text
10,hello45,56
Examples:
put params() into the message box;
handler putThem;
begin
put the params;
end;
See Also: param(), paramCount()
________________________________________________________________________
Chapter 13: Functions 262
________________________________________________________________________
-----------------------------------
POPUP
Syntax:
popup(<upper left x>,<upper left y>,<choices>)
Purpose: The popup() function displays and controls a popup menu. A
popup menu is a window with a list of choices from which you can choose,
similar to HyperPAD pull down menus (like the File menu). Here is a
sample of a popup:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
You specify the location of the popup menu by its upper left X,Y
coordinates. The choices that appear within the popup menu are specified
in the <choices> parameter. The <choices> text has the following format:
"choice1,choice2,choice3"
Each choice is separated be either a semi-colon, comma, or a carriage
return. The following characters have special meaning within a choice:
- (hyphen)
A hyphen defines a horizontal separator bar. You can also create
separator bars by specifying an empty choice.
________________________________________________________________________
Chapter 13: Functions 263
________________________________________________________________________
@@
When the @ character is the first character of a choice, the choice is
dimmed.
!
The ! character as the first character of a choice, checks the choice.
&
The & character means that the next character in the choice is an
accelerator key.
The following are sample choice strings:
"Eggs,Bacon,Cheese,Butter"
"&Eggs,&Bacon,C&heese,!Butter"
"&Monday,!@Tuesday,-,&Wednesday"
If you have many choices in your popup, you can put the choices into a
field and use the statement:
put the popup of 10,10,field 1 into userChoice;
Using a popup is similar to using a HyperPAD pull down menu. The
following keys control a popup:
Key: Action:
-------------------------------------------------------
UP Highlight the previous choice.
DOWN Highlight the next choice.
ENTER or SPACE Select the highlighted choice
HOME Highlight the first choice.
END Highlight the last choice.
LETTER Select the choice with that accelerator key.
The popup() function returns the number of the selected choice. If you
press ESC, popup() will return 0.
HyperPAD adjusts the popup's position if the coordinates you specify
cause the popup menu to be drawn off the edge of the screen. Thus, if
you wanted to create a popup in the lower right hand corner, you could
use the following statement:
get popup(100,100,"Choice1,Choice2,Choice3);
In this case, HyperPAD would adjust the upper left corner to 70,21.
________________________________________________________________________
Chapter 13: Functions 264
________________________________________________________________________
The popup() function will return an error if the number of choices
exceeds the height of the display, if the length of any of the choices
is greater the 80, or if all of the choices are disabled.
Example:
get popup(10,10,"Eggs,Ham,Cheese,Bread");
To display a popup with three choices:
put popup 4,3,"New...,Open...,Save a Copy..." into r;
To display a popup with the same three choices, except this time, the
first choice has an accelerator key (w) and the second choice has a
check mark:
put popup 10,10,"Ne&w...;!Open...;Save a Copy..." into r;
The following handlers implement an Edit menu similar to HyperPAD's Edit
menu. The two handlers should be in a button script.
handler mouseDown;
begin
-- assemble some choices
put "@&Undo,-,Cu&t,&Copy,&Paste,&Delete" cList;
-- let the user pick one
put popup(7,2,cList) into choice;
if it is 0 then exit;
-- convert choice to usable string
get item it of cList;
get substitute(it,"&",empty);
get substitute(it,"@",empty);
-- execute it
domenu it;
end;
handler select;
begin
-- simulate the user pressing the mouse on this choice
mouseDown;
end;
________________________________________________________________________
Chapter 13: Functions 265
________________________________________________________________________
The following example allows the user to pick a drive from a list:
get popup(3,3,drives());
if it is 0 then exit;
answer "You picked" item it of drives();
See Also: setPopupColor, setDefaultPopupColors
-----------------------------------
PRODUCT
Syntax:
product(<num>,<num>[,<num>...])
Purpose: The product() function multiplies each of the numbers given as
arguments. This function accepts two or more arguments.
Examples:
put the product of 3,56,98,54 into total;
put the product of 4,6,32,78,99 into page field 3;
See Also: sum()
-----------------------------------
PROPER
Syntax:
proper(<string>)
Purpose: The proper() function returns the proper form of the passed
parameter by changing the first character of each word to uppercase and
all other characters to lowercase. The function also capitalizes any
character that follows a non-alphabetic character.
For example: Returns:
------------------------------------------------------
proper("hello there") Hello There
proper("hELLO THeRE") Hello There
Examples:
put proper("this is a string") into the message box;
ask "What is your name";
put proper(it) into field "Name";
See Also: upper(), lower()
________________________________________________________________________
Chapter 13: Functions 266
________________________________________________________________________
-----------------------------------
RANDOM
Syntax:
random(<upperbound>)
Purpose: The random() function returns a random integer greater than or
equal to 1 and less than or equal to the number specified. The function
may return the same number more than once before all the numbers within
the specified range have been returned.
Examples:
put random(3) into the message box;
put item random(3) of "Jim,John,Lisa" into pg fld 1;
The next example shows each page in a pad in a random order. The problem
here is that random can return the same value twice before all the
values have been returned at least once. To remedy this, the handler
creates an item delimited list of page numbers. For example, if there
are 10 pages, list looks like:
1,2,3,4,5,6,7,8,9,10
The algorithm retrieves a random number between 1 and the number of
items in this list and retrieves this item number from the list. Then,
this page is shown and that item is deleted from the list. This process
continues until the list is empty.
handler showAll;
begin
--create an item list of page numbers:
put empty into list;
for i = 1 to the number of pages do
put i into item i of list;
--show each item, delete the item after showing it
while list is not empty do
begin
put random(number of items of list) into r;
go to page (item r of list);
delete item r of list;
end;
end;
________________________________________________________________________
Chapter 13: Functions 267
________________________________________________________________________
-----------------------------------
REPEATCHAR
Syntax:
repeatChar(<number of times>,<character to repeat>)
Purpose: This function returns a string made up of a single character of
a specified length. For example,
repeatChar(10,"A")
returns
AAAAAAAAAA
Examples:
put repeatChar(10,char 1 of page field 1) into msg;
print repeatChar(30-length(s),space);
Abbreviations: repChar()
-----------------------------------
RESULT
Syntax:
result()
Purpose: This function returns the result of many operations in
HyperPAD, including run, open(), create(), append(), find, go, and
query.
The following modify the return value of result():
1. The run command. After running a program with the run command, the
result() returns the value of the return code of the program. (This is
the same return code that you test for using the DOS errorlevel
command).
2. The read command. After reading data from a file using the read
command, the result() returns "eof" if the end of file has been reached;
otherwise the result() returns empty.
3. The write command. The result() returns empty.
4. The go command. If you attempt to go to an invalid page, the
result() returns "no such page".
5. The open function. If there is an error opening a file, result()
returns "no such file".
________________________________________________________________________
Chapter 13: Functions 268
________________________________________________________________________
6. The append function. If there is an error opening a file, result()
returns "no such file".
7. The create function. If there is an error creating the file,
result() returns "open error".
8. The find command. The result() returns either "found" or "not found"
depending on the outcome of the search.
9. The query command. The result() returns either "found" or "not
found" depending on the result of the query.
Examples:
put the result into status;
The following resume handler checks the result() function to see if the
program exited with an error.
handler resume;
begin
if the result is not zero then
answer "The program exited with an error code";
end;
-----------------------------------
RIGHTSTRING
Syntax:
rightString(<string>,<numchars>)
Purpose: This function returns the specified number of characters from
the string beginning from the right. For example,
rightString("Hello World",3);
returns "rld".
Examples:
put rightString("This is a string",6) into the msg;
See Also: leftString
________________________________________________________________________
Chapter 13: Functions 269
________________________________________________________________________
-----------------------------------
ROUND
Syntax:
round(<number>)
Purpose: This function rounds the specified number to the nearest
integer. The operation is performed by adding .5 to the number and
truncating the decimal part. If the number is negative, the negative
sign is removed, rounding is performed and then the negative sign is put
back.
Examples:
The following puts 6 into it:
put the round of 5.77 into it;
The following example puts 187654 into page field 2:
put the round of 187654.222 into page field 2;
See Also: trunc()
-----------------------------------
SCREENHEIGHT
Syntax:
screenHeight()
Purpose: This function returns the height of the screen in character
cells or rows. Normally, the screen is 25 rows high.
You can change the screen height of new pads using the command line
options "/43" and "/50".
Examples:
put the screenHeight into msg;
The following positions a button beyond the 25th line, but checks first:
if the screenHeight > 25 then
begin
--user has an extended text mode
set the position of button "home" to 70,40;
end;
See Also: screenWidth()
________________________________________________________________________
Chapter 13: Functions 270
________________________________________________________________________
-----------------------------------
SCREENWIDTH
Syntax:
screenWidth()
Purpose: This function returns the width of the screen, which is
normally 80 columns wide.
Examples:
put the screenHeight into msg;
See Also: screenHeight()
-----------------------------------
SECONDS
Syntax:
seconds()
Purpose: This function returns the number of seconds between January 1,
1583 and the current date. The function works by retrieving your
computer's date and time and converting it to seconds (be sure your
computer's date and time are correct).
Examples:
put the seconds into msg;
The following example uses seconds() to time an operation.
put the seconds into savedSeconds;
for i = 1 to the number of pages do
go to page i;
answer "That operation took" && seconds() - savedSeconds() && "seconds";
Using seconds(), you can set up an alarm, as demonstrated
with the following handlers. First, this button script sets up the alarm
time.
handler select;
begin
global stopSeconds;
ask "Alarm at what time?" with the time;
if it is empty then exit;
convert it to seconds;
put it into stopSeconds;
end;
________________________________________________________________________
Chapter 13: Functions 271
________________________________________________________________________
The following script should be placed in the pad script of your Home
pad. It watches for the alarm.
handler idle;
begin
global stopSeconds;
-- check to see if an alarm is set...
if stopseconds > 0 then
begin
-- has time elapsed?
if the seconds >= stopSeconds then
begin
answer "The alarm has gone off!" with "Ok";
put 0 into stopSeconds;
end;
end;
pass; -- pass on to the next object
end;
Abbreviations: secs()
See Also: time(), longTime()
-----------------------------------
SHIFTKEY
Syntax:
shiftKey()
Purpose: This function determines the status of the SHIFT key. It
returns either up or down.
Examples:
put shiftKey() into shiftStatus;
put the shiftKey into the message box;
________________________________________________________________________
Chapter 13: Functions 272
________________________________________________________________________
-----------------------------------
SIN
Syntax:
sin(<angle>)
Purpose: This function returns the sine of an angle.
Examples:
put sin(30) into the message box; -- 0.5
put the sin of 45 into page field 1; -- 0.707107
See Also: cos(), tan()
-----------------------------------
SQRT
Syntax:
sqrt(<number>)
Purpose: This function returns the square root of <number>. A error
occurs if <number> is negative.
Examples:
put the sqrt of 5 into it;
put the sqrt of 90 into it;
-----------------------------------
STDEV
Syntax:
stdev(<num>,<num>[,<num>...])
Purpose: This function calculates the standard deviation of two or more
numbers. The formula used to compute the standard deviation is:
sqrt(((num1-average)^2 + (num2-average)^2 +...+ (numN-
average)^2)/N)
Examples:
put the stdev of 6600, 7954, 4399, 7895 into msg;
put stdev(5000,15000,30000,40000,50000); -- puts 18234.583
________________________________________________________________________
Chapter 13: Functions 273
________________________________________________________________________
-----------------------------------
SUBSTITUTE
Syntax:
substitute(<targetstring>,<pattern>,<replacement>
Purpose: The substitute() function replaces all of the occurrences of
one string with another and returns the new string. For example, if you
wanted to replace all occurrences of "o" with "X":
substitute("Hello World","o","X")
would return "hellX WXrld".
Examples:
put substitute("Biff and Chet and Sid","and","and not");
-----------------------------------
SUM
Syntax:
sum(<num>,<num>[,<num>...])
Purpose: This function returns the sum off all the passed parameters
Examples:
put sum(1,45,6,92) into message box;
put the sum of apples,oranges into fruit;
See Also: product(), max(), min()
-----------------------------------
TAN
Syntax:
tan(<number>)
Purpose: This function returns the tangent of an angle.
Examples:
put tan(30) into the message box; -- 30
put the tan of 45 into page field 5; -- 1
See Also: cos(), sin()
________________________________________________________________________
Chapter 13: Functions 274
________________________________________________________________________
-----------------------------------
TARGET
Syntax:
target()
Purpose: The target() function returns a string identifying the initial
receiver of a message. The target can also be used as an object within
the script. The target is returned in the following manner:
page button id 2
bkgnd button id 2
page field id 1
bkgnd field id 1
page id 2
bkgnd id 3
pad "C:\HPAD2\HOME.PAD"
Examples:
put the target into the message box;
if word 2 of the target is "button then
send "select" to the target;
See Also: currentObject()
-----------------------------------
TIME
Syntax:
time()
Purpose: This function returns time in the format:
HH:MM PP
where HH = hour, MM = minute, and PP = AM or PM
Examples:
get the time; --put the time into IT
convert it to seconds; --convert current time to seconds
add 30 to it; --add 30 seconds
convert it to time; --convert it back
put it; --display it in the message box
See Also: longTime(), seconds()
________________________________________________________________________
Chapter 13: Functions 275
________________________________________________________________________
-----------------------------------
TRIM
Syntax:
trim(<string>)
Purpose: The trim() function removes the trailing and leading spaces
from a container. For example,
trim(" hello ")
returns "hello".
Examples:
put the trim of page field 1 into page field 5;
-----------------------------------
TRUNC
Syntax:
trunc(<number>)
Purpose: This function returns the integer portion of a number. The
function does not round the number, it simply ignores all digits
following the decimal point. For example,
trunc(56.78)
returns 56.
Examples:
put the trunc of 7.489 into IT;
put the trunc of "P" into the message box;
See Also: round()
________________________________________________________________________
Chapter 13: Functions 276
________________________________________________________________________
-----------------------------------
UPPER
Syntax:
upper(<string>)
Purpose: This function returns the string in all uppercase leaving
characters that aren't letters unchanged. For example,
upper("Hello World 123")
returns "HELLO WORLD 123".
Examples:
put upper("this is a string") into the msg;
See Also: lower()
-----------------------------------
VARIANCE
Syntax:
variance(<rate>,<previous>)
Purpose: This function returns the variance of two or more numbers.
Examples:
put the variance of 6600, 7954, 4399, 7895;
See Also: compound(), annuity()
-----------------------------------
VERSION
Syntax:
version()
Purpose: The version() returns the version number of
HyperPAD.
Examples:
put the version in the message box;
________________________________________________________________________
Chapter 3: The Object Hierarchy 29
________________________________________________________________________
CHAPTER THREE: THE OBJECT HIERARCHY
Each handler, whose components were discussed in the preceding chapter,
depends on receiving a specific message in order to execute its
statements. This section describes HyperPAD's message passing system,
how messages are sent to objects and what happens when the messages are
received by objects.
The type and nature of the message and the current object at the time
the message was generated determines which object receives the message
first. The receiving object may or may not have a handler for that
message. If it does, then the handler for that message executes and the
message stops its travel. If the object does not have a handler for that
message, then the message is passed on to the next object in the
hierarchy. This process continues until there is either a handler for
that message or the message reaches HyperPAD.
The types of messages and the path that the messages take during their
travel through HyperPAD (the hierarchy) are discussed in this chapter.
________________________________________________________________________
Chapter 3: The Object Hierarchy 30
________________________________________________________________________
SENDING MESSAGES
Within HyperPAD, script execution is initiated by messages sent to
objects. Messages are HyperPAD's way of "telling" the objects what's
taking place in the environment. Messages are sent:
0 When an event occurs (like a key being pressed or mouse button
being clicked).
0 When the user executes a statement from the message box.
0 When certain commands are executed from within a script, such as:
beep.
0 When the user selects a menu command.
0 When the system is idle.
WHERE DO MESSAGES GO?
When an object receives a message, one of two actions is taken. If the
object has a handler for that message, the handler is executed and the
message travel is stopped.
If the object doesn't have a handler for the message, then the message
is sent to the next object in the object hierarchy. The message will
continue along in this manner until it encounters a handler for itself,
or reaches HyperPAD. The following diagram summarizes the path taken by
a message through HyperPAD:
________________________________________________________________________
Chapter 3: The Object Hierarchy 31
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 3: The Object Hierarchy 32
________________________________________________________________________
The object with the focus receives the message first, which will usually
be either a page, button, or field. For example, if a button is
highlighted and the user selects it (by pressing ENTER) a
select message is sent to the button. If the script doesn't have a
select handler, the message is sent to the page, and on up the hierarchy
until a handler is found or the message reaches HyperPAD.
If the message reaches HyperPAD, one of three actions is taken.
1. The message will be ignored. This happens when there is no handler
for a system message.
2. The message will be interpreted by HyperPAD. This happens, for
example, with the quit message.
3. An error will be displayed indicating that HyperPAD didn't
understand the message.
TYPES OF MESSAGES
The types of messages that are sent are discussed in this section.
SYSTEM MESSAGES
The most common messages passed through HyperPAD are system messages.
These messages are sent to an object in response to a user-generated
event. For example, if the pad user presses the left mouse button, the
mouseDown message is sent to the object under the mouse pointer. Because
system messages are generated by the pad user, the messages are
initially sent to either the current page, button, or field. The object
that first receives the message is called the target.
There are two types of system messages:
1. Notification messages. These are messages that result from an action
in the system and whose purpose is to notify a script that an action has
occurred. Some examples are:
openPage, mouseUp, newPad
Creating handlers for these messages lets you specify actions to be
performed after the user has completed an action in HyperPAD. For
example, a mouseUp handler can be used to trigger some actions after the
mouse button has been physically released.
2. Normal messages. These messages are sent before any actions have
been taken and result in an action occurring when the message reaches
HyperPAD. Normal messages are those that HyperPAD understands, such as
doMenu, quit, help, beep, and deletePage. For example, if you select
________________________________________________________________________
Chapter 3: The Object Hierarchy 33
________________________________________________________________________
Delete Button on the Edit menu, then the deleteButton command is sent to
that button. Only when this message is received by HyperPAD will the
button be deleted.
By creating handlers for these messages, you can control different
aspects of HyperPAD. For example, the following handler intercepts the
quit message asking if it is ok to quit. If the user selects Ok, the
handler passes the message on (so that it will reach HyperPAD and you'll
exit to DOS). If not, the message stops and HyperPAD doesn't quit.
handler select;
begin
answer "Ok to quit?";
if it is "Ok" then pass;
end;
MESSAGES FROM SCRIPTS
Within your scripts, you can send messages. For example:
handler select;
begin
CalculateResult;
end;
The message calculateResult will be sent to the script of the currently
executing object. If there is a handler called calculateResult somewhere
in the message path, it will then be executed.
MESSAGE BOX MESSAGES
The message box provides a way of executing statements immediately
without having to type in a script. When you type in a command and press
ENTER, one of the following will occur:
1. If you typed in a command, it will be executed (except the do
command and any begin...end block).
2. If you typed in a message and parameters, the message will be sent
to the current page. If there is a handler for the message, it will be
executed. If there is no handler, and HyperPAD doesn't recognize the
message, an error is displayed.
3. If a valid expression was entered, it is evaluated and the result is
placed into the message box.
________________________________________________________________________
Chapter 3: The Object Hierarchy 34
________________________________________________________________________
MESSAGES THAT LOOK LIKE COMMANDS
Some commands within scripts are implemented as messages. This may seem
confusing. For example, you may, at first, be unable to determine if the
following statement is a command or a message:
beep;
In fact, this is a command that sends a message called beep. When this
message reaches HyperPAD, a sound is emitted from the system speaker.
All of these special messages are noted in the Chapter Ten.
RECEIVING AND SENDING MESSAGES
As you learned above, the initial receiver of a message depends on the
type and nature of the message as well as which object is currently
selected when the message is generated.
As senders and receivers of messages, all objects work the same. The
type of object has no effect on the execution of the script. The
following outlines the procedure taken when an object receives a
message:
First, the script is searched for a handler that corresponds to the
message. If a match is located, that specific handler is executed. After
a handler executes, the message stops its travel up the hierarchy unless
it is passed with the pass command. If no matches are found, the message
is passed to the next object up the hierarchy.
________________________________________________________________________
Chapter 3: The Object Hierarchy 35
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
THE EXIT COMMAND
The exit command stops execution of a handler before the last statement
of the handler has executed. In the following example, the statements
following the exit statement will never be executed:
handler select;
begin
exit;
beep;
go to the next page;
end;
The exit command terminates that message's travel through the hierarchy.
If you want to stop the execution of all pending handlers, use the exit
to hyperpad command. This command is similar to the user pressing
CTRL+BREAK.
________________________________________________________________________
Chapter 3: The Object Hierarchy 36
________________________________________________________________________
The following example uses the exit to hyperpad command to stop the
display of a sequence of screens. The checkContinue handler below does
this by stopping all pending handlers, including the calling handler, at
the user's request.
handler checkContinue;
begin
answer "Is it ok to continue?";
if it is "Cancel" then exit to hyperpad;
end;
handler select;
begin
go to the next page;
checkContinue;
go to the next page;
checkContinue;
go to pad "phone";
checkContinue;
go home;
end;
THE PASS COMMAND
The pass command enables a handler to send the message to the next
object in the hierarchy, as if the current handler hadn't received it.
For example, consider the following scripts:
Script: Description:
---------------------------------------------------------
handler select; This message will stop here, and
begin will not go on to the next level in
: the message path.
end;
handler select; This script intercepts the message,
begin performs some actions, and then
: passes the message on to be handled
pass; by other objects higher in the
end; hierarchy.
________________________________________________________________________
Chapter 3: The Object Hierarchy 37
________________________________________________________________________
The pass command stops execution of a handler. For example, in the
following script, the beep statement never gets executed:
handler select;
begin
pass;
beep;
end;
Make sure you position the pass statement as the last statement in the
script you want executed.
ALTERING THE MESSAGE PATH
Messages are normally passed by default up the hierarchy, never across
to other objects on the same level. With the send command, however, you
can redirect messages to objects outside the normal hierarchy, such as
those objects on another page, or lower in the hierarchy.
For example, the following handler redirects the mouseUp message to a
button on another page:
handler mouseUp;
begin
send "mouseUp" to button "Help" of page 2;
end;
________________________________________________________________________
Chapter 3: The Object Hierarchy 38
________________________________________________________________________
If the receiving object does not contain a handler for that message, the
message will proceed to travel up that object's hierarchy (not the
hierarchy of the sending object).
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 3: The Object Hierarchy 39
________________________________________________________________________
Messages sent from a script travel up the path of that sending object.
This is important to remember in cases like the following:
handler mouseUp;
begin
go to pad "B";
calculateTotals;
end;
Even though the pad has been changed (to pad "B"), the message
calculateTotals still travels the message path of the original pad.
WHERE TO PUT YOUR HANDLERS
Considering all of the stops a message makes on its journey along the
message path, it may at first be difficult to decide where to put your
handlers. For example, should you put a handler in the script of a
button, a page script, the corresponding background script, the pad
script, or maybe in the Home pad script? To answer this question, you
need to determine which objects need to use this handler. Then you will
know exactly where to locate your handlers.
Simply put, your handlers should be located in the script of the object
lowest in the hierarchy and still be accessible to all the objects that
need that handler.
For example, if you have a single button that, when selected, takes you
to the next page, you would create a handler in the script of the
button.
Suppose that you have 10 buttons on the page and you want the pad user
to be able to click on any button and go to the next page. Instead of
including this handler in the script of each of the ten buttons, you
could put the handler into the script of the page. Thus, all buttons on
the page would respond to the select message using the same handler.
(Remember that if an object doesn't have a handler for a message, it is
passed on to the next layer...in this case, the page.)
In the next case, suppose that you have a handler called calcResult that
you would like to access from several different pages which are all on
the same background. Instead of including the handler in each page
script that requires it, you could put the handler in the background
script, making it accessible to every page that uses that background.
Next, suppose that the calcResult handler is used in many different
pages, buttons and fields throughout your entire pad, even from
different backgrounds. In this case, you would want to put the handler
in the pad script, making it accessible to each object in the pad.
________________________________________________________________________
Chapter 3: The Object Hierarchy 40
________________________________________________________________________
In the last case, suppose that the calcResult handler was used in many
of your pads. Depending on how often it is used, you may want to copy it
into each pad that uses it. Another approach is to put the handler in
the pad script of the Home pad. This makes the handler accessible to all
of your pads. You must be careful, however, to keep this script small
and efficient because it is always loaded (thus requiring more memory).
_______________________________________________________________________
Chapter 1: What's Really Happening 73
________________________________________________________________________
CHAPTER TEN: MESSAGES
The following chapter describes in detail all of the messages sent to
HyperPAD's objects. It is divided into three sections, one for each type
of object that can initially receive a message. Each section begins with
a table describing the messages discussed in that section. At the end of
this chapter is a table of common events that occur in HyperPAD, along
with the list of messages sent when these events occur.
ABOUT MESSAGES
A message is a notification sent to an object indicating that something
has happened in the HyperPAD system. For example, if you click the mouse
on a button, the mouseUp message is sent to that button.
Once sent, a message follows a predetermined path through the object
hierarchy. The starting point into this path is either a button, field,
or page.
If the receiving object does not have a handler for a message, the
message will be passed on to the next object in the hierarchy until
either a handler is found for that message or it reaches HyperPAD.
There are two types of messages that can be sent to objects. The first
type is a notification message. This type of message is sent after an
action has already occurred, and thus notifies the object of the event.
The second type of message is sent before an action occurs. For example,
when the user selects the Delete Button command from the Edit menu, the
deleteButton message is sent to the current button. The button will not
be deleted until the message has traveled through the object hierarchy
and is received by HyperPAD.
_______________________________________________________________________
Chapter 1: What's Really Happening 74
________________________________________________________________________
MESSAGE SENT FROM COMMANDS
In addition to the messages sent to objects, there are a few messages
automatically sent by their command counterparts. You can create
handlers for them. The implementation for these messages is defined in
HyperPAD itself.
beep
close
flushCache
fxshow
noSound
play
playBack
record
setDefaultPopupColors
setPopupColors
sound
wait
You can find descriptions of these commands in Chapter Eleven,
"Commands."
MESSAGES SENT TO A BUTTON
This section lists all of the messages that are initially sent to
buttons. In other words, a button is a possible entry point into the
object hierarchy for these messages. If the receiving button does not
contain a handler for the message, the message will be passed up the
hierarchy until it reaches a handler for that message. If no handler is
found, the message will eventually reach HyperPAD.
The following table shows all of the messages sent to buttons. The
column on the right indicates if the message is sent before or after the
action occurs (i.e. results in an action when received by HyperPAD).
Message: Message Type:
---------------------------------------------------
closeButton after
deleteButton before
keyPress before
mouseDown after
mouseEnter after
mouseLeave after
_______________________________________________________________________
Chapter 1: What's Really Happening 75
________________________________________________________________________
Message: Message Type:
---------------------------------------------------
mouseStillDown after
mouseUp after
mouseWithin after
newButton after
openButton after
select after, except with checkBox buttons
-----------------------------------
CLOSEBUTTON
This message is sent to a button when the focus is removed. A button
loses the focus when the user moves the cursor by clicking the right
mouse button outside the button's borders, or by pressing the TAB key or
arrow keys to move to another object.
The following example uses closeButton and openButton to change the
border of a button, indicating when the button has the focus.
handler closeButton;
begin;
set the edgeType of me to 1;
end;
handler openButton;
begin
set the edgeType of me to 2;
end;
-----------------------------------
DELETEBUTTON
The deleteButton message is sent to a button when the user selects Cut
Button or Delete Button from HyperPAD's menus. When this message reaches
HyperPAD, the button is deleted. By intercepting the message, you can
prevent buttons from being deleted.
_______________________________________________________________________
Chapter 1: What's Really Happening 76
________________________________________________________________________
For example, the following handler (in a button script) presents the
user with a dialog box whenever Delete or Cut Button is selected, asking
them if it is okay to delete the button.
handler deleteButton;
begin
answer "Ok to delete button?" with "Yes", "No";
if it is "Yes" then pass;
end;
This example passes the message on to HyperPAD (to delete the button)
only if the user answers "Yes" in the answer dialog box.
-----------------------------------
KEYPRESS
The keyPress message is sent to the button with the focus when any key
is pressed.
In the following example, pressing CTRL+ENTER selects the button:
handler keyPress(k);
begin
if key(k) is "CTRL+ENTER" then send "select" to me
else pass;
end;
-----------------------------------
MOUSEDOWN
The mouseDown message is sent to the button when the mouse button is
pressed while the mouse pointer is within the rectangle of the button.
-----------------------------------
MOUSEENTER
The mouseEnter message is sent to the button when the mouse pointer
enters the button's borders. The mouse button does not have to be
pressed for this message to be sent. (See the example under mouseLeave.)
-----------------------------------
MOUSELEAVE
The mouseLeave message is sent to the button when the mouse pointer
exits the button's borders. This message will only be sent to objects
that have first received a mouseEnter message.
An interesting use for mouseEnter and mouseLeave is to highlight the
button that the mouse pointer is currently on.
_______________________________________________________________________
Chapter 1: What's Really Happening 77
________________________________________________________________________
The following handlers in the button script will accomplish this:
handler mouseEnter;
begin
set the hilite of me to true;
end;
handler mouseLeave;
begin
set the hilite of me to false;
end;
-----------------------------------
MOUSESTILLDOWN
The mouseStillDown message is sent to a button continuously while the
mouse button is held down. In order for this message to be sent, the
mouse must have been initially pressed within the rectangle of the
button.
-----------------------------------
MOUSEUP
The mouseUp message is sent to a button when the mouse button is
released and the mouse pointer is within the button's border. The mouse
pointer must be inside the original button where the mouse button was
pressed.
-----------------------------------
MOUSEWITHIN
When the pointer is within the button's rectangle, the mouseWithin
message is sent continuously. This message is sent after the initial
mouseEnter message.
-----------------------------------
NEWBUTTON
This message is sent to a button when it is created, just after it
appears on-screen. Usually, this message gets passed through the button
up the object hierarchy unless the button is being pasted and has a
script with a newButton handler.
The following example handler in the pad script of your Home pad causes
all new buttons to be colored red and have a double border:
handler newButton;
begin
set the edgeType of the target to 2;
set the color of the target to red;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 78
________________________________________________________________________
-----------------------------------
OPENBUTTON
This message is sent to a button when it receives the focus (is
highlighted). A button receives the focus when the user presses TAB or
the arrow keys to access it, or clicks a mouse button while the cursor
is inside the button's border.
The following example handler in a button script causes the button to
have a double border when it has the focus:
handler openButton;
begin
set the edgeType of me to 2;
end;
-----------------------------------
SELECT
This message is sent to the button with the focus if you press ENTER,
SPACE, or click the left mouse button while the cursor is inside the
button's borders. In other words, this message is sent to a button when
it is selected. Rather than using mouseUp handlers, create select
handlers to perform actions when buttons are selected since not every
HyperPAD user will use the mouse to select buttons.
Below is an example of a button script that uses the select handler:
handler select;
begin
go to the next page;
end;
The select message has special meaning for check box buttons. When the
user toggles the check of the button (by pressing ENTER or clicking the
button with the mouse), the select message is sent to that button. When
the message is received by HyperPAD, the check of the button is toggled.
By intercepting the select message, you can customize the behavior of
check box buttons. For example, the following handler in the button
script prevents the button's check mark from being changed because the
message is not passed on to the next object in the hierarchy.
handler Select;
begin
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 79
________________________________________________________________________
The next example toggles the message box on and off in coordination with
the check mark of the button:
handler select;
begin
set the visible of msg to not the check of me;
pass;
end;
MESSAGES SENT TO FIELDS
The following messages are initially sent to fields. If the receiving
field does not contain a handler for the message, the message will be
passed up the hierarchy until it reaches an appropriate handler. If no
handler is found, the message will eventually reach HyperPAD.
The column on the right indicates if the message is sent before or after
the action occurs (i.e. results in an action when received by HyperPAD).
These messages are sent to fields:
Message: Message Type:
---------------------------------------------------
closeField after
deleteField before
keyPress before
mark before (for list box fields only)
mouseDown after
mouseEnter after
mouseLeave after
mouseStillDown after
mouseUp after
mouseWithin after
newField after
openField after
select after
unmark before (for list box fields only)
_______________________________________________________________________
Chapter 1: What's Really Happening 80
________________________________________________________________________
-----------------------------------
CLOSEFIELD
This message is sent to an unlocked field (one that can be edited) when
the focus is taken away. The focus is removed from a field when it is
exited by using TAB, the arrow keys, or the mouse. The focus may also be
changed from within a script.
The following example uppercases the contents of a field when the focus
is taken away:
handler closeField;
begin
put upper(the value of me) into me;
end;
See Also: openField
-----------------------------------
DELETEFIELD
The deleteField message is sent when the user selects Cut Field or
Delete Field from the Edit menu. By intercepting this message, you can
prevent fields from being deleted.
The following handler in a field's script checks to make sure it is okay
to delete the field.
handler deleteField;
begin
answer "Ok to delete field" && the name of me;
if it is "Ok" then pass;
end;
-----------------------------------
KEYPRESS
The keyPress message is sent to the field with the focus when a key is
pressed. By intercepting this message, you prevent keys from reaching
the field or HyperPAD. For example, you can create a field that does not
allow numbers, as in the following handler:
handler keyPress(keyNum);
begin
get key(keyNum);
if it is not in "1234567890" then pass;
end;
See Appendix 2, "Key Codes," for details on keyPress key values.
_______________________________________________________________________
Chapter 1: What's Really Happening 81
________________________________________________________________________
-----------------------------------
MARK
The mark message is sent to list box fields when the user attempts to
mark a line by pressing SPACE or the right mouse button. You can prevent
lines from being marked by intercepting this message and not passing it.
The line number being marked is passed as a parameter with this message.
As an example, the following handler keeps track of how many lines are
marked, allowing a maximum of ten:
handler mark(lineNumber);
begin
global numMarked;
if numMarked < 10 then
begin
add 1 to numMarked;
pass;
end;
end;
handler unmark(lineNumber);
begin
global numMarked;
subtract 1 from numMarked;
pass;
end;
Note: See the section on fields in the User's Guide for more
information on list box fields.
See Also: markerChar, unmark, markerAttr
-----------------------------------
MOUSEDOWN
The mouseDown message is sent to locked fields (fields that can not be
edited) when the user presses the left mouse button while the mouse
pointer is within the field's borders.
-----------------------------------
MOUSEENTER
This message is sent to a field when the mouse pointer is within the
rectangle of a field.
_______________________________________________________________________
Chapter 1: What's Really Happening 82
________________________________________________________________________
-----------------------------------
MOUSELEAVE
This message is sent when the mouse pointer exits the boundaries of a
field.
-----------------------------------
MOUSESTILLDOWN
The mouseStillDown message is sent to a locked field (uneditable field)
while the left mouse button is held down. This message will only be sent
if the mouse was initially pressed within the rectangle of the field.
-----------------------------------
MOUSEUP
The mouseUp message is sent to a locked field (uneditable field) when
the left mouse button is released and the mouse pointer is within the
field's borders. The mouse pointer must be within the same field that
received the initial mouseDown message.
If you click the mouse on an unlocked text field, the field will be
given the focus and opened for editing.
-----------------------------------
MOUSEWITHIN
The mouseWithin message is sent to a field continuously while the mouse
pointer is within the rectangle of the field.
-----------------------------------
NEWFIELD
The newField message is sent to a field when it is created, just after
it appears on-screen. Usually, this message gets passed up the object
hierarchy unless the field is being pasted and has a script with a
newField handler.
This handler, which causes all new fields to look like typical database
fields with the name appearing on the left, belongs in the pad script:
handler newField;
begin
set the showName of the target to true;
set the withEdge of the target to false;
set the rect of the target to 10,10,30,10;
set the hiliteIfFocus of the target to true;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 83
________________________________________________________________________
-----------------------------------
OPENFIELD
The openField message is sent to an unlocked field (one that can be
edited) when it receives the focus (opened for editing). A field
receives the focus when it is entered using TAB, the arrow keys, or the
mouse. The focus may also be sent to that field from a script or the
message box.
The following example keeps track of the last time a field was updated:
handler openField;
begin
global previous_content;
put the value of me into previous_content;
end;
handler closeField;
begin
global previous_content;
if previous_content is not the value of me then
put date() into field "last updated";
end;
-----------------------------------
SELECT
This message is sent to list box fields when the user presses ENTER or
double clicks the mouse on a line in the field, and it is sent to locked
fields when the user releases the mouse button. Use this message to
perform actions when the user selects an item from a list box. For
example:
handler select;
begin
get the currentLine of me;
get line it of the value of me;
ask "You have selected" && it;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 84
________________________________________________________________________
-----------------------------------
UNMARK
This message is sent to list box fields when the user attempts to unmark
a line by pressing SPACE or the right mouse button. Prevent lines from
being unmarked by intercepting this message and not passing it.
The line being unmarked is passed as a parameter.
Examples:
The following unmark handler prevents the user from unmarking all the
even lines (if they are marked).
handler unMark(lineNum);
begin
if lineNum mod 2 is not zero then pass;
end;
Note: See the section on fields in the User's Guide for more
information on list box fields.
See Also: mark, markerChar, markerAttr
_______________________________________________________________________
Chapter 1: What's Really Happening 85
________________________________________________________________________
MESSAGES SENT TO A PAGE
This section describes messages received directly by the page. If the
receiving page does not contain a handler for the message, the message
will be passed up the hierarchy to the background and so on until it
reaches an appropriate handler. If no handler is found, the message will
eventually reach HyperPAD.
The following table lists all of the messages and indicates if the
message is sent before or after an action occurs(i.e. results in an
action when received by HyperPAD).
Message: Type: Message: Type:
-----------------------------------------------------------------------
break after mouseStillDown after
cancel after mouseUp after
closePad after newBackground after
closePage after newPad after
deleteBackground before newPage after
deletePad before openPad after
doMenu before quit before
help before resume after
idle after startUp after
keyPress before suspend before
mouseDown after
-----------------------------------
BREAK
This message is sent to the current page when the user presses
CTRL+BREAK.
The combination CTRL+BREAK stops the execution of any pending handlers.
CTRL+BREAK also stops many other processes, including sort, query,
print, find, import, and export. A break handler can be useful if you
need to perform any cleanup when one of these tasks is interrupted.
_______________________________________________________________________
Chapter 1: What's Really Happening 86
________________________________________________________________________
For example, the following break handler cleans up if a find command was
interrupted.
This handler belongs in a button script:
handler select;
begin
global inFind;
ask "Find what?";
if it is empty then exit;
put true into inFind;
find it;
put false into inFind;
end;
This handler belongs in the page script:
handler break;
begin
global inFind;
if inFind then answer "Find aborted!" with "Ok";
end;
Comments: Another way to stop the execution of all pending handlers is
with the exit command:
exit to hyperpad;
See Also: keyPress
-----------------------------------
CANCEL
The cancel message is sent to the current page when the ESC key is
pressed. This is used to maintain compatibility with the HyperPAD User
Interface in which ESC takes you back.
The following example goes Home when the user presses ESC:
handler cancel;
begin
go home;
end;
-----------------------------------
CLOSEPAD
The closePad message is sent to the current page before the pad is
closed and disappears. This can happen when the user quits, changes to
another pad, or runs another program.
_______________________________________________________________________
Chapter 1: What's Really Happening 87
________________________________________________________________________
You can use closePad to perform any pad cleanup that may be necessary
before you leave a pad. The following handler uses that opportunity to
delete the contents of some fields:
handler closePad;
begin
put empty into field "time";
put empty into field "status";
end;
See Also: openPad, openPage, closePage
-----------------------------------
CLOSEPAGE
The closePage message is sent to the current page when you go to another
page, go to another pad, run another program, or quit HyperPAD.
The following example uses a closePage handler to hide some buttons.
Next time this page is accessed, the buttons will not be visible:
handler closePage;
begin
set the lockScreen to true;
hide button id 6;
hide button "Quit";
end;
See Also: closePad, openPage
-----------------------------------
DELETEBACKGROUND
The deleteBackground message is sent to the current page right before a
background is deleted. You can only delete a background after all the
pages using it are deleted or cut.
By intercepting this message, you control whether a background is
deleted. The following example allows a background to be deleted only if
the user's name is "John":
handler deleteBackground;
begin
ask "What is your name?";
if it is "John" then pass;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 88
________________________________________________________________________
-----------------------------------
DELETEPAD
This message is sent to the current page when the user selects Delete
Pad from the File menu. Since this message is sent before the pad is
deleted you can prevent deletion by intercepting this message.
The following example makes a backup of the current pad (with the same
name as the current pad, but with a DEL file extension) before it is
deleted:
handler deletePad;
begin
get the name of pad;
put ".DEL" after it;
record it & "{enter}";
playback;
doMenu "Save a Copy...";
pass;
end;
-----------------------------------
DELETEPAGE
The deletePage message is sent to a page when the user selects Delete or
Cut Page from the Edit menu. This message is sent before the page is
actually deleted. The page will only be deleted if this message is
received by HyperPAD. By intercepting deletePage, you prevent the page
from being deleted.
The following handler intercepts deletePage to make sure that a linked
page gets deleted too. It first saves the current page, then gets a
linked page number from a field called "Attached Page Number". It then
goes to that page and deletes it.
handler deletePage;
begin
get field "Attached Page Number";
push this page;
go to page "linked";
send "doMenu" "Delete Page" to this page;
pop page;
pass;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 89
________________________________________________________________________
The following handler intercepts deletePage to first make a copy of the
page in another pad called "backup":
handler deletePage;
begin
doMenu "Copy Page";
push this page;
go to pad "backup";
doMenu "Paste Page";
pop page;
pass;
end;
See Also: deletePad, deleteBackground
-----------------------------------
DOMENU
The doMenu message is sent to the current page when the user selects a
command from a menu. The exact text of the menu choice is sent with the
message as a parameter. Intercepting doMenu is a powerful way to
customize HyperPAD. You can redefine the actions taken when a user
selects commands from the menu.
The following example shows how to redefine the File Exit command. All
other menu commands will work normally.
handler doMenu(command);
begin
if command is "Exit" then beep
else pass;
end;
You can also select menu commands artificially, as is done in the
following handler in a button script:
handler select;
begin
doMenu "Printer Setup...";
doMenu "Page Setup...";
doMenu "Print...";
end;
Note: The menu command must be represented exactly as it appears on
HyperPAD's menu.
_______________________________________________________________________
Chapter 1: What's Really Happening 90
________________________________________________________________________
-----------------------------------
HELP
The help message is sent to the current page when the user presses F1 or
selects Help from the Go menu. By intercepting this message, you can
create your own help for your pads. If this message reaches HyperPAD,
HyperPAD's Help system will be loaded.
In the following example, the user is asked which help is preferred, the
local (yours) or the main HyperPAD Help system:
handler help;
begin
answer "Which help?" with "Local", "HyperPAD";
if it is "Local" then go to page "Local Help"
else pass;
end;
You can send the help message from within a script in order to go to
HyperPAD's help:
handler select;
begin
help;
end;
-----------------------------------
IDLE
This message is sent to the current page continuously when HyperPAD has
no other messages to pass and no other scripts are currently executing.
This message is only sent when the Browse tool is in use. Be cautious
when creating idle handlers. Since the idle message is sent so
frequently, the script will execute many times, greatly slowing down the
overall performance of your pad.
A good use of the idle message is to display the time in a field. The
following handler in the pad script will do so (make sure you create a
background field named "time" before trying this):
handler idle;
begin
put the time into field "time";
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 91
________________________________________________________________________
Directly before the idle message is sent, the following actions are
performed:
1. The printerTranslation property is set to false.
2. The lockScreen property is set to false. If the previous value was
not false, then the screen is redrawn.
3. The lockRecent property is set to false.
4. The lockMessages property is set to false.
5. The numberForm at property is set back to its default: "0.######".
6. The visual effect is disabled.
Note: If you have a runtime error in your idle handler, the only way to
fix it is to select "Script" in the runtime error box.
-----------------------------------
KEYPRESS
The keyPress message is sent directly to the page if a key is pressed
and no button or field has the focus. (This condition exists if the
mouse is clicked outside of all buttons and fields.) The key is passed
along with the message in its numeric format. The keyPress message is
only sent while the Browse tool is active.
If you want a key on you keyboard to perform some action, regardless of
the current button or field, put a keyPress handler in the page.
Be cautious when intercepting the keyPress message. You can easily lock
yourself out of HyperPAD. For example, the following handler in your pad
script makes your keyboard useless within HyperPAD:
handler keypress(k);
begin
end;
Since this handler does not pass the keyPress message on, the keyboard
will appear inactive. If you have a mouse, you will be able to access
and change the script, otherwise you will have to re-boot your machine
(by turning your machine off) and possibly lose some data. To safeguard
against this condition, you can create the following break handler in
every script containing a keyPress handler:
handler break;
begin
edit the script of me;
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 92
________________________________________________________________________
Thus, if you made a mistake in your keyPress handler, you can always
press CTRL+BREAK to edit the script.
The following keyPress handler processes the F11, F12, and CTRL+V
keystrokes, and passes any other keystroke up the object hierarchy:
handler keypress(keyNumber);
begin
get key(keyNumber);
case it of
"f11" : go to page "help";
"f12" : go to page "index";
"ctrl+v" : ;
otherwise : pass;
end;
end;
See Also: key
-----------------------------------
MOUSEDOWN
The mouseDown message is sent to the current page when the
user presses the mouse button and the mouse pointer is not within the
boundaries of any button or field. When the user releases the mouse
button, the mouseUp messsage is sent.
-----------------------------------
MOUSESTILLDOWN
The mouseStillDown message is sent to the current page continuously
while the mouse button is held down. This message will be sent directly
to the current page only if the mouse button was initially pressed
outside of any buttons or fields.
-----------------------------------
MOUSEUP
The mouseUp message is sent to the current page when the mouse button is
released. This message will be sent directly to the current page only if
the mouse button was initially pressed outside of any button or field's
border.
-----------------------------------
NEWBACKGROUND
The newBackground message is sent to the current page when a background
is created. (This message is sent to the new page of the new background,
not the page that was current when the New Background command was
selected.) You can put a handler for the newBackground message either in
the current pad script or the pad script of your Home pad.
_______________________________________________________________________
Chapter 1: What's Really Happening 93
________________________________________________________________________
-----------------------------------
NEWPAD
The newPad message is sent to the new page of a pad after it is created.
The only appropriate place for newPad handlers is in the pad script of
the Home pad because new pads initially have no scripts.
-----------------------------------
NEWPAGE
The newPage message is sent to a page when it is created, just after it
appears on screen. This message is usually passed up the hierarchy,
unless the page has been pasted and has a newPage handler.
The following pad script names each new page according to the creation
time and date.
handler newPage;
begin
set the name of this page to date() && time();
end;
-----------------------------------
OPENPAD
The openPad message is sent to the default page of a newly opened pad,
just after it is displayed. Use this message to perform any
initialization that your pad may require, like the following example:
handler openPad;
begin
global taxTotal,salesTotal;
put 0 into taxTotal;
put 0 into salesTotal;
put empty into page field "first name";
put 0.07 into page field "Sales Tax";
hide page button 5;
end;
See Also: closePad, openPage, closePage
_______________________________________________________________________
Chapter 1: What's Really Happening 94
________________________________________________________________________
-----------------------------------
OPENPAGE
The openPage message is sent to a page just after it becomes the current
page.
The following example uses openPage to set the focus to a default
button:
handler openPage;
begin
set the focus to page button "Pick";
end;
-----------------------------------
QUIT
This message is sent to the current page when the user selects Exit from
the File menu. By intercepting this message, you can prevent the user
from quitting HyperPAD. You can also send a quit message, causing
HyperPAD to return to DOS.
The following handler quits HyperPAD and returns to DOS:
handler select;
begin
answer "Are you sure you want to quit?";
if it is "Ok" then quit;
end;
The next example intercepts the quit message and goes to a pad called
"phone" instead.
handler quit;
begin
go to pad "phone";
end;
-----------------------------------
RESUME
The resume message is sent to the current page when HyperPAD resumes
execution after running another program. After running other programs,
HyperPAD will not complete execution of the script containing the run
command. In the following example, the resume handler performs the
actions that normally would not be executed after a run command:
_______________________________________________________________________
Chapter 1: What's Really Happening 95
________________________________________________________________________
Put this handler in a button:
handler select;
begin
run "C:\COMMAND.COM";
beep; -- this NEVER gets executed
end;
This handler belongs in the page:
handler resume;
begin
beep;
end;
See Also: startUp, openPage, openPad
-----------------------------------
STARTUP
The startUp message is sent to the first page displayed when HyperPAD is
run for the first time that session.
-----------------------------------
SUSPEND
This message is sent to the current page just before the user runs
another program. This occurs when "Run Program" is selected from the
File menu or the run command is executed in a script. By intercepting
this message, you can prevent HyperPAD from launching other programs.
In the following pad script, the suspend handler remembers the disk
space so it can monitor how much space the launched program required:
handler suspend;
begin
put the diskSpace into page field "saved disk space";
pass;
end;
handler resume;
begin
get the diskSpace-page field "saved disk space";
if it 0 then
answer "Your program used" && it && "bytes";
end;
_______________________________________________________________________
Chapter 1: What's Really Happening 96
________________________________________________________________________
COMMON MESSAGE GROUPINGS
Sometimes it is difficult to know what messages are being sent during
common everyday operations. The following section describes some basic
operations and the messages that HyperPAD sends.
These messages are sent when the user starts HyperPAD:
Message: Sent To:
--------------------------------------------------------------
startUp current page
openPad current page
openPage current page
openButton/openField current button or field
These messages are sent when the user runs another program:
Message: Sent To:
--------------------------------------------------------------
closeButton/closeField current button or field
closePage current page
closePad current page
suspend current page
These messages are sent when the user returns from running another
program:
Message: Sent To:
--------------------------------------------------------------
resume current page
openPad current page
openPage current page
openButton/openField default button or field
When the user presses the ESC key, these messages are sent:
Message: Sent To:
--------------------------------------------------------------
keypress 283 current object
cancel current page
_______________________________________________________________________
Chapter 1: What's Really Happening 97
________________________________________________________________________
When the key combination ALT+F5 is pressed, these messages are sent:
Message: Sent To:
--------------------------------------------------------------
keyPress 27648 current object
doMenu "Home" current page
When TAB is pressed to go one button to another button, these messages
are sent:
Message: Sent To:
--------------------------------------------------------------
closeButton current button
openButton new current button
When you press PGDN to go to the next page, these messages are sent:
Message: Sent To:
--------------------------------------------------------------
keyPress 20736 current object
doMenu "Next" current page
closeButton/closeField current object
closePage new current page
openButton/openField new current object
When you click the mouse on a button, these messages are sent:
Message: Sent To:
--------------------------------------------------------------
mouseUp current object
select current object
________________________________________________________________________
Chapter 1: What's Really Happening 63
________________________________________________________________________
CHAPTER EIGHT: NUMERIC OPERATORS
In PADtalk, operators are used to form expressions. There are operators
to manipulate numbers, text, and Boolean values. The following
expression involves all three:
if (5 + i > 56) and (field 1 = "Lawyer") then...
Each operator requires two operands of the same type. For example, (5+6)
is legal, whereas (5 + "this is text") is not legal. However, since
HyperPAD treats all numbers as text, the text operators work on both
text and numbers. For example:
expression: yields:
--------------------------------
5 + 6 11
"this" & "that" thisthat
"this" & 5 this5
56 && 1 56 1
"this" <> "that" true
The comparison operators work with both text and numeric arguments. For
example, 5 > 6 returns false, as does "that" > "this". For text
comparisons, the text operands are compared without regard to case and
the argument lowest alphabetically will have the lower value.
The following section describes all of the PADtalk operators:
( ) (PARENTHESES)
Affect the way operands are grouped in expressions. Expressions enclosed
in parentheses are evaluated first.
- (UNARY MINUS)
Produces the negation of the number to its right.
NOT (LOGICAL NOT)
Returns false if the result following is true, and true if the
expression is false.
^ (EXPONENTIATION)
Returns the number on the left raised to the power of the number on its
right.
________________________________________________________________________
Chapter 1: What's Really Happening 64
________________________________________________________________________
/ (DIVIDE)
Returns the number on the left divided by the number on the right.
* (MULTIPLICATION)
Returns the number on the left multiplied by the number on the right.
MOD (MODULE)
Returns the remainder of the division of the number on the left by the
number on the right. For example:
5 mod 3;
5/3 returns 1 remainder 2, so 5 mod 3 returns 2.
DIV (DIVIDE AND TRUNCATE)
Returns the whole part of the division of the number on the left by the
number on the right. For example:
5 div 3;
5/3 = 1.666667; truncating the decimal portion, 5 div 3 returns 1.
+ (ADDITION)
Returns the number on the left added to the number on the right.
- (SUBTRACT)
Returns the number on the left subtracted from the number on the right.
& (CONCATENATION)
Returns the argument on the right appended to the argument on the left.
For example:
expression: returns:
----------------------------
1 & 4 14
56 & "hello" 56hello
6 & (6=7) 6false
"this" & "that" thisthat
________________________________________________________________________
Chapter 1: What's Really Happening 65
________________________________________________________________________
&& (CONCATENATION WITH SPACE)
Returns the argument on the right appended to the argument on the left,
with a space in between them. For example:
expression: returns:
---------------------------------
1 && 4 1 4
56 && "hello" 56 hello
6 && (6=7) 6 false
"this" && "that" this that
> (GREATER THAN)
Returns true if the expression on the left is greater than the
expression on the right. This operator works with both numeric and text
quantities.
< (LESS THAN)
Returns true if the expression on the left is less than the expression
on the right. This operator works with both numeric and text quantities.
>= (GREATER THAN OR EQUAL TO)
Returns true if the expression on the left is greater than or equal to
the expression on the right.
<= (LESS THAN OR EQUAL TO)
Returns true if the expression on the left is less than or equal to the
expression on the right.
IS IN
Returns true if the argument on the left is found in the argument on the
right. For example:
expression: returns:
--------------------------------------
5 is in 5678 true
"there" is in "hello there" true
"i" is in "hello" false
________________________________________________________________________
Chapter 1: What's Really Happening 66
________________________________________________________________________
IS NOT IN
Returns true if the argument on the left is not found in the argument on
the right. For example:
expression: returns:
----------------------------------------
5 is not in 5678 false
"it" is not in "hello there" true
CONTAINS
Returns true if the argument on the right is found in the argument on
the left. For example:
expression: returns:
------------------------------------------
"hello there" contains "lo" true
67.54 contains 7 true
"what's up" contains 7 false
= (EQUAL)
Returns true if the left and right arguments are the same.
The arguments can be textual, numeric, or Boolean.
<> (NOT EQUAL)
Returns true if the left and right arguments are not the same. The
arguments can be textual, numeric, or Boolean.
IS
Same as =
IS NOT
Same as <>
AND (LOGICAL AND)
Returns true if both the left and right arguments are true.
OR (LOGICAL OR)
Returns true if either the left or right arguments are true.
________________________________________________________________________
Chapter 1: What's Really Happening 67
________________________________________________________________________
OPERATOR PRECEDENCE
Precedence refers to which mathematical operations are performed first
when evaluating expressions. Operators with the highest precedence are
evaluated first.
The following table shows the precedence of the PADtalk operators.
Operators of equal precedence appear on the same line, separated by a
comma. Parentheses alter the order of expression evaluation. Operators
that require two operands (like plus, minus, etc...) are evaluated left
to right. Exponentiation is evaluated right to left.
Order: Operator(s):
------------------------------------------------
1 ()
2 -, not
3 ^
4 /, *, mod, div
5 +, -
6 &, &&
7 >, >=, <, <=, is in, is not in, contains
8 =, <>, is, is not
9 and
10 or
_______________________________________________________________________
Chapter 2: PADtalk Scripts 13
________________________________________________________________________
CHAPTER TWO: PADTALK SCRIPTS
CONSTRUCTING SCRIPTS
In HyperPAD, scripts are written using the Script Editor. In order to
access an object's script, the pad's user level must be set to
scripting. (See the section on user levels in the HyperPAD User's Guide
for additional information.)
To access an object's script:
1. Make sure the pad's user level is set to Scripting.
2. Select the object with the Selector tool.
In order to access a button or field's script, you must use the Selector
tool and select the object.
3. Open the object's Info dialog box from the Objects menu.
Depending on the type of object you are working with, select Pad, Bkgnd,
Page, Button, or Field Info from the Objects menu.
4. Select the <Script...> button from the dialog box.
The Script Editor will be loaded along with the object's script.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 14
________________________________________________________________________
THE SCRIPT EDITOR
The Script Editor is an environment that allows you to edit an object's
script and then compile it. It looks like this:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
EXITING THE SCRIPT EDITOR:
To exit the Script Editor and return to the previous screen, use one of
the following methods:
1. Press ESC. If you have made any modifications, you will be asked if
you want to save them.
2. Select Cancel from the File menu. Any changes you made will be lost.
3. Select Save and Return from the File menu. This saves any changes
and then returns to the pad.
LET'S START SCRIPTING:
Let's create a very simple script linking a newly created button to the
Home pad. (If you are going to do the procedures, you should create a
new pad and a new button.)
To create a new pad:
1. Set the user level to scripting. (See the section on user levels in
the HyperPAD User's Guide.)
_______________________________________________________________________
Chapter 2: PADtalk Scripts 15
________________________________________________________________________
2. Select the New command from the File menu.
3. Type in the name of your pad and press ENTER.
A blank page will be placed on-screen.
To create a new button:
1. Set the user level to scripting.
2. Select the Select tool from the Tools menu.
3. Select the New Button command from the Objects menu.
A new button will appear on-screen.
To go to the button's script:
1. Select Button Info from the Objects menu (or just press ENTER).
2. Select the button (or press ALT+S).
First, access the button's script. When the Script Editor loads, you'll
see that HyperPAD has already written part of the script for you.
Because almost all buttons created in HyperPAD respond to being
selected, each button's script, by default, provides an empty select
handler.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
First, examine the script HyperPAD has provided, line by line:
handler select;
A handler is a portion of an object's script that defines what happens
when a certain message is received. Each handler statement, like the one
_______________________________________________________________________
Chapter 2: PADtalk Scripts 16
________________________________________________________________________
above, names the message the handler responds to (in this case the
select message) and must end with a semi-colon. The name determines
which message triggers the execution of this handler.
For more information on messages see Chapter Ten.
begin
end;
The begin and end statements enclose the list of actions that make up
this handler. When the select message is received by this button, the
action statements listed between the begin and end statements will be
executed.
handler select;
begin
[statements executed when the button is selected]
end;
Each begin statement must have a corresponding end statement in order
for the handler to be valid. A semi-colon must follow the end statement,
signifying the end of the handler.
The blank line that HyperPAD has left is for the author to complete. In
between the begin and end statements, fill in the actions to be taken
when this button is selected. In this case, we want the user to change
to the next page. To complete the handler, add the following line:
go to the next page;
HyperPAD does not distinguish between upper and lower case letters - it
recognizes go to the next page; and Go To The Next Page; as the same
statement.
Every PADtalk statement within a begin...end block must end with a semi-
colon. You can incorporate numerous commands to execute by inserting
them between the begin and end statements. The full handler should
resemble the following:
handler select;
begin
go to the next page;
end;
We have just created a script with one handler that responds to the
select message. If the user selects this button (by pressing ENTER or
with the mouse) the handler will execute, changing to the next page in
the pad.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 17
________________________________________________________________________
Scripts can contain many handlers allowing objects to respond to a
variety of messages. For example, the following script responds to three
messages:
handler select;
begin
go to the next page;
end;
handler mouseUp;
begin
beep;
end;
handler mouseEnter;
begin
hide the menu bar;
end;
WRITING STATEMENTS IN PADTALK
Each PADtalk statement ends with a semi-colon. A begin...end block, like
in the Pascal languages, is really a single compound statement (that's
why there is a semi-colon after the end).
PADtalk is a flexible language. It sometimes provides more than one way
to perform the same action. For example, the following statements access
the next page:
go to the next page;
go to next page;
go next page;
go to page (currentPage() + 1);
In many PADtalk statements, like the go statement shown above, you can
use the word the. The use of this word is optional and has no purpose
except to enhance readability of your scripts. (The exception is with
the alternate syntax of function calls.)
You can add comments to your scripts by enclosing them in curly
brackets. Any text within brackets is ignored by the compiler. The
following example shows a comment enclosed in brackets.
{ this is a comment }
go to the next page;
_______________________________________________________________________
Chapter 2: PADtalk Scripts 18
________________________________________________________________________
Brackets can enclose many lines, shown in the following example:
{ this is a comment that
takes up two lines }
go to the next page;
You can also enclose comments within other comments. The following
example comments out a few statements that have comments:
{
go to the next page; { change pages }
beep; { emit a sound }
answer "Find What?"; { ask user question }
}
You can add a comment to the end of a line by using two consecutive
hyphens (--). The text between the two hyphens and the end of the line
is ignored by the compiler. For example:
-- this is a comment
go to the next page; -- this is a comment too!
PADtalk is a verbose language that understands over 400 different words.
Before exploring it, become comfortable within the Script Editor.
USING THE KEYBOARD
Press this key: To:
------------------------------------------------------------------------
UP and DOWN Move up or down one line in a script
LEFT and RIGHT To move left or right on a line in a script
HOME Go to the beginning of a line
CTRL+HOME Go to the beginning of the script
END Go to the end of the line
CTRL+END Go to the end of the script
CTRL+RIGHT or CTRL+LEFT Move forward or backward one word
BACKSPACE Delete the previous character
DEL Delete the character under the cursor
CTRL+Y or CTRL+D Delete the current line
CTRL+BACKSPACE Delete the previous word
_______________________________________________________________________
Chapter 2: PADtalk Scripts 19
________________________________________________________________________
Press this key: To:
---------------------------------------------------------
SHIFT+ARROWS Select text
ESC or CTRL+Q Exit with a check to save changes
CTRL+C or CTRL+INS Copy selected text
TAB Inserts space up to next tab stop
PGUP or MINUS (keypad) Move up one page
PGDN or PLUS (keypad) Move down one page
CTRL+X or SHIFT+DEL Cut text
CTRL+V or SHIFT+INS Paste text
CTRL+DEL Delete to the end of the line
CTRL+F Find a string
CTRL+R Find and replace text
CTRL+N Find next occurrence of the string
F4 Compile the script, checking for errors
F10 Open the menus
EDITING A SCRIPT
In the Script Editor, you can copy and move blocks of text within a
script or even between scripts.
Before you can using any of the editing features, you have to select the
text you want to perform the operation on.
To select text:
1. Place the cursor on the first character of the selection.
2. Hold down SHIFT and use the arrow keys to extend the selection.
3. When you've highlighted the entire selection, release the keys.
To use the mouse, place the mouse pointer where you want to begin your
selection. Hold down the left mouse button and drag the mouse until
you've highlighted the selection. Then, release the mouse button. Once
the text is selected, you can copy, cut, or delete it.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 20
________________________________________________________________________
To copy text:
1. Select the text.
2. Select the Copy command from the Edit menu (ALT+E, C).
To cut text:
1. Select the text.
2. Select the Cut command from the Edit menu (ALT+E, T).
To paste text:
1. Position the cursor where you want to place the text.
2. Select the Paste command from the Edit menu (ALT+E, P).
The contents of the clipboard will be inserted in the script.
SEARCH AND REPLACE
As you become more comfortable with PADtalk, your scripts will become
longer and more complex. To reduce the amount of time and effort
necessary to locate text, HyperPAD includes Search and Replace commands.
To locate a string in a script:
1. Select the Find command from the Search menu (ALT+S, F).
The Find dialog box will appear on screen.
2. Type in the string you want to locate and press ENTER.
To locate the next instance of a string:
1. First complete the above procedure.
2. Select the Find Next command from the Search menu (ALT+S, N).
To keep looking for that string, continue to select the Find Next
command. CTRL+N is the shortcut for this command.
Sometimes, you may need to replace a string in a script with another.
Use the Replace command to locate the instance and replace it with what
you've specified.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 21
________________________________________________________________________
To search and replace within a script:
1. Select the Replace command from the Search menu.
2. Enter in the search and replace text, then select:
Verify - Allows you to confirm each replacement.
Replace - Replace the text and continue.
Skip - Continue without replacing the text.
Cancel - Stop the procedure.
PRINTING SCRIPTS
To print the scripts in your pads:
1. Select Printer Setup from the File menu and complete the dialog box
so the options conform to your system. If your printer is not listed,
select the Generic Printer, or another that your printer can emulate.
2. Select Page Setup from the File menu and make sure the settings are
correct.
3. Select the Print command from the File menu.
COMPILING SCRIPTS
Before HyperPAD can use your scripts, they must first be compiled.
HyperPAD compiles and saves your script when you exit the Script Editor.
As it compiles, HyperPAD scans the script, checking for syntax errors.
HyperPAD is only able to pass messages to handlers in scripts that have
been successfully compiled without any errors.
You can manually check for errors before exiting the Script Editor by
selecting Compile from the Edit menu (or press F4). If there is an
error, HyperPAD will assist you by positioning the cursor at the
location of the error and displaying an error message.
COMPILING WITH THE DEBUGGING SWITCH
Runtime errors occur when something goes wrong in a script while
browsing your pad. Normally, HyperPAD will take you to the offending
script so that you can correct the problem. With larger scripts that
contain many handlers, it may be difficult to locate the source of a
runtime error.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 22
________________________________________________________________________
To assist you in locating runtime errors, you can turn on the Debug
option on the Edit menu. When you compile the script with the Debug
option on, HyperPAD includes line number information with the compiled
code. Then, following a runtime error, HyperPAD places the cursor
directly on the line in which the error occurred. If you compile with
the Debug option off and a runtime error occurs, HyperPAD simply places
the cursor at the top of the offending script.
THE COMPONENTS OF A SCRIPT
A script consists of handlers, which you were introduced to above, and
functions, which will be introduced in this section.
HANDLERS
As you have learned, a handler is a portion of a script that is invoked
when a specific message is received by the object that contains it. Each
handler names the message it responds to and includes some action(s) to
be taken when that message is received.
Here is a more complex handler. It receives two parameters from the
statement that calls it.
handler calcResult(i,j);
begin
put i * j / 100 into the message box;
end;
Sometimes, you may want a handler to receive a variable number of
parameters. In this case, it is necessary to know how many parameters
were passed to your handler and what each of them are. This is
accomplished using the functions param, paramCount, and params. These
functions return information about the number of parameters that were
passed to your handler, the entire parameter list, and what each
parameter is. The following function sums its parameters and returns the
total to the calling statement.
function addNums;
begin
put 0 into total;
for i = 1 to the paramCount do
add param(i) to total;
return total;
end;
Notice that this example doesn't declare any parameter variables.
Instead, it accesses the parameters using the param function.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 23
________________________________________________________________________
DEFINING YOUR OWN FUNCTIONS
In addition to handlers, scripts can contain your own functions. A
function is a group of statements that returns a single value. Functions
can be called from other handlers in the same script, or from scripts
higher in the message hierarchy.
For example, the following function asks a question in a dialog box
using the answer command, then returns the result to the caller using
the return statement.
function okToContinue;
begin
answer "Is it safe";
return it;
end;
The return statement defines the number or text value that the function
will return to the calling statement. The return statement will not stop
execution of the handler (only exit and pass stop the execution of a
handler). If you specify more than one return statement, the last return
statement executed will determine the returned value of the function.
Calling your own functions is just like calling HyperPAD's built-in
functions. The following statements call the function defined above:
put okToContinue() into res;
if okToContinue() is "Cancel" then beep;
put "You selected" & okToContinue();
The open and close parenthesis are used to distinguish a function call
from a message name. The statement
okToContinue;
is a message name that gets sent to the current script, where as
okToContinue()
calls the user-defined function.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 24
________________________________________________________________________
The following example function counts the number of Bs in a passed
parameter.
function countBs(str);
begin
put 0 into total;
for i = 1 to the length(str) do
if char i of str is "B" then add 1 to total;
return total;
end;
To call this function:
put 5 + countBs("Bobby and Billy when out.");
OTHER DEFINITIONS
The following definitions are intended to introduce you to other PADtalk
components used when writing scripts.
COMMANDS
Commands are statements that tell HyperPAD what to do. Each command ends
with a semi-colon. For example:
go to page 1;
put "wow" into page field 1;
HyperPAD's built-in commands are discussed in Chapter Eleven.
CONSTANTS
A constant is any named value that can't be changed. Unlike a variable,
you can not alter a constant, and unlike a literal, its value is not
always identical to its name. The following tables summarize HyperPAD's
constants and their corresponding values.
_______________________________________________________________________
Chapter 2: PADtalk Scripts 25
________________________________________________________________________
MISCELLANEOUS CONSTANTS
The miscellaneous constants are:
Constant: Description:
----------------------------------------------------
empty Empty String ""
false Boolean value false
true Boolean value true
pi The mathematical constant 3.14159
up Returned by ctrlKey(), altKey(), and shiftKey()
down Returned by ctrlKey(), altKey(), and shiftKey()
CHARACTER CONSTANTS
The character constants are:
Constant: Description:
----------------------------------------------------
formfeed ASCII 12
linefeed ASCII 10
quote ASCII 34(")
return ASCII 13
space ASCII 32(" ")
tab ASCII 9
_______________________________________________________________________
Chapter 2: PADtalk Scripts 26
________________________________________________________________________
PROPERTY CONSTANTS
The property constants are:
Constant: Used with this property:
----------------------------------------------------
centered align
checkBox style
even parity
fat cursor
layer tabbing
left namePosition, align
listBox style
none parity
odd parity
off cursor, printer, mouse
on mouse, printer
opaque style
position tabbing
right align
scrolling style
thin cursor
top nameposition
transparent style
NUMERIC CONSTANTS
The following constants can be used in place of any number to enhance
readability of your scripts. The numeric constants are:
zero three six nine
one four seven ten
two five eight
_______________________________________________________________________
Chapter 2: PADtalk Scripts 27
________________________________________________________________________
LITERALS
A literal is a number or text string enclosed in quotes. The following
are literals:
10
17.39
"hello"
Special codes can be inserted into quoted text strings for characters
that you can't easily type with the keyboard. Each code is started with
the caret (^). The following table shows the supported codes and lists
some examples:
Code: Value:
----------------------------------------------------
^^ ^
^" "
^f formfee (ASCII 12)
^n linefeed (ASCII 10)
^t tab (ASCII 9)
^r carriage return (ASCII 13)
^d<n> ASCII character n (where n is the 3 digit character number)
^x<n> ASCII character n (where n is the hex character number)
Examples:
"The quick brown ^"fox^" jumped over the lazy dog"
"^rThis is a new line"
"square character ^d254 inserted here"
"hex ^xf4 insert here"
_______________________________________________________________________
Chapter 2: PADtalk Scripts 28
________________________________________________________________________
FUNCTIONS
HyperPAD contains many built-in functions, each of which return a single
value. Some functions require you to pass some parameters. The following
are a few of HyperPAD's built-in functions:
min(10,12)
time()
files("*.DOC")
HyperPAD's functions are discussed in Chapter Thirteen.
PROPERTIES
Properties are values that control how objects look and behave. All
objects of the same type have the same properties, but each object has
its own values for these properties. Color, for example, is a property
of buttons. All buttons have the color property and all buttons may be a
different color. The following are properties:
lockText
insertPoint
hilite
Object properties are discussed in Chapter Twelve.
CONTAINERS
A container is a storage place for a value. The following are
containers:
fields
variables
the message box
selectedText
Containers are discussed in Chapter Four.
________________________________________________________________________
Chapter 12: Properties 145
________________________________________________________________________
CHAPTER TWELVE: PROPERTIES
INTRODUCTION
This chapter describes how properties are used in the HyperPAD system.
The first section describes the global properties. The next five
sections describe the properties of pads, buttons, fields, pages and
backgrounds. The final four sections describe the properties of the
message box, tool box, status bar, and menu bar.
WHAT ARE PROPERTIES
A property is a characteristic of an object that defines its appearance
and behavior. Objects of the same type (such as all buttons) have the
same properties. Each button, however, can have different values
associated with these properties. An example of a button property is
fillColor, whose value is a number between 0 and 255.
Objects are created with default values for their properties. You can
alter a property value in one of two ways. Many property values are
accessible using the object's Info dialog box on the Objects menu. The
other way to modify an object's property value is with the PADtalk
language, which gives you access (using the set command) to all object
properties.
________________________________________________________________________
Chapter 12: Properties 146
________________________________________________________________________
PROPERTY LISTINGS
GLOBAL PROPERTIES
The global properties are:
asciiChar lockRecent paintAttr
autoSave lockScreen parity
baud markerAttr printDevice
currentDirectory markerChar printer
cursor maxDirtyPages printerTranslation
cursorLoc modem selectedText
dataBits mouse stopBits
fileSortMethod mouseAttr tabbing
focus mouseChar userLevel
lockMessages numberFormat
PAD PROPERTIES
The pad properties are:
cantDelete cantModify longName
name passwordOnly script
________________________________________________________________________
Chapter 12: Properties 147
________________________________________________________________________
PAGE PROPERTIES
The page properties are:
cantDelete id longID
longName name script
BACKGROUND PROPERTIES
The background properties are:
cantDelete id longID
longName name script
BUTTON PROPERTIES
The button properties are:
acceleratorColor hilite name
acceleratorKey hiliteColor rectangle
align hiliteIfFocus script
autoHilite id shadow
borderColor layer showName
check location style
color lockText visible
________________________________________________________________________
Chapter 12: Properties 148
________________________________________________________________________
FIELD PROPERTIES
The field properties are:
acceleratorColor hiliteIfFocus nameColor
acceleratorKey id namePosition
align insertPoint rectangle
autoHilite layer script
borderColor listbox scrollable
color location showName
currentLine lockText startLine
edgeType longID style
fillColor longName value
hilite markedLines visible
hiliteColor name withEdge
MESSAGE BOX PROPERTIES
The message box properties are:
location value visible
width
TOOL BOX PROPERTIES
The tool box properties are:
location visible
MENU BAR PROPERTIES
There is one menu bar property:
visible
STATUS BAR PROPERTIES
There is one status bar property:
visible
________________________________________________________________________
Chapter 12: Properties 149
________________________________________________________________________
GLOBAL PROPERTIES
-----------------------------------
ASCIICHAR
Purpose: This property allows the user to set and get the value of the
ASCII paint character. The range of available values is from 0 to 255.
You can also set or get this property by selecting ASCII char from the
Workspace menu.
Examples:
set the asciiChar to charToNum("A");
set the asciiChar to 65;
if the asciiChar is charToNum(the first char of it) then
answer "they are the same";
The following handler demonstrates a use of asciiChar:
handler select;
begin
doMenu "Text";
doMenu "ASCII char...";
answer "you picked" && the asciiChar with "Ok";
end;
See Also: paintAttr
-----------------------------------
AUTOSAVE
Purpose: By default, HyperPAD automatically saves your work every 30
seconds. With autoSave, you can regulate (turn on or off) this feature.
HyperPAD stores pages in a memory cache for quick access. If you modify
a page in some way (i.e. type into a field or change the color of an
object), the page is considered "dirty". The cache can't hold more than
50 pages. If the cache fills up, the pages accessed least are removed
from the cache.
The maximum number of dirty (modified) pages allowed in the cache is
determined by the maxDirtyPages property, which is 20 by default. When
the number of dirty pages exceeds this number, they are saved to disk.
The dirty pages will also be saved to disk if HyperPAD runs low on
memory.
________________________________________________________________________
Chapter 12: Properties 150
________________________________________________________________________
If autoSave is true, then every 30 seconds HyperPAD saves as many dirty
pages as it can in 1 second. The disk access occurs at idle time (at the
end of all pending handlers). If autoSave is false, then the cache is
emptied when one of two conditions is met: when the number of dirty
pages exceeds maxDirtyPages, or when memory is low enough to require the
space that the dirty pages are taking up.
When to use it: Setting maxDirtyPages to 1 and autoSave to false is the
safest environment for running HyperPAD. However, it accesses the disk
constantly and is therefore slower.
Examples:
set the autoSave to true;
set the autoSave to false;
set the maxDirtyPages to 2;
To set the autoSave to false every time you start HyperPAD, put the
following handler in the pad script of your Home pad:
handler startup;
begin
set the autoSave to false;
end;
Comments: The autoSave property is true by default.
When autoSave is true:
1. You stand to lose less information if there's a power failure.
2. Disk access is kept to a periodic short burst.
3. Disk space is monitored closely, and you are notified when disk
space is low.
When autoSave is false:
1. Disk access is less frequent, but takes more time when it does
occur.
2. Thrashing (continual disk accessing) can occur, depending on your
application. For example, if there are 50 pages in the cache that need
to be saved to disk, every time you switch to a new page, a page from
the cache has to be saved, causing the disk to be accessed.
3. Since disk space is determined after each write, you may have
information that needs to be saved to disk when there is insufficient
disk space.
See Also: maxDirtyPages
________________________________________________________________________
Chapter 12: Properties 151
________________________________________________________________________
-----------------------------------
BAUD
Purpose: Sets the baud rate for use with the dial command. You can set
the baud property to any baud supported by your modem (300, 1200, 2400,
9600). The dial command will not work if you set baud to an unusable
value. The default baud rate is 300.
Examples:
set the baud to 300;
set the baud to item i of "300,1200,2400,9600";
See Also: modem, stopBits, parity, and dataBits
-----------------------------------
CURRENTDIRECTORY
Purpose: This property gets or sets the current DOS directory. You can
set the directory to partial directory names as well. For example, if
you want to set the directory to the parent:
set the currentDirectory to "..";
If you include a drive specifier, HyperPAD will also change the current
drive. The following example changes to the S: drive and the directory
called ACCOUNTS\JOHN:
set the currentDirectory to "S:\ACCOUNTS\JOHN";
Examples:
put the currentDirectory into the msg;
set the currentDirectory to "D:";
set the currentDirectory to "C:\123";
The following example runs MS-WORD from within a document directory and
loads a document named MYDOC.DOC from the document directory.
set the currentDirectory to "C:\DOCUMENT\PROJECT";
run "C:\WORD5\WORD MYDOC";
Abbreviations: curDir
See Also: directory
________________________________________________________________________
Chapter 12: Properties 152
________________________________________________________________________
-----------------------------------
CURSOR
Purpose: Sets the hardware text cursor (the blinking cursor) shape to an
underscore (thin), a full character block (fat), or invisible (off).
When to use it: If you want to make the cursor change shape to indicate
the cursor's entry into different portions of your application (such as
entering buttons and fields).
If you set the cursor shape to off (not visible) the cursor will be
invisible until you change the shape to either thin or fat.
Examples:
set the cursor to thin;
if the cursor is off then
put "no one has the focus" into msg;
See Also: cursorLoc, cursorX, cursorY
-----------------------------------
CURSORLOC
Purpose: The cursorLoc property allows you to set or get the location of
the hardware text cursor (the blinking cursor). The position is returned
in the form "X,Y" where X is the horizontal position and Y is the
vertical position with respect to the upper left corner of the screen.
The range of values for the cursor location are:
1 <= X <= screenWidth() (usually 80)
1 <= Y <= screenHeight() (usually 25)
Examples:
put the cursorLoc into cl; -- puts X,Y into "cl"
set the cursorLoc to 10,12 -- set it somewhere
if the screenHeight is 43 then
set the cursorLoc to 1,43
See Also: cursor, cursorX, cursorY
________________________________________________________________________
Chapter 12: Properties 153
________________________________________________________________________
-----------------------------------
DATABITS
Purpose: Sets or gets the serial port property dataBits to
either 7 or 8 for use with the dial command. The default value is 7.
Examples:
set the dataBits to 7;
set the dataBits to 8;
See Also: baud, stopBits, parity, modem
-----------------------------------
FILESORTMETHOD
Purpose: The fileSortMethod property determines how a list
of files is sorted when it is read from disk. It can have the following
values:
Method Value: Sorted by:
---------------------------------------------
1 Name (ascending)
2 Extension (ascending)
3 Size (ascending)
4 Date/Time (ascending)
5 Name (descending)
6 Extension (descending)
7 Size (descending)
8 Date/Time (descending)
The fileSortMethod property only affects the values of future calls to
the files() and longFiles() functions.
Examples:
The following statements read in a directory list sorted by descending
size:
set the fileSortMethod to 7;
put the longFiles into page field "List";
________________________________________________________________________
Chapter 12: Properties 154
________________________________________________________________________
-----------------------------------
FOCUS
Purpose: Use focus to change the focus to a particular button or field
on the page or background. When a button or field has the focus, it is
the current object and can be selected (button) or edited (field).
You cannot set the focus to locked buttons or fields, or objects that
are completely covered by other objects.
When to use it: Use focus to highlight the button or field the user will
most likely want to select.
Examples:
set the focus to page field 1;
set the focus to button "initialize";
The following handler (in a page script) sets the focus to the first
empty field on a page:
handler openPage;
begin
put 1 into i;
while page field i is not empty AND
i < the number of page fields do
add 1 to i;
set the focus to page field i;
end;
Comments: Changing the focus sends a closeButton/closeField message to
the current object and an openButton/openField message to the object
receiving the focus.
-----------------------------------
LOCKMESSAGES
Purpose: Use lockMessages to prevent HyperPAD from sending automatic
messages such as openPage, openButton, and openPad. The possible values
for lockMessages are true and false.
When to use it: You may want to set lockMessages to true for the
following reasons:
1. To speed up execution of a script that cycles through many pages.
Since fewer messages are being sent automatically by HyperPAD, the
script will execute faster.
________________________________________________________________________
Chapter 12: Properties 155
________________________________________________________________________
2. When you want to go to another page (i.e. to gather some data) and
don't want to stay there, you can set lockMessages to true to avoid
sending the automatic messages (like openPage) to that page.
Examples:
set the lockMessages to true;
The following example script retrieves some data from a pad called
"PIF.PAD". It sets the lockMessages property to true to avoid sending
automatic messages to that pad.
set the lockMessages to true;
push this page; -- remember where we are
go to pad "Phone";
get field "First Name";
pop page; -- go back there
Comments: The default value of lockMessages is false. It is reset to
false when the next idle message is sent (at the end of all pending
handlers).
Another reason to set the lockMessages property to true is to avoid
subtle recursion. Recursion occurs when a script either directly or
indirectly executes itself. The following example demonstrates a
recursion problem:
handler closeField;
begin
go to the next page;
end;
The above closeField hander goes to another page. However, changing to
another page sends closeField to the current field, thus executing the
same script again (recursion). The following script corrects this:
handler closeField;
begin
set lockMessages to true;
go to the next page;
end;
In this case, setting lockMessages to true prevents the second
closeField message (which is an automatic message) from being sent. (The
closePage and openPage messages that are normally sent when the page is
changed are not sent either.)
See Also: lockRecent, lockScreen
________________________________________________________________________
Chapter 12: Properties 156
________________________________________________________________________
-----------------------------------
LOCKRECENT
Purpose: Setting lockRecent to true prevents HyperPAD from adding pages
to the recent list. By default this property is false.
When HyperPAD moves from page to page (including moving between pads),
the order the pages are viewed is remembered in the recent list (the
list of most recently accessed pages). When you press F5 (or select Back
from the Go menu), HyperPAD accesses this list to take you back through
the pages you've just viewed.
When to use it: If you need to go to another page temporarily and don't
want the user to cycle back to this page when pressing F5.
Comments: The lockRecent property is reset to false when the next idle
message is sent (at the end of all pending handlers).
Examples:
set the lockRecent to true;
The following example goes to the Home pad and retrieves the user's name
from the Preferences page, but doesn't allow the user to return there
when F5 is pressed.
set the lockRecent to true;
push this page;
go home;
get page field "User Name" of page "Preferences";
pop page;
-----------------------------------
LOCKSCREEN
Purpose: Use lockScreen to freeze the screen, preventing HyperPAD from
changing what is currently displayed. This is useful if you want to
change to another page without seeing it.
The value of lockScreen is either true or false, and is reset to false
(the default) when the next idle message is sent (at the end of all
pending handlers). If the value is true, the screen will be updated.
When to use it: If you need to gather field contents from another pad,
but don't want the user to actually view that pad, set the lockScreen to
true.
________________________________________________________________________
Chapter 12: Properties 157
________________________________________________________________________
Examples:
set the lockScreen to true;
get the lockScreen;
if it is true then beep;
The following statements use lockScreen to hide the retrieval of the
user name from the Preferences page of the Home pad:
set the lockScreen to true;
push this page;
go home;
get field "User Name" of page "Preferences";
pop page;
set the lockScreen to false;
answer "Hello there" && it;
Comments: Setting lockScreen to true increments an internal counter by
1, setting it to false decrements this counter by 1. When lockScreen is
0, it is false. This is useful if you have a handler that is called from
different places, sometimes when the screen is locked, and other times
when it is not. As long as you set the lockScreen back to false, the
value will be preserved, as in the following example:
set the lockScreen to true;
:
:
set the lockScreen to false;
Note: The dialog boxes associated with the answer, ask, and fileOpen
commands will be displayed regardless of the value of lockScreen.
See also: lockMessages, lockRecent
-----------------------------------
MARKERATTR
Purpose: Use markerAttr to determine the color of the marker character
in all list box fields.
By default, marked lines in list boxes are indicated by a right triangle
character (ASCII 16) to the left of the line. Setting the markerAttr
changes the color of these characters. You can select from a range of
colors between 0 and 25.
If the markerAttr is set to 0 (the default), then the marker characters
are the same as the fillColor of the field they are in.
If the markerChar is 0, then the markerAttr is used as the color of the
entire line.
________________________________________________________________________
Chapter 12: Properties 158
________________________________________________________________________
Examples:
set the markerAttr to yellow on red;
set the marketAttr to 45;
The following example makes the marked lines of a field reverse video by
disabling the character that normally appears to the left of marked
lines, and setting the color:
set the markerChar to 0;
set the markerAttr to black on grey;
The next example sets the markings back to the default:
set the markerChar to 16; -- triangle
set the markerAttr to 0; -- use fillColor
See Also: markerChar
-----------------------------------
MARKERCHAR
Purpose: Use the markerChar to set and get the value of the character
that is used to show marked lines within a list box field.
When the user selects a line in a list box field, the markerChar appears
to the left of the line in order to show that it is marked. You can
change or remove the use of this character by modifying the markerChar.
The default character is 16, a right arrow (ASCII 16).
To change the markerChar, you must supply the ASCII code of the
character you want. For example, if you wanted the lines to be marked
with the letter A, you would type:
set the markerChar to charToNum("A");
When to use it: If you don't want a marker to be used, or you want to
specify a different character.
Examples:
This example sets the marker characters to a yellow diamond:
set the markerChar to 4; -- diamond
set the markerAttr to yellow;
Comments: Changing the markerChar affects the display of all list box
fields until you change the value or exit HyperPAD.
See Also: markerAttr
________________________________________________________________________
Chapter 12: Properties 159
________________________________________________________________________
-----------------------------------
MAXDIRTYPAGES
Purpose: HyperPAD stores pages in an area of memory called the cache.
When pages are modified in any way, they are considered "dirty". The
maximum number of modified pages in the cache is determined by this
property. The default is 20. The range of values is between 1 and 50.
When the number of modified pages exceeds the value of maxDirtyPages,
the dirty pages are written to the pad file.
When to use it: Setting maxDirtyPages to 1 causes HyperPAD to save each
page as it is changed. This is the safest way to run HyperPAD, but also
the slowest.
Examples:
set the maxDirtyPages to 1;
See Also: autoSave
-----------------------------------
MODEM
Purpose: The modem property establishes the serial port that the dial
command will use to communicate with your modem.
The modem property can be set to either "COM1" or "COM2". If you set the
modem property to the wrong port, the dial command will give you an
error.
Examples:
set the modem to "com1";
dial "555-1212";
The following example sets modem to the user's choice of a serial port:
answer "Where is your modem connected?" with
"COM1","COM2";
if it is not empty then set the modem to it;
The next example sets up each of the parameters to use with dial:
set the modem to "com1"; -- default
set the baud to 300; -- default
set the stopBits to 1; -- default
set the dataBits to 7; -- default
set the parity to "even"; -- default
dial "555-1212";
Comments: The default value is "COM1".
See Also: baud, stopBits, parity, dataBits
________________________________________________________________________
Chapter 12: Properties 160
________________________________________________________________________
-----------------------------------
MOUSE
Purpose: The mouse property determines whether HyperPAD recognizes the
presence of a mouse. By default, the mouse is recognized (and on) a
mouse is connected to the system and the mouse driver is loaded.
Setting this property to off causes HyperPAD to ignore the mouse, even
if a mouse is present and operational. If you set the mouse property to
off, you must reset it to on
in order to use the mouse.
If you attempt to set the mouse property to on and there isn't a mouse
or the mouse software is not loaded, then the mouse property will remain
off (HyperPAD will not return an error).
The possible values are on or off.
When to use it: If you want to force the user to use the keyboard in
your pad, set the mouse to off.
Examples:
set the mouse to off; -- turn mouse off, if present
set the mouse to on;
The next example determines if a mouse is present and available:
set the mouse to on;
if the mouse is not on then
answer "You have no mouse";
See also: mouseAttr, mouseChar, mouseLoc, mouseClick
-----------------------------------
MOUSEATTR
Purpose: The mouseAttr property controls the attribute component of the
mouse pointer.
The mouse pointer in HyperPAD has two components, the mouseChar and the
mouseAttr, that determine its appearance. When HyperPAD draws the mouse
pointer, it performs the following steps:
1. If the mouseChar is not 0, then the character component of the mouse
pointer is set to the mouseChar.
2. If the mouseAttr is not 0, then the attribute component of the mouse
pointer is set to the mouseAttr.
________________________________________________________________________
Chapter 12: Properties 161
________________________________________________________________________
Examples:
set the mouseAttr = black on grey; -- default
set the mouseAttr to 76;
set the mouseAttr to the color of page button 1;
The following example adjusts both the attribute and the character
portion of the mouse pointer:
if the graphicsCard is "Monochrome" then
begin
set the mouseAttr to 112;
set the mouseChar to 4;
end
else
begin
set the mouseAttr to 32;
set the mouseChar to chartonum("A");
end;
The following makes the mouse invisible:
set the mouseChar to 0;
set the mouseAttr to 0;
Comments: The default mouseAttr is 112, which means that the mouse
pointer is a reverse video block. The range of values is from 0 to 25.
When displaying the attribute, HyperPAD examines the attribute that is
already there at the location of the mouse pointer on the screen. If the
background color is the same as the background color of the mouseAttr,
then the foreground and background colors of the mouseAttr are swapped
before the mouse pointer is displayed.
See Also: mouse, mouseChar, mouseLoc
________________________________________________________________________
Chapter 12: Properties 162
________________________________________________________________________
-----------------------------------
MOUSECHAR
Purpose: With mouseChar, you can set the character component of the
mouse pointer. The default mouseChar is 0, which means that the mouse
pointer is represented only by an attribute (a rectangular block of
color).
To set the mouseChar, you need the ASCII value of the character you want
to represent the mouse pointer. If you don't know the ASCII value, you
can check it in the ASCII Char dialog box, or use charToNum() in your
script.
When to use it: Modify the mouseChar to create a visual cue that the
mouse is on top of something. For example, you might change the pointer
into a question mark whenever it enters your Help button.
Examples:
set the mouseChar to 4; -- set mouse pointer to diamond
-- set the mouse Char to the letter A
set the mouseChar to chartonum("A");
The following handlers (when placed in a page script) set the mouseChar
to a diamond whenever the mouse pointer is inside a button or field.
This gives the user a visual indication that the mouse can be pressed to
initiate an action.
handler mouseEnter;
begin
set the mouseChar to 4; -- diamond
end;
handler mouseLeave;
begin
set the mouseChar to 0; -- default is off
end;
-----------------------------------
NUMBERFORMAT
Purpose: The numberFormat property determines the precision in which
mathematical calculations are displayed. Internally, HyperPAD keeps
track of 19 digits of precision; however, when you put a number into the
message box or a field, it is displayed using the current numberFormat.
The numberFormat is made up of zeros, pound signs, and a decimal point.
A zero to the left or right of the decimal point instructs HyperPAD to
place a digit or, if there is no digit, a 0 in that position. A pound
sign (#) to the right of the decimal point instructs HyperPAD to place a
digit at that position only if the internal number has a digit there.
________________________________________________________________________
Chapter 12: Properties 163
________________________________________________________________________
The value of numberFormat has the following format:
<zeros>.<zeros><pound signs>
The following are legal number formats:
"0000.000000"
"0.000######"
"00.#"
"0.#########"
The following are not legal:
Number format: Not legal because:
-----------------------------------------------------------------------
##00.00 ##s to the left of the decimal place have no meaning
00.##00 ##s cannot be followed by zeros
The following table shows some sample numbers and how they would appear
using some sample number formats:
Number: Number Format: Looks Like:
--------------------------------------------------------------------
n3 0.##### 3
3.12 0.##### 3.12
3.66666666666667 0.##### 3.66667
3 00.00 03.00
3.1245 00.00 03.12
345.678 0.00## 345.68
3 0.00## 3.00
3.123456789 0.00## 3.1235
345.678 0.00## 345.678
Examples:
set the numberFormat to "0.00"; -- money format
set the numberFormat to "0.00###";
The next example increases the current precision by 2 digits:
get the numberFormat;
set the numberFormat to it & "##";
________________________________________________________________________
Chapter 12: Properties 164
________________________________________________________________________
The final example changes all background fields to use a new number
format:
ask "New Number Format" with the numberFormat;
set the numberFormat to it;
for i=1 to the number of fields do
put (field i)*1 into field i;
Comments: The default numberFormat is "0.######". HyperPAD resets when
the next idle message is sent (at the end of all pending handlers).
The numberFormat property will not affect the presentation of a number
that is already displayed unless you first perform an arithmetic
operation on it. If you don't want the value changed, simply multiply it
by 1:
set the numberFormat to "0.00";
multiply field 1 by 1;
-----------------------------------
PAINTATTR
Purpose: The paintAttr property is used to get or set the current value
of the Paint Attribute. The valid range of values is from 0 to 255.
You can also set this property using the Paint Attr command on the
Workspace menu.
Examples:
set the paintAttr to 31;
set the paintAttr to red on yellow;
if the paintAttr is 78 then
answer "you have changed the attribute";
set the mouseAttr to the paintAttr;
The following handler forces the user to change the current paint
attribute:
handler select;
begin
put the paintAttr into saved;
repeat
doMenu "paint"; -- paint tool
doMenu "Paint Attr..."; -- get the box
until the paintAttr is not saved;
end;
See Also: asciiChar
________________________________________________________________________
Chapter 12: Properties 165
________________________________________________________________________
-----------------------------------
PARITY
Purpose: This property sets the parity to either even, odd, or none for
use with the dial command. The default is even.
Examples:
See the section on the MODEM property.
See Also: baud, stopBits, modem, dataBits, parity
-----------------------------------
PRINTDEVICE
Purpose: This property allows you to establish where HyperPAD will send
printed output. You can specify either "LPT1", "LPT2", "COM1", "COM2" or
any valid DOS filename. You can also set the print device manually
through the Print Setup dialog box by changing the Print To setting.
Examples:
set the printDevice to "LPT1";
if the printDevice is "LPT2" then
answer "You don't have an LPT2 printer port";
set the printDevice to "C:\HPAD\OUTPUT\STUFF.LST";
The following example prints two fields, "first name" and "last name",
from every page of a pad to a file called "OUTPUT.LST". The previous
value of printDevice is saved and restored.
put the printDevice into savedPrintDevice;
set the printDevice to "OUTPUT.LST";
set the printer to on;
for i = 1 to the number of pages do
print field "First Name" && field "Last Name";
set the printer to off;
set the printDevice to savedPrintDevice;
Comments: LPT1 is the default printDevice.
HyperPAD uses MS-DOS to perform its printing. Thus, any name that you
specify must be a valid DOS filename.
Once you set printDevice, it will remain unchanged until you change it
again. The value is saved in your HPAD.INI file.
Abbreviations: printDev
See Also: print, printer, printerTranslation
________________________________________________________________________
Chapter 12: Properties 166
________________________________________________________________________
-----------------------------------
PRINTER
Purpose: You can use this property to turn the printer on and off. When
printer is on, you can use the print command to send text out to the
printer; if it's off, using the print command will cause a
runtime error.
Examples:
set the printer to on;
set the printer to off;
The following example prints out all the background button scripts from
the current pad:
set the printer to on; -- start the print job
for i=1 to the number of pages do
begin
go to page i;
for j = 1 to the number of bkgnd btns do
print the script of bkgnd btn j;
end;
set the printer to off; -- finished printing
Comments: The printer property is automatically set to off when you exit
HyperPAD, run a program using Run Program on the File menu or use the
run command (from a script).
See Also: print, printDevice, printerTranslation
-----------------------------------
PRINTERTRANSLATION
Purpose: Setting this property modifies how HyperPAD translates
characters that you send to your printer using the print command.
When printerTranslation is true (the default), HyperPAD performs the
following translations:
Character: carriage-return
ASCII Value: 13
Translates To: 13,10
Notes: Changes the internal print position to the next line
Character : formfeed
ASCII Value: 12
Translates To: 12
Notes: Resets the internal print position to 1,1
________________________________________________________________________
Chapter 12: Properties 167
________________________________________________________________________
When printerTranslation is false, no translation is performed. This
enables you to send special escape sequences to your printer to control
various printer options.
Examples:
set the printerTranslation to false;
The following example sends an escape sequence to an IBM Proprinter to
print in NLQ mode (near letter quality):
set the printerTranslation to false;
print numToChar(27) & H;
Comments: HyperPAD resets printerTranslation to
true (the default) when the next idle message is sent (at the end of all
pending handlers).
-----------------------------------
SELECTEDTEXT
Purpose: Use selectedText to determine what text is currently
highlighted in a field or the message box.
When the user highlights text in a field (using SHIFT+Arrow keys or by
dragging the mouse), HyperPAD copies the highlighted text to the
selectedText. The text will remain in the selectedText until you
highlight something else, exit HyperPAD, or run another program.
Setting the selectedText does not highlight the text on the screen. This
is accomplished using the hilite command.
Example:
put the selectedText into the message box;
set the selectedText to empty;
The following handler finds the selectedText:
handler select;
begin
if the selectedText is not empty then
find the selectedText;
end;
See Also: hilite
________________________________________________________________________
Chapter 12: Properties 168
________________________________________________________________________
-----------------------------------
STOPBITS
Purpose: Sets the stopBits for use with the dial command. The possible
values are 1 or 2. This value is used to initialize the serial port
before using the dial command.
Examples:
set the stopBits to 2;
set the stopBits to 1;
See Also: modem, baud, parity, dataBits,dial
-----------------------------------
TABBING
Purpose: Use the tabbing property to control the behavior of the TAB key
when moving from object to object on the page.
When you press the TAB key, the focus is taken away from the current
button or field and given to the next button or field. The next object
that receives the focus is determined by the tabbing property, which can
be set to either position or layer.
If tabbing is set to layer, then the next object to receive the focus
depends on the order which the objects sit on the page. Each button and
field is on its own transparent layer, these layers are stacked on top
of one another. Pressing TAB moves the focus to the object in the next
layer higher (i.e. from page button 1 to page button 2).
If tabbing is set to position (the default), then the next object is
determined by the object's position relative to the current one on the
page. HyperPAD looks for objects to the right and then down on the page.
If there aren't any, then the object closest to the upper left corner of
the screen receives the focus.
When to use it: Use this property to make the movement between the
buttons and fields in your pads as logical as possible.
Examples:
set the tabbing to position;
handler openPage;
begin
set the tabbing to layer;
end;
________________________________________________________________________
Chapter 12: Properties 169
________________________________________________________________________
-----------------------------------
USERLEVEL
Purpose: Use the userLevel property to limit access to your pad. You can
modify this property with the Protect command on the File menu.
Within HyperPAD, the commands you can access from the menus are
determined by the userLevel. You can set the user level to one of five
values. The higher the value, the more power HyperPAD gives the user.
The numbers 1 through 5 correspond to the userLevel in the following
way:
Number: User Level:
--------------------------------------
1 Browsing
2 Typing
3 Painting
4 Authoring
5 Scripting
As you change userLevel, the menus change to reflect the new
capabilities HyperPAD gives you (or takes away!).
The userLevel property can be set by the pad's user using the Protect
dialog box on the File menu. The userLevel is saved with the pad, so
that the next time you use the pad, it has the same user level.
If you attempt to change the userLevel of a pad that currently has a
password, then you will be asked for the password. The userLevel will
remain unchanged if you give the wrong password or select <Cancel> from
the Password dialog box.
When to use it: If you want to limit the pad user's ability to alter the
pad, or if you want to allow some changes but not others, you'll need to
change the userLevel.
Examples:
set the userLevel to 5;
set the userLevel to 1;
________________________________________________________________________
Chapter 12: Properties 170
________________________________________________________________________
The following handler sets the userLevel on entry to a pad. It sets a
higher level if the user knows a certain password:
handler openPad;
begin
ask "What is the password?";
if it is "FANCY" then set the userLevel to 5
else set the userLevel to 2;
end;
See Also: passwordOnly
________________________________________________________________________
Chapter 12: Properties 171
________________________________________________________________________
PAD PROPERTIES
The following section describes the properties of a pad. You can change
a pad property using the set command, as in the following example:
set the cantDelete of pad to true;
-----------------------------------
CANTDELETE
Purpose: Setting this property to true prevents a pad from being
deleted. When cantDelete is false, the pad can be deleted using Delete
Pad command on the File menu.
Changing this value changes the value of the Can't delete option in the
Protect dialog box.
When to use it: Set cantDelete to true when you want to protect your
pads from being accidentally deleted from within HyperPAD.
Examples:
set the cantDelete of pad to false;
if the userLevel <= 2 then
set the cantDelete of pad to true;
Comments: This property does not prevent you from deleting the pad using
the DOS Delete command (it doesn't modify the DOS file attributes).
See Also: cantModify
-----------------------------------
CANTMODIFY
Purpose: The cantModify property allows you to determine whether the
pad's user can make modifications to a pad.
When the value of cantModify is false, you can change the information in
a pad within the constraints of the current user level.
When cantModify is true, the pad cannot be changed. Thus, you are
prevented from typing into fields, painting, modifying an object's
position and properties, and modifying an object's script. Pads of this
type (with cantModify set to true) are read-only and cannot be
physically modified by HyperPAD. Furthermore, more than one user on a
network can browse read-only pads at the same time.
Changing the value of this property changes the value of the Read only
option in the Protect dialog box.
________________________________________________________________________
Chapter 12: Properties 172
________________________________________________________________________
When to use it: If you want to allow a pad to be shared on a network, or
if you want to further restrict the pad user from modifying it.
Examples:
set the cantModify of pad to true;
The following handler in a pad script changes the userLevel to scripting
if there are no other users accessing the pad on a network; otherwise,
the pad is opened in read-only mode:
hander openPad;
begin
if the cantModify of pad is true then
being
set the cantModify of pad to false;
if the cantModify of pad is false then
set the userLevel to 5;
end;
end;
Comments: Scripts can still modify the contents of fields and the
properties of buttons. However, these changes will not be saved to disk.
See Also: cantDelete, passwordOnly
-----------------------------------
LONGNAME
Purpose: Use this property to determine the full DOS pathname of the
current pad, including a drive letter, like the following example:
C:\HPAD\HOME.PAD
Note: You cannot modify the longName of a pad; in order to change the
path of a pad you must copy it through DOS or the DOS pad.
Examples:
put the longName of pad into pname;
get the longName of pad;
if the first character of it is in "AB" then
answer "You are on a removable disk.";
See Also: name
________________________________________________________________________
Chapter 12: Properties 173
________________________________________________________________________
-----------------------------------
NAME
Purpose: Use the name property to get or set the name of a pad. The
value of name will be the DOS name of the pad without the extension. If
you set the name of a pad, you will change the actual DOS name.
Examples:
if the name of pad is "HOME" then
answer "You are home now!";
The following example changes the name to one that the user specifies:
ask "New name for pad:" with the name of pad;
if it is empty then exit;
if "." is not in it then put ".PAD" after it;
set the name of pad to it;
if the name of the pad is not it then
answer "Unable to change the name" with "Ok";
See Also: longName
-----------------------------------
PASSWORDONLY
Purpose: This property determines whether a pad is accessible by
password only.
You can require that the user enter the correct password in order to
access the pad for the first time in a HyperPAD session. Setting this
property modifies the By Password Only option in the Protect dialog box.
If you attempt to set passwordOnly to true and no password has been
chosen, you will be prompted to enter one. If you cancel the Password
dialog box, the property will not be changed.
When passwordOnly is true, you must type in the password when you open
the pad for the first time (you only have to give the password once per
HyperPAD session). If you change the user level after accessing the pad,
you must enter the password again.
When to use it: When you want to protect your pad from being browsed by
other users.
Examples:
set the passwordOnly of pad to true;
set the passwordOnly of pad to (the userLevel >= 4);
See Also: cantModify, cantDelete, userLevel
________________________________________________________________________
Chapter 12: Properties 174
________________________________________________________________________
-----------------------------------
SCRIPT
Purpose: Use the script property to get or replace the current script of
the pad. The value of script is a text string composed of lines
separated by carriage returns.
Setting this property replaces the current pad script with a new one.
The new script must be compiled and checked for errors. Any handlers
within the new script that contain errors will not be compiled.
Getting the script allows you to view it or paste it into another
script.
When to use it: When you want to alter a script without using the Script
Editor.
Examples:
put the script of pad into stext;
set the script of pad to stext;
set the script of pad to empty;
The next example creates an openPad handler by appending text together
(using the & operator) and attaching the new openPad handler to the end
of the pad script. The new handler beeps when the pad is opened.
set the script of pad to the script of the pad &
return & return &
"handler openPad;" & return &
"begin" & return &
" beep;" & return &
"end;" & return;
The next example changes the script of page button 2 to a new script
that causes the button to go to page 4 when selected.
handler select;
begin
set the script of page button 2 to
"handler select;" & return &
"begin" & return &
" go to page 4;" & return &
"end;";
end;
See Also: edit script
________________________________________________________________________
Chapter 12: Properties 175
________________________________________________________________________
FIELD PROPERTIES
-----------------------------------
ACCELERATORCOLOR
Purpose: The acceleratorColor property determines the color of a given
accelerator key when the ALT key is pressed. Any field in your pad can
be assigned an accelerator key, which allows you to set the focus to
that field quickly. An acceleratorKey must be set for a field and the
showName property must be true for acceleratorColor to have an effect.
You cannot set the accelerator key or color of a field using the Field
Info dialog box like you can with buttons. The only way to do this is
through the message box or a script.
The range of values is from 0 to 25. The default is 7.
Examples:
set the acceleratorColor of page field 3 to red on blue;
Abbreviations: accelColor
See Also: acceleratorKey, showName
-----------------------------------
ACCELERATORKEY
Purpose: The acceleratorKey property defines the character within the
field's name that the user can press to quickly go to that field. The
acceleratorKey is highlighted when the user holds down ALT. For example,
if a field's acceleratorKey is "A", the key combination ALT+A will set
the focus to that field.
If the acceleratorKey can't be found within the field's name, then it
will not be highlighted when ALT is pressed. However, the field can
still be accessed with the ALT key combination.
Accelerator keys can be any letter or number (A..Z, 0..9).
Example:
set the accelKey of field "First Name" to "E";
Comments: Make sure you select a unique key code for the accelerator
key. If it isn't, then the field or button lowest in the hierarchy will
get the focus first. Further, be careful not to create accelerator keys
that conflict with the menu accelerators.
Abbreviations: accelKey
See Also: acceleratorColor, showName
________________________________________________________________________
Chapter 12: Properties 176
________________________________________________________________________
-----------------------------------
ALIGN
Purpose: Use the align property to set or get the text
justification of a field. By default, text in fields is left aligned.
You can set align to left, right, or centered.
Examples:
set the align of page field 1 to right;
The next example randomly aligns text in all the fields of a page:
put "left,right,centered" into settings;
for i = 1 to the number of page fields do
begin
set the align of page field i to
item (random(3)) of settings;
end;
-----------------------------------
AUTOHILITE
Purpose: Use this property to determine whether a field is highlighted
when it receives the focus. The value can be true or false.
Example:
set the autoHilite of field "Address" to true;
-----------------------------------
BORDERCOLOR
Purpose: The borderColor property sets or gets the color of a field's
border. The borderColor property will have no effect if withEdge is
false or the style is transparent.
The range of colors is from 0 to 255; the default is 7 (grey on black).
This property can also be modified through the Field Info property box.
Examples:
set the borderColor of page field 1 to 7; -- the default
if the style of field "Notes" is not transparent then
set the borderColor of field 1 to yellow on red;
See Also: color, fillColor, nameColor, hiliteColor
________________________________________________________________________
Chapter 12: Properties 177
________________________________________________________________________
-----------------------------------
COLOR
Purpose: The color property allows you to determine or change the
fillColor and borderColor of a field.
When used with the set command, this property modifies both the
fillColor and the borderColor properties of a field. When used with the
get or put commands, the value of this property is the fillColor of the
field.
The valid colors are in the range 0 to 255; the default is 7 (grey on
black).
Examples:
set the color of field 1 to 31;
set the color of page field "Notes" to blue on white;
Comments: This property can also be modified through the Field Info
dialog box.
See Also: fillColor, borderColor, nameColor, hiliteColor
-----------------------------------
CURRENTLINE
Purpose: Use currentLine to retrieve the line number of the current
insert point within a field.
The currentLine property returns the line number as it appears on the
screen (not the line number as determined by carriage returns).
This value cannot be changed. You can change the insertion location
within the text using the insertPoint property.
Examples:
put the currentLine of field 1 into cline;
get the currentLine of field "Notes" of page 2;
The following makes the current line the first line displayed:
set startLine of field 1 to the currentLine of field 1;
See Also: insertPoint
________________________________________________________________________
Chapter 12: Properties 178
________________________________________________________________________
-----------------------------------
EDGETYPE
Purpose: The edgeType property determines the current edge type of a
field. You can choose different characters to define the borders of a
field. The valid edge types are 1 to 15. The default is 1, which is a
single width line. The edgeType will only have an effect if the value of
withEdge is true.
Appendix 3 shows the available edge types and their corresponding
values.
This property can also be modified through the Field Info dialog box.
Examples:
set the edgeType of page field "Zip Code" to 7;
put the edgeType of field 1 into the message box;
The next two handlers in a field script change the border to a double
line when the field is opened for editing and the changes the border
back to a single line when the field is closed. This provides an
additional visual cue for the user that the field is open for editing:
handler openField;
begin
set the edgeType of me to 2;
end;
handler closeField;
begin
set the edgeType of me to 1;
end;
See Also: withEdge, borderColor
________________________________________________________________________
Chapter 12: Properties 179
________________________________________________________________________
-----------------------------------
FILLCOLOR
Purpose: Use the fillColor property to set or get the color of the
interior portion of a field. If the field is style is transparent,
fillColor will have no effect.
The valid range of colors is from 0 to 255; the default is 7 (grey on
black).
This property can also be modified through the Field Info dialog box.
Examples:
set the fillColor of field 1 to red;
set the fillColor of field 2 to 31;
See Also: color, borderColor, nameColor, hiliteColor
-----------------------------------
HILITE
Purpose: Use the hilite property to determine or change the current
hilite status of a field.
This property can be true or false; the default is false. If the value
of the hiliteIfFocus property is true, the field will be highlighted
automatically when the user tabs to it. Thus, the hilite property would
be true. The color of the highlight is determined by the hiliteColor.
Examples:
set the hilite of page field 1 to true;
set the hilite of page field 1 to the hilite of page button 1;
Sometimes it is useful to highlight a field automatically when the mouse
is moved into its rectangle. These two handlers in the field's script
will do this:
handler mouseEnter;
begin
set the hilite of me to true;
end;
handler mouseLeave;
begin
set the hilite of me to false;
end;
See Also: hiliteIfFocus, autoHilite
________________________________________________________________________
Chapter 12: Properties 180
________________________________________________________________________
-----------------------------------
HILITECOLOR
Purpose: Use the hiliteColor property to determine or change the color
of the field when it has the focus. This property will only affect
fields with hiliteIfFocus set to true. If hiliteIfFocus is false, the
field will not be highlighted when it receives the focus.
The range of valid colors is from 0 to 255; the default is 112 (black on
grey).
This property can also be modified through the Field Info dialog box.
Examples:
set the hiliteColor of field "help msg" to yellow;
set the hiliteColor of page field 1 to
the hiliteColor of page field 1 of the next page;
See Also: color, nameColor, fillColor, borderColor
-----------------------------------
HILITEIFFOCUS
Purpose: Use the hiliteIfFocus property to determine or change whether a
field is automatically highlighted when it has the focus.
When hiliteIfFocus is true, the field is automatically highlighted when
it gets the focus. The user is then required to use F2 to edit the
field. If hiliteIfFocus is false (the default), when the field receives
the focus, the cursor is immediately placed within the text ready for
typing.
This property can also be modified through the Field Info dialog box.
Examples:
set the hiliteIfFocus of page field 1 to true;
set the hiliteIfFocus of field "Notes" to false;
See Also: hilite, autoHilite
-----------------------------------
ID
Purpose: Use this property to determine how the button is identified.
Each button ID is unique for that page and cannot be altered.
Using the button ID is the only way to guarantee that you are
referencing a unique button.
________________________________________________________________________
Chapter 12: Properties 181
________________________________________________________________________
The returned value of ID is a number.
You can see the field's ID number in the Field Info dialog box.
Examples:
put the id of page field 1 into fid;
if the id of me > 20 then set the visible of me to true;
The following statements in a field script pass the field ID to a
handler in the page called setProps. In this way, the setProps handler
can uniquely identify this field.
handler openField;
begin
get the id of me;
send "SetProps" it to me;
end;
handler setProps(fid);
begin
hide field id fid;
end;
See Also: ID, name, longName
-----------------------------------
INSERTPOINT
Purpose: Use the insertPoint property to determine the position of the
cursor within a text field. Each character in the field counts as a
valid position for the text cursor, including carriage returns and
spaces.
The value of the insertPoint will be between 1 and the number of
characters in the field:
1 <= insertPoint <= the number of chars in the field
Examples:
set the insertPoint of field "Last Name" to 6;
The following moves the insert point to the first occurrence of the word
"that":
set the insertPoint of page field "Comment" to
offset("that",page field "Comment");
________________________________________________________________________
Chapter 12: Properties 182
________________________________________________________________________
-----------------------------------
LAYER
Purpose: Use the layer property to determine the layer of a field in
relation to the other fields on the page or background.
Fields are superimposed on their background or page according to their
layer. The fields closest to the page are lower in value and are
possibly overlapped by fields on a higher layer.
Examples:
put the layer of page field 1 into msg;
The following example uses the field's layer to create an index into a
container of values for that field. If the wrong value is entered into
the field, an error is displayed.
handler closeField;
begin
get the layer of me;
if item it of "10,56,78,34" is not the value of me then
answer "Field" && it && has the wrong value;
end;
See Also: ID
-----------------------------------
LOCATION
Purpose: The location property determines the X (column) and Y (row)
coordinates of the upper left corner of a field and returns two numbers
in "X,Y" format; for example:
"10,12"
The location can be changed using the Selector tool, or by setting the
rectangle property.
Examples:
put the location of page field 3 into page field 4;
Abbreviations: loc
See Also: rectangle
________________________________________________________________________
Chapter 12: Properties 183
________________________________________________________________________
-----------------------------------
LOCKTEXT
Purpose: Use the lockText property to prevent or allow editing within a
field. When you create a field, lockText is initially false; this allows
you to enter and edit the field.
Locked text fields are completely inaccessible to the keyboard user. You
can't enter text into them or edit them. A locked text field acts like a
button when the mouse is clicked on it (the field receives mouseDown,
mouseStillDown, and mouseUp).
You can modify the lockText property using the Field Info dialog box.
When to use it: When you want to protect the text in your fields from
inadvertent editing, or you want a field to act like a button, set
lockText to true. This is useful for creating fields that contain
messages or visual information for the user.
Examples:
set the lockText of page field "Salaries" to true;
The next example goes to a page that contains the word "hello" in
background field 1. It is important to lock the field first to prevent
HyperPAD from setting the focus to that field.
set the lockText of field 1 to true;
find "hello" in field 1;
set the lockText of field 1 to false;
-----------------------------------
LONGID
Purpose: The longID property returns the full field ID, including the
field's ID number, the page or background name the field is on, and the
full DOS path of the pad it's in.
You can not alter a longID. The format of the longID for a page field
is:
field id 1 of page id 1 of pad "C:\HPAD2\HOME.PAD"
or for a background field:
bkgnd field id 1 of bkgnd page id 1 of pad "C:\HOME.PAD"
Examples:
put the longID of page field "phone";
See Also: ID, name, longName
________________________________________________________________________
Chapter 12: Properties 184
________________________________________________________________________
-----------------------------------
LONGNAME
Purpose: The longName property returns the complete name of any field in
a pad. The long name of a page field contains information such as the
full DOS path and has the following format:
field id 12 of page 45 of pad "C:\HPAD\HOME.PAD"
For background fields, the word bkgnd is used:
bkgnd field id 12 of bkgnd 3 of pad "C:\HPAD\HOME.PAD"
You can't change the longName of a field.
Examples:
put the longName of field 1 into msg;
The next example prints out the script of field 1 the
longName of the field as the heading:
print (the longName of field 1) & return & return;
print (the script of field 1) & return & return;
See Also: name, namePosition, nameColor, showName
-----------------------------------
MARKEDLINES
Purpose: Use this property to get a list of the line numbers of the
lines currently marked in a list box field. The value of markedLines is
an item delimited list of line numbers, like the following:
"10,11,12,18,19"
The above example means that lines 10 though 12, 18 and 19 are all
marked.
If there aren't any marked lines in the field, then the value is empty.
Examples:
if the markedLines of field "list" is empty then
answer "There are no marked lines!";
________________________________________________________________________
Chapter 12: Properties 185
________________________________________________________________________
The following example copies all of the marked lines from page field 1
into page field 2:
put the markedLines of page field 1 into mlist;
put the number of items of mlist into n;
for i = 1 to n do
put line (item i of mlist) of page field 1
after the last line of page field 2;
end;
Comments: You cannot set the markedLines property of a field. By
adjusting the field's content, however, you can mark lines.
HyperPAD marks lines by inserting the ASCII character 1 as the first
character on a line. For example, to mark the first line of field 1:
put numToChar(1) before char 1 of line 1 of field 1;
When you retrieve the markedLines, HyperPAD returns an item delimited
list of the line numbers containing character 1 as the first character.
Whenever you change a field's content, all of the marks are removed from
the text. Thus, the following two statements result in only one line
(the second line) being marked:
put numToChar(1) before char 1 of line 1 of field 1;
put numToChar(1) before char 1 of line 2 of field 1;
To avoid this, you must first copy the field into a local variable, mark
the lines you want, then copy the local variable back into the field:
put field 1 into temp;
put numToChar(1) before char 1 of line 1 of temp;
put numToChar(1) before char 1 of line 2 of temp;
put temp into field 1;
See Also: mark, unmark
________________________________________________________________________
Chapter 12: Properties 186
________________________________________________________________________
-----------------------------------
NAME
Purpose: Use the name property to determine the name of any
field in the current pad. The returned value is the same as the name in
the Field Info dialog box.
Examples:
set the name of page field 1 of page 2 to "Last Name";
if the name of page field i is "Last Name" then
print page field i;
put the name of page field 2 into fname;
put the id of page field fname into msg;
See Also: namePosition, longName, nameColor, showName, ID,
longID.
-----------------------------------
NAMECOLOR
Purpose: The nameColor property modifies the color of the displayed name
of a field.
When showName is true, the name appears either to the left or on top of
the field using the attribute determined by nameColor.
The colors you select must be in the range from 0 to 255 (or use the
color constants). Changing this property modifies the Name Color option
in the Field Info dialog box.
Examples:
set the nameColor of page field 1 to white on green;
set the nameColor of field "Last Name" to 31;
set the nameColor of field 2 to the fillColor of field 2;
See Also: showName, namePosition
________________________________________________________________________
Chapter 12: Properties 187
________________________________________________________________________
-----------------------------------
NAMEPOSITION
Purpose: Use the namePosition property to determine the
location of the field's name, which can be either on top or to the left
of the field. In order for this property to have an effect, the name
must be shown (the showName property must be
true).
When namePosition is left (the default), the name of the field appears
on the left side of the field, decreasing the field's editing area by
the width of the name. When set to top, the name appears on top of the
field, decreasing the editing area by 1 line.
A colon always follows the displayed field name.
Changing this property changes the Name position option in the Field
Info dialog box.
Examples:
set the namePosition of page field 1 to left;
set the namePosition of field "Last Name" to top;
Abbreviations: namePos
See Also: showName, nameColor
-----------------------------------
RECTANGLE
Purpose: The rectangle property determines the position of
the rectangular region occupied by a field. The value of rectangle is a
text string consisting of four numbers separated by commas, and may be
summarized:
upper left x, upper left y, lower right x, lower right y
You can also change a field's rectangle property using the Selector
tool. (See the User's Guide for more information on the Selector tool.)
To set a field's rectangle, you must supply all four numbers, separated
by commas (not a container having a text string of numbers). For
example, the following statements will not work because the variable "r"
contains a string of numbers:
put the rectangle of page field 1 into r;
set the rectangle of page field 1 to r;
________________________________________________________________________
Chapter 12: Properties 188
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The following will work:
put the rectangle of page field 1 into r;
set the rectangle of page field 1 to
item 1 of r, item 2 of r, item 3 of r, item 4 of r;
The default rectangle for a field is 29,9,55,15.
Examples:
set the rectangle of page field 1 to 10,10,70,20;
Abbreviations: rect
See Also: location
-----------------------------------
SCRIPT
Purpose: The script property allows you to retrieve or
replace the script of any field in a pad. Setting this property replaces
the script of a field with a new one. The new script must be compiled
and checked for errors. Any handlers within the script that contain
errors will not be compiled.
The value of script is a text string composed of lines separated by
carriage returns.
The script can also be changed through the Field Info dialog box.
When to use it: When you want to copy a script from one field to
another, or assign a new script to a field, or print a script.
Examples:
To display the script of field 1:
put the script of page field 1 into page field 1;
________________________________________________________________________
Chapter 12: Properties 189
________________________________________________________________________
To change a script:
set the script of field "Last Name" to stext;
To recompile a script of field:
set the script of pg fld 1 to the script of pg fld 1;
To print the script of field "First Name":
print the script of field "First Name";
-----------------------------------
SCROLLABLE
Purpose: The scrollable property determines if you can view
text outside the physical confines of a field. With HyperPAD, you can
place more text into a field than can be viewed at once. With a
scrollable field, you can allow the user to move down through the field
to view the text that doesn't fit inside the field.
The default is true.
Changing the property changes the Scrollable option in the Field Info
dialog box.
When to use it: To include more information in a field without
increasing its size, set scrollable to true.
Examples:
set the scrollable of page field 1 to true;
set the scrollable of field "Last Name" to false;
The following handler (in a pad or background script) sets the
scrollable property to false for all new fields:
handler newField;
begin
set the scrollable of the target to false;
end;
________________________________________________________________________
Chapter 12: Properties 190
________________________________________________________________________
-----------------------------------
SHOWNAME
Purpose: The showName property determines whether the
field's name is shown. When true, the name of the field is displayed
either to the left or top of the field, depending on the value of
namePosition. By default showName is false, meaning that the field's
name isn't shown.
This property can be modified using the Field Info dialog box.
Examples:
set the showName of page field 1 to true;
set the showName of the target to false;
The following handler creates a dBase style field. It sets all of the
relevant properties, including showName, and receives the name as a
parameter.
handler DBASEField(fieldName);
begin
set the showName of field fieldName to true;
set the withEdge of field fieldName to false;
set the hiliteIfFocus of field fieldName to true;
set the scrollable of field fieldName to false;
set the lockText of field fieldName to false;
set the style of field fieldName to opaque;
set the align of field fieldName to left;
set the namePosition of field fieldName to left;
end;
To call this handler:
DBASEField "Last Name";
See Also: showName, namePosition, nameColor, name, longName
-----------------------------------
STARTLINE
Purpose: The startLine property allows you to determine which is the
first line displayed in a scrollable field. The value of startLine is
not determined by carriage returns, but by the actual lines of text in
the field.
When to use it: By changing the value of startLine, you can simulate
scrolling through a field. (Note: the field must be scrollable.).
Examples:
set the startLine of page field 1 to 1;
________________________________________________________________________
Chapter 12: Properties 191
________________________________________________________________________
To synchronize two fields so that they both start at the same line:
set the startLine of page field 1 to
the startLine of page field 2;
The following example scrolls all the fields on a page down by one line:
for i = 1 to the number of page fields do
begin
set the startLine of page field i to
(the startLine of page field i) +1;
end;
-----------------------------------
STYLE
Purpose: Use the style property to determine or change the style of a
particular field. There are four different styles for fields.
Each style changes the way a field looks and works.
The fields styles are:
opaque transparent scrolling listBox
List box fields require some special mention because they receive some
additional messages that other style fields do not receive. The
differences are summarized as follows:
1. Lines in list box fields do not word wrap; all lines are broken only
by carriage returns.
2. The UP and DOWN arrow keys move a highlight bar through the choices
in the field.
3. Pressing SPACE marks and unmarks the highlighted line. This actions
sends the mark and unmark messages to the field.
4. Pressing ENTER or double clicking the mouse on a choice sends a
select message to the field.
5. You can get the currently marked line numbers using the markedLines
property.
You can also change a field's style using the Field Info dialog box.
Examples:
set the style of page field 1 to listBox;
if the style of field "Last Name" is scrolling then
set the style of field "Last Name" to opaque;
________________________________________________________________________
Chapter 12: Properties 192
________________________________________________________________________
The following function returns the contents of all the list box fields
on a page:
function getListBoxes;
begin
get empty;
for i = 1 to the number of page fields do
begin
if the style of page field i is listBox then
put it after the last line of it;
end;
return it;
end;
-----------------------------------
VALUE
Purpose: The value property determines the content of a field.
Example:
The following handler copies a field's content into the message box when
it receives the focus:
handler openField;
begin
put the value of me into the msg box;
end;
-----------------------------------
VISIBLE
Purpose: The visible property determines whether a field is visible or
hidden. When a field is hidden, it cannot be edited or given the focus.
Further, hidden fields cannot be edited using the Selector tool unless
the visible property is set to true.
When a field is created, the visible is true (the default).
This property can also be changed using the hide and show commands. You
are unable to modify this property using the Field Info dialog box (you
must use the message box or a script).
When to use it: If you have information in a field that you want the
user to view only after a specific action is taken (such as selecting a
button) you can use visible to hide and then show the field.
________________________________________________________________________
Chapter 12: Properties 193
________________________________________________________________________
Examples:
set the visible of page field "Notes" to false;
set the visible of page field "help" to the check of button id 2;
put the visible of field id 4;
show page field 1; -- sets visible to true
hide page field 1; -- sets visible to false
The following button handler displays a help field when selected:
handler select;
begin
show page field "help";
wait 10000; -- wait 10 seconds
hide page field "help";
end;
-----------------------------------
WITHEDGE
Purpose: Use the withEdge property to determine whether a field has a
border. When true (the default), the field is displayed with the
edgeType as the border.
You can modify this property using the Field Info dialog box.
Examples:
set the withEdge of page field 1 to true;
put the withEdge of field "Last Name" into the message box.
See Also: edgeType, borderColor
________________________________________________________________________
Chapter 12: Properties 194
________________________________________________________________________
BUTTON PROPERTIES
The following section describes the properties that are used by buttons.
Some of the properties used by buttons are also used by fields.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
-----------------------------------
ACCELERATORCOLOR
Purpose: The acceleratorColor property determines the color of the
selected acceleratorKey (a selected character in the button's name) when
the user presses ALT in Browse mode. Any button in your pad can be
assigned an accelerator key, which allows for quick selection of the
button. An acceleratorKey must be selected and showName must be true for
acceleratorColor to have an effect.
The range of values is from 0 to 255; The default is 7 (grey on black).
You can modify the acceleratorColor using the Button Info dialog box.
Examples:
set the acceleratorColor of page button 3 to red on blue;
Abbreviations: accelColor
See Also: acceleratorKey, showName
________________________________________________________________________
Chapter 12: Properties 195
________________________________________________________________________
-----------------------------------
ACCELERATORKEY
Purpose: The acceleratorKey property defines the character in the
button's name that the user can press to speed button selection.
This property allows users to select buttons by holding down ALT and a
specified character in the button's name.
The acceleratorColor must be different from the fillColor and showName
must be true for this property to work.
When you press the accelerator key combination for a button, the button
becomes highlighted and a select message is sent to that button.
Any letter or number (A..Z,0..9) can be used an accelerator key. The
default is empty.
If the accelerator letter isn't within the button's name, then you will
not see it when you press ALT. However, you can still press the ALT key
combination to select that button.
Examples:
set the accelKey of page button 1 to "A";
set the acceleratorKey of button "Home" to "H";
Comments: Make sure you select a unique key code for the accelerator
key. If you don't, then the button with the lowest layer gets the focus
first. Also, be careful because button accelerator keys have priority
over menu accelerators (such as ALT+F for File menu).
Abbreviations: accelKey
See Also: acceleratorColor, showName, select
-----------------------------------
ALIGN
Purpose: This property controls the positioning of the button's name
within the button. The possible values are:
left
right
centered
The default is centered.
Examples:
set the align of page button 4 to right;
________________________________________________________________________
Chapter 12: Properties 196
________________________________________________________________________
-----------------------------------
AUTOHILITE
Purpose: The autoHilite property determines if a button is automatically
highlighted when it receives the focus. The color of the highlighted
button is determined by the value of hiliteColor.
The default value of autoHilite is true.
Buttons that have the focus will be highlighted only if hiliteIfFocus is
true. If hiliteIfFocus is false, then the button will only be
highlighted while the mouse is pressed and the mouse pointer is within
the rectangle of that button.
When a button is highlighted, the hilite property for that button is set
to true.
Examples:
set the autoHilite of button 1 to true;
set the autoHilite of button "Home" to false;
To make sure a button gets highlighted when it has the focus:
set the autoHilite of button 1 to true;
set the hiliteIfFocus of button 1 to true;
See Also: hiliteIfFocus, hiliteColor, hilite
-----------------------------------
BORDERCOLOR
Purpose: Use the borderColor property to determine the color of the
characters that form the button's border. The borderColor property will
have no effect unless withEdge is true and the style is not transparent.
The range of colors is from 0 to 255; the default is 7 (grey on black).
You can modify this property using the Button Info dialog box.
Examples:
set the borderColor of page button 1 to 7;
if the style of button "Notes" is not transparent then
set the borderColor of button 1 to yellow on red;
See Also: withEdge, acceleratorColor, fillColor, color, hiliteColor
________________________________________________________________________
Chapter 12: Properties 197
________________________________________________________________________
-----------------------------------
CHECK
Purpose: The check property determines whether a button is checked. This
will only have an effect on checkBox styled buttons.
If the check is true, then the check box button will have an X between
the brackets:
[X] Include Last Name
If it false, then there will be a blank space between the brackets:
[ ] Include Last Name
The value of check gets modified when HyperPAD receives the select
message initially sent to a check box styled button. For example, the
following script in your checkBox button prevents its value (the check)
from being toggled, because it prevents the select message from being
sent to HyperPAD.
handler select;
begin
end;
Intercepting the select message enables you to create option button
groups in your pads (an option button group is where one button in the
group is checked while the other are not). Suppose you have 3 buttons,
of which only one can be checked at a time. The button names are "Blue",
"Red", and "Green". The script of button "Green" would be:
handler select;
begin
set the check of button "Red" to false;
set the check of button "Blue" to false;
set the check of me to true;
end;
The script of button "Red" would be:
handler select;
begin
set the check of button "Blue" to false;
set the check of button "Green" to false;
set the check of me to true;
end;
________________________________________________________________________
Chapter 12: Properties 198
________________________________________________________________________
and the script of button "Blue" would be:
handler select;
begin
set the check of button "Green" to false;
set the check of button "Red" to false;
set the check of me to true;
end;
Examples:
set the check of page button 1 to true;
set the check of me to false;
set the check of the target to the salesTax > 10;
The following handler in the script of a check box button locks and
unlocks a field depending on whether the button is checked.
handler select;
begin
get the check of me;
set the lockText of page field "Custom Size" to it;
pass;
end;
Comments: You can still modify the checkBox property for buttons that do
not have a checkBox style (you just won't see the X).
-----------------------------------
COLOR
Purpose: Use the color property to modify the
fillColor and the borderColor of a button.
Setting the color of a button sets both the fillColor and the
borderColor of the button. Getting the color of a button, however,
returns only the fillColor of the button.
Examples:
set the color of page button 1 to 31;
set the color of button "Home" to white on red
See Also: fillColor, borderColor, hiliteColor, acceleratorColor
________________________________________________________________________
Chapter 12: Properties 199
________________________________________________________________________
-----------------------------------
EDGETYPE
Purpose: Use the edgeType property to determine the type of border a
button uses.
The valid edge types are 1 to 15. The default is 1, which is a single
width line. This property will only have an effect if the value of
withEdge is true.
Appendix 3 shows the available edge types and their corresponding
values.
Examples:
put the edgeType of button 4 into the message box;
The next two handlers in a button script change the border to a double
line when the button has the focus, and sets the border back to a single
width line when the focus changes to another object.
handler openButton;
begin
set the edgeType of me to 2;
end;
handler closeButton;
begin
set the edgeType of me to 1;
end;
See Also: withEdge, borderColor
-----------------------------------
FILLCOLOR
Purpose: The fillColor property determines the color of the interior
portion of a button, including the button name.
You color will have no effect if the button style is transparent.
The valid range of colors is from 0 to 255; the default is 7 (grey on
black).
Examples:
set the fillColor of button 1 to red;
set the fillColor of button 2 to the borderColor of button 2;
See Also: acceleratorColor, borderColor, color, hiliteColor
________________________________________________________________________
Chapter 12: Properties 200
________________________________________________________________________
-----------------------------------
HILITE
Purpose: Use the hilite property to determine whether a button is
highlighted. When true, the button appears using the current color value
of the hiliteColor property.
Buttons that have the focus will only be highlighted if the autoHilite
property is true. If false, then the button will only be highlighted
when a mouse button is pressed while the mouse pointer is within the
rectangle of the button.
Examples:
set the hilite of page button "Quit" to true;
if the hilite of page button "Home" is true then
answer "You are highlighting Home";
See Also: autoHilite, hiliteColor
-----------------------------------
HILITECOLOR
Purpose: The hiliteColor property determines the color of a button when
it has the focus. The autoHilite property has to be true for the button
to be able to be highlighted.
A button can be highlighted (using the hiliteColor) under the following
two conditions:
1. If the button has the focus and hiliteIfFocus is set to true.
2. While the mouse button is held down and the pointer is inside the
button's rectangle.
The range of valid colors is from 0 to 255; the default is 112 (black on
grey).
You can modify this property using the Button Info dialog box.
Examples:
set the hiliteColor of button "hello" to yellow;
set the hiliteColor of page button 1 to
the hiliteColor of page button 2;
________________________________________________________________________
Chapter 12: Properties 201
________________________________________________________________________
-----------------------------------
HILITEIFFOCUS
Purpose: Use the hiliteIfFocus property to determine whether your button
is highlighted when it has the focus.
When true, a button with the focus will be highlighted using the
hiliteColor. If false, the button will not be highlighted when it has
the focus.
You can modify this property using the Button Info dialog box.
Examples:
set the hiliteIfFocus of page button 1 to true;
-----------------------------------
ID
Purpose: Use the ID property to determine the unique number that
HyperPAD assigned to this button when it was created. The only way to
uniquely reference a specific button is with the ID.
You can't change a button's ID.
You can see a button's ID using the Button Info dialog box.
Examples:
put the id of page button 1 into fid;
if the id of me > 20 then set the visible of me to true;
See Also: longID
-----------------------------------
LAYER
Purpose: The layer property returns the layer number of the button with
respect to all the buttons on the page.
You cannot change this property through a script. You must use the
Selector tool to select a button, then use the Send Farther and Move
Closer commands on the Object menu.
When to use it: It is sometimes convenient to organize your button's
layering so that the layer of a button can be used as an index into
data.
________________________________________________________________________
Chapter 12: Properties 202
________________________________________________________________________
Examples:
put the layer of button 1 into page field 2;
handler select;
begin
-- get the line number corresponding to the layer
get line (the layer of me) of page field "index";
go to page it;
end;
-----------------------------------
LOCATION
Purpose: The location property determines the X (column) and Y (row)
coordinates from the upper left corner of a button, returning two
numbers in the "X,Y" format, like:
10,12
You can also change a button's location using the Selector tool, or by
modifying the value of the rectangle property.
Examples:
set the location of page button 1 to 10,10;
if the location of button "Home" is "3,4"
then go to the next page
Abbreviations: loc
See Also: rectangle
-----------------------------------
LOCKTEXT
Purpose: The lockText property locks a button so that it cannot be
selected with the mouse or keyboard. Locked buttons receive no messages.
When to use it: You can use a transparent button with the lockText
property set to true to cover up other objects that you don't want
selected.
You can't modify this property using the Button Info dialog box. You
must use either the message box or a script.
Examples:
set the lockText of button 1 to true;
if the lockText of page button "Cover Up" then
answer "Can't select that right now";
________________________________________________________________________
Chapter 12: Properties 203
________________________________________________________________________
-----------------------------------
LONGID
Purpose: Use longID to get a button's full identification information
including its ID number, the name of the page or background the button
is on, and the full DOS path of the pad it's in.
The name is returned information is in the following format:
button id 4 of page 4 of pad "C:\HPAD\HOME.PAD"
You cannot change the longID of a button.
Examples:
put the longID of page button "exit" into the msg;
if word 5 of the longID of the target is "page" then
answer "This is a page button";
See Also: ID, name, longName, layer
-----------------------------------
LONGNAME
Purpose: The longName property allows you to access the long name of any
button in a pad. The long name of a page button has the following
format:
button id 12 of page 45 of pad "C:\HPAD\HOME.PAD"
For background buttons, the word bkgnd is used:
bkgnd button id 12 of bkgnd 3 of pad "C:\HPAD\HOME.PAD"
You cannot alter the longName of a button.
Examples:
put the longName of button 1 into msg;
The next example prints out the script of button 1 with a heading
containing its longName:
print (the longName of button 1) & return & return;
print (the script of button 1) & return & return;
See Also: name, ID, longID, layer
________________________________________________________________________
Chapter 12: Properties 204
________________________________________________________________________
-----------------------------------
NAME
Purpose: Use the name property to determine the name of any button in
the current pad.
The value of the name property is the same as the name in the Button
Info dialog box. The button's name can be referred to in a script or in
the message box.
You can modify this property using the Button Info dialog box.
When to use it: By naming objects, you give yourself an easy to remember
reference for each object in HyperPAD scripts.
Examples:
set the name of page button 1 of page 2 to "Last Name";
These statements use the name property to refer to the object:
get the name of the target;
set the color of button it to red;
set the align of button it to left;
Comments: The button name cannot begin or end with a space character
(use character 255 if you need to create space to the left of a button
name).
See Also: longName, align
-----------------------------------
RECTANGLE
Purpose: The rectangle property determines the rectangular region
occupied by a button. The value of rectangle is a text string of four
numbers separated by commas, as in the following:
upper left x, upper left y, lower right x, lower right y
For example:
"10,10,70,21"
To set the rectangle of a button, you must supply all four numbers,
separated by commas, not a text string of numbers. For example, the
following statement will NOT work because the variable "r" contains a
string of four numbers:
put the rectangle of page button 1 into r;
set the rectangle of page button 4 to r;
________________________________________________________________________
Chapter 12: Properties 205
________________________________________________________________________
The following will work:
put the rectangle of page button 1 into r;
set the rectangle of page button 6 to
item 1 or r, item 2 of r, item 3 of r, item 4 of r;
You can also set the rectangle of a button using the Selector tool.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Examples:
set the rectangle of page button 1 to 10,10,70,20;
set the rect of page button "Home" to 10,10,20,20;
if item 3 of the rect of button 1 > 10 then
go to the next page;
Abbreviations: rect
See Also: loc
________________________________________________________________________
Chapter 12: Properties 206
________________________________________________________________________
-----------------------------------
SCRIPT
Purpose: The script property retrieves or replaces the
script of any button in a pad. The value of script is a text string
composed of lines separated by carriage returns.
Setting this property replaces the script of a button with a new one.
The new script must be compiled and checked for errors. Any handlers
within the script that contain errors will not be compiled.
You can also view and modify the script through the Button Info dialog
box, by selecting the Script button.
Examples:
put the script of page button 1 into page field 1;
set the script of button "Last Name" to stext;
To recompile a button's script:
set the script of pg btn 1 to the script of pg btn 1;
-----------------------------------
SHADOW
Purpose: Use the shadow property to determine whether a button has a
shadow, giving it a three-dimensional appearance. The possible values
are true and false; the default is false.
This property can also be modified through the button's property box.
Note: Some monochrome and LCD systems will be unable to display a
shadow correctly.
Examples:
set the shadow of me to false;
set the shadow of page btn 1 to true;
The shadow takes on the background color of the area on the screen
behind the button. The shadow is drawn as follows:
________________________________________________________________________
Chapter 12: Properties 207
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
-----------------------------------
SHOWNAME
Purpose: Use the showName property to determine whether the button's
name is shown. When showName is true (the default), the name of the
button is displayed using the current value of the align property.
You can modify this property using the Button Info dialog box.
When to use it: In most cases, the name of the button will be necessary
for the user to know what is being selected.
Examples:
set the showName of page button 1 to true;
See Also: align, name
-----------------------------------
STYLE
Purpose: The style property allows you to determine the style of a
button to. The possible values are: opaque, transparent, and checkBox.
You can also modify this property using the Button Info dialog box.
Examples:
set the style of page button 1 to checkBox;
if the style of page button "wow" is opaque then
set the focus to page field 2;
See Also: check
________________________________________________________________________
Chapter 12: Properties 208
________________________________________________________________________
-----------------------------------
VISIBLE
Purpose: Use the visible property to determine whether a
button is shown or hidden. When a button is hidden, it is invisible and
cannot be edited using the Selector tool unless the visible property is
set to true.
When a button is created, it is visible (the default). This property can
be changed using hide or show. You can't change this property using the
Button Info dialog box.
When to use it: If you want to make a button appear or disappear,
depending upon the user's action, you would modify this property.
Example:
set the visible of page button "Word" to false;
set the visible of page button "help" to
not the visible of the message box;
See Also: lockText
-----------------------------------
WITHEDGE
Purpose: Use the withEdge property to determine whether a button has
characters defining its borders. When withEdge is true (the default), a
button is displayed with a border. (The border type is the value of the
edgeType property.)
Examples:
set the withEdge of page button 1 to true;
See Also: edgeType, borderColor
________________________________________________________________________
Chapter 12: Properties 209
________________________________________________________________________
PAGE PROPERTIES
-----------------------------------
CANTDELETE
Purpose: Setting cantDelete to true prevents a page from being deleted.
When false, the page can be deleted using Delete Page on the Edit menu.
This property can also be modified through the Page Info dialog box.
When to use it: Set cantDelete to true when you want to protect pages
from being accidentally deleted.
Examples:
set the cantDelete of page 2 to false;
if the userLevel <= 2 then
set the cantDelete of page 3 to true;
See Also: userLevel, delete
-----------------------------------
ID
Purpose: Use this property to retrieve the identifier that HyperPAD gave
a page when it was created. The ID is the most reliable way to refer to
a page.
You can see, but not modify, the page ID using the Page Info dialog box.
Examples:
put the id of page 1 into pg;
if the id of me > 20 then go to page 1;
See Also: longID
-----------------------------------
LONGID
Purpose: Use the longID property to get a page's complete name,
including the ID number and the full DOS path of the pad, as in the
following example:
page id 2 of pad "C:\HPAD.HOME.PAD"
You cannot modify a page's longID.
See Also: ID
________________________________________________________________________
Chapter 12: Properties 210
________________________________________________________________________
-----------------------------------
LONGNAME
Purpose: Use the longName property to determine a page's complete name,
including the page ID and full DOS pathname of the current pad, in the
following format:
page id 2 of pad "C:\HPAD\HOME.PAD"
Examples:
put the longID of this page into the message box;
The following example prints the current page with the longName as the
heading.
print the longName of this page;
print this page;
See Also: name
-----------------------------------
NAME
Purpose: Use the name property to get or set the name of a page. This is
the same name that appears in the Page Name option in the Page Info
dialog box.
Examples:
if the name of page is "HOME" then
answer "You are home now!";
The following handler sets the name of the page when the page is
created. This handler belongs in a background or pad script.
handler newPage;
begin
set the name of the target to "page at" && time();
end;
See Also: longName, ID, longID
________________________________________________________________________
Chapter 12: Properties 211
________________________________________________________________________
-----------------------------------
SCRIPT
Purpose: Use the script property to retrieve or replace the current
script of the page. By using the set command, this property will replace
the current page script with a new one. The new script will be
immediately compiled and checked for errors. Any handlers within the
script that contain errors will not be compiled.
The value of the script is a text string composed of lines separated by
carriage returns.
You can get to a page's script using the Page Info dialog box.
Examples:
put the script of page 3 into stext;
set the script of page 6 to stext;
The next example appends an openPage handler to the current script of
the page. The new handler beeps when the page is opened.
set the script of page 1 to the script of the page &
return & return &
"handler openPage;" & return &
"begin" & return &
"beep;" & return &
"end;" & return;
________________________________________________________________________
Chapter 12: Properties 212
________________________________________________________________________
BACKGROUND PROPERTIES
-----------------------------------
CANTDELETE
Purpose: Setting cantDelete to true prevents a background from being
deleted. When false, the background can be deleted by deleting all of
the pages that use that background.
You can modify this property using the Background Info dialog box.
When to use it: Set cantDelete to true when you want to protect
backgrounds from being accidentally deleted.
Examples:
set the cantDelete of page 2 to false;
if the userLevel <= 2 then
set the cantDelete of page 3 to true;
See Also: userLevel, delete
-----------------------------------
ID
Purpose: The ID property gets the number which uniquely identifies a
background. Using the ID number is the only sure way to uniquely
reference a background.
You can't change a background's ID.
When to use it: Use the ID number in a script to refer to a background.
Examples:
put the id of bkgnd 8 into fid;
go to background id 19;
-----------------------------------
LONGID
Purpose: The longID property gets the background's full name, including
its ID number and the full DOS path of the pad it's in, as in the
following:
bkgnd id 4 of "C:\HPAD\INDEX.PAD"
You can't change the longID of a background.
See Also: ID, name, longName
________________________________________________________________________
Chapter 12: Properties 213
________________________________________________________________________
-----------------------------------
LONGNAME
Purpose: The longName property retrieves the background's ID number and
the full DOS path of the pad it's in, using the following format:
bkgnd id 5 of pad "C:\HPAD\PHONE.PAD"
You can't change the longName of a background.
Examples:
get the longName of bkgnd 5;
put the longName of bkgnd 1 into the msg;
See Also: name, ID, longID
-----------------------------------
NAME
Purpose: Use the name property to get or set the name of a background.
When to use it: It is often easier to refer to a background by name in a
script then to use its object or ID number.
You can modify a background's name using the Background Info dialog box.
Examples:
if the name of this bkgnd is "wild" then
go to page 5;
put the name of this background into page field 1;
set the name of background id 4 to "template";
See Also: longName, ID, longID
________________________________________________________________________
Chapter 12: Properties 214
________________________________________________________________________
-----------------------------------
SCRIPT
Purpose: The script property gets or replaces the current background
script. Setting this property replaces the current background script
with a new one. The new script will be compiled immediately and checked
for errors. Any handlers within the script that contain errors will not
be compiled.
The value of the script is a text string composed of lines separated by
carriage returns.
You can also access the Background's script through the background
property box.
Examples:
put the script of bkgnd 1 into junk;
set the script of bkgnd 5 to ex;
________________________________________________________________________
Chapter 12: Properties 215
________________________________________________________________________
MESSAGE BOX PROPERTIES
-----------------------------------
LOCATION
Purpose: Use the location property to determine the X (horizontal) and Y
(vertical) coordinates of the upper left corner of the message box. The
message box's position on-screen can be changed or accessed using the
location property.
If you get the location of the message box, it returns two numbers in
"X,Y" format, such as
12,14
When you set the location of the message box, you must supply two
parameters, like the following example:
set the location of msg to 12,14;
You can also modify the message box's position using the mouse.
Examples:
set the location of the message box to 32,1;
Abbreviations: loc
-----------------------------------
VISIBLE
Purpose: With the visible property, you determine whether
the message box is shown or hidden. When the message box is hidden, it
is invisible and cannot be accessed (although you can still put text
into it). By default, the message box is not visible.
This property can also be changed using the hide and show commands.
Example:
set the visible of msg to false;
The following statements are equivalent:
set the visible of the message box to true;
show the message box;
See Also: show, hide
________________________________________________________________________
Chapter 12: Properties 216
________________________________________________________________________
-----------------------------------
WIDTH
Purpose: Use the width property to adjust the size of the
message box. The cannot set the width larger than the screen width.
When to use it: When you want to shrink the message box so it doesn't
obstruct your view of other elements on the page or background.
Examples:
To make the message box 40 characters wide:
set the width of the msg to 40;
________________________________________________________________________
Chapter 12: Properties 217
________________________________________________________________________
TOOL BOX PROPERTIES
-----------------------------------
LOCATION
Purpose: The location property determines the X (horizontal)
and Y (vertical) coordinates of the upper left corner of the tool box,
returning two numbers in "X,Y" format, like:
18,4
You can also move the tool box around the screen with the mouse.
Examples:
set the location of the tool box to 10,5;
put the location of the tool box into msg;
Abbreviations: loc
-----------------------------------
VISIBLE
PURPOSE: USE the visible property to hide or show the tool box.
When the tool box is hidden, it cannot be used by the pad user. By
default, the tool box is not displayed (the visible is false).
This property can be changed using the hide or show commands.
You can also toggle the visibility of the tool box by selecting Tool Box
from the Workspace menu.
Example:
set the visible of the tool box to false;
See Also: hide, show
________________________________________________________________________
Chapter 12: Properties 218
________________________________________________________________________
MENU BAR AND STATUS BAR PROPERTIES
-----------------------------------
VISIBLE
Purpose: Use the visible property to turn the menu bar or
status bar on or off.
You can also modify this property using the hide and
show commands, or by accessing the Menu Bar and Status Bar
commands from the Workspace menu. ALT+SPACE also lets you toggle the
menu bar on and off.
The status bar can't be displayed without the menu bar.
When to use it: If your pad includes its own menu bar, or if you don't
want your users to access the menu commands, set the visible
of the menu bar to off. If you want your pad users to be able to read
messages you place on the bottom line on the screen, turn the status bar
off.
Example:
set the visible of the menu bar to false;
set the visible of the status bar to true;
if the visible of the menu bar then
set the visible of the status bar to true;
See Also: show, hide
________________________________________________________________________
Table of contents i
________________________________________________________________________
TABLE OF CONTENTS OVERVIEW
Preface 1
Chapter One: What's Really Happening? 5
Chapter Two: PADtalk Scripts 13
Chapter Three: The Object Hierarchy 29
Chapter Four: Containers 41
Chapter Five: The Current Object 47
Chapter Six: Control Structures 51
Chapter Seven: Chunk Expressions 59
Chapter Eight: Numeric Operators 63
Chapter Nine: Colors 69
Chapter Ten: Messages 73
Chapter Eleven: Commands 99
Chapter Twelve: Properties 145
Chapter Thirteen: Functions 219
Appendix 1: PADtalk Error Messages 277
Appendix 2: Key Codes 291
Appendix 3: Writing Extensions 297
Appendix 4: Support for Show Partner F/X 347
Appendix 5: HyperPAD Utilities 349
Appendix 6: Running HyperPAD on a Novell Network 353
Appendix 7: Edge Types 357
Appendix 8: ASCII Table 359
Appendix 9: Working with Floppy Disks 361
________________________________________________________________________
Table of contents ii
________________________________________________________________________
________________________________________________________________________
Table of contents iii
________________________________________________________________________
Preface 1
About the PADtalk Reference Guide 1
Chapter Summaries 1
Notation Conventions 3
Chapter One: What's Really Happening? 5
What is PADtalk? 6
What do you use it for? 7
Objects 7
Pad 7
Background 8
Page 8
Field 8
Button 8
Other HyperPAD Objects 8
How to refer to objects 8
Qualifying Objects 8
Object Names 9
Object Numbers 10
Object ID Numbers 11
Ready to script 11
Chapter Two: PADtalk Scripts 13
Constructing Scripts 13
The Script Editor 14
Exiting the Script Editor: 14
Let's Start Scripting: 14
Writing statements in PADtalk 17
Using the Keyboard 18
Editing a Script 19
Search and Replace 20
Printing Scripts 21
Compiling Scripts 21
Compiling with the Debugging Switch 21
The Components of a Script 22
Handlers 22
Defining your own Functions 23
Other Definitions 24
Commands 24
________________________________________________________________________
Table of contents iv
________________________________________________________________________
Constants 24
Miscellaneous Constants 25
Character Constants 25
Property Constants 26
Numeric Constants 26
Literals 27
Functions 28
Properties 28
Containers 28
Chapter Three: The Object Hierarchy 29
Sending Messages 30
Where do messages go? 30
Types of Messages 32
System Messages 32
Messages From Scripts 33
Message Box Messages 33
Messages that look like commands 34
Receiving and Sending Messages 34
The Exit Command 35
The Pass Command 36
Altering the Message Path 37
Where to put your Handlers 39
Chapter Four: Containers 41
Fields 41
Variables 42
Local Variables 43
Global Variables 44
Parameter Variables 44
The Message Box 45
The selectedText 45
Chapter Five: The Current Object 47
The Current Object 47
The Target 48
The Current Executing Object 49
Referencing Current Objects with "this" 49
________________________________________________________________________
Table of contents v
________________________________________________________________________
Chapter Six: Control Structures 51
If Statement 51
Case Statement 52
While...Do Statement 54
Repeat...Until Statement 55
For Statement 56
Chapter Seven: Chunk Expressions 59
Simple Chunk Expressions 59
Character Chunks 60
Word Chunks 60
Item Chunks 61
Line Chunks 61
Specifying Chunks of Chunks 61
Chunking Destinations 62
Chapter Eight: Numeric Operators 63
( ) (parentheses) 63
- (unary minus) 63
not (logical NOT) 63
^ (exponentiation) 63
/ (divide) 64
* (multiplication) 64
mod (module) 64
div (divide and truncate) 64
+ (addition) 64
- (subtract) 64
& (concatenation) 64
&& (concatenation with space) 65
> (greater than) 65
< (less than) 65
>= (greater than or equal to) 65
<= (less than or equal to) 65
is in 65
is not in 66
contains 66
= (equal) 66
<> (not equal) 66
is 66
is not 66
and (logical AND) 66
or (logical OR) 66
Operator Precedence 67
________________________________________________________________________
Table of contents vi
________________________________________________________________________
Chapter Nine: Colors 69
Specifying Colors 69
Color Numbers 70
Chapter Ten: Messages 73
About Messages 73
Message Sent from Commands 74
Messages sent to a button 74
closeButton 75
deleteButton 75
keyPress 76
mouseDown 76
mouseEnter 76
mouseLeave 76
mouseStillDown 77
mouseUp 77
mouseWithin 77
newButton 77
openButton 78
select 78
Messages Sent to Fields 79
closeField 80
deleteField 80
keyPress 80
mark 81
mouseDown 81
mouseEnter 81
mouseLeave 82
mouseStillDown 82
mouseUp 82
mouseWithin 82
newField 82
openField 83
select 83
unMark 84
Messages sent to a page 85
break 85
cancel 86
closePad 86
closePage 87
deleteBackground 87
deletePad 88
________________________________________________________________________
Table of contents vii
________________________________________________________________________
deletePage 88
doMenu 89
help 90
idle 90
keyPress 91
mouseDown 92
mouseStillDown 92
mouseUp 92
newBackground 92
newPad 93
newPage 93
openPad 93
openPage 94
quit 94
resume 94
startUp 95
suspend 95
Common Message Groupings 96
Chapter Eleven: Commands 99
add 100
answer 101
ask 102
close 103
convert 104
delete 107
dial 108
divide 111
do 111
edit Script 112
find 112
flushCache 114
fxshow 115
get 116
global 116
go 117
hide 120
hHilite 120
multiply 121
noSound 122
play 122
playBack 124
pop Page 124
print 125
push 127
________________________________________________________________________
Table of contents viii
________________________________________________________________________
put 129
query 130
read 131
record 133
run 134
send 136
set 137
setDefaultPopupColor 138
setPopupColors 138
show 139
sort 139
sound 141
subtract 142
visual 142
wait 143
write 144
Chapter Twelve: Properties 145
Introduction 145
What are Properties 145
Property Listings 146
Global Properties 146
Pad Properties 146
Page Properties 147
Background Properties 147
Button Properties 147
Field Properties 148
Message Box Properties 148
Tool Box Properties 148
Menu Bar Properties 148
Status Bar Properties 148
Global Properties 149
asciiChar 149
autoSave 149
baud 151
currentDirectory 151
cursor 152
cursorLoc 152
dataBits 153
fileSortMethod 153
focus 154
lockMessages 154
lockRecent 156
lockScreen 156
markerAttr 157
________________________________________________________________________
Table of contents ix
________________________________________________________________________
markerChar 158
maxDirtyPages 159
modem 159
mouse 160
mouseAttr 160
mouseChar 162
numberFormat 162
paintAttr 164
parity 165
printDevice 165
printer 166
printerTranslation 166
selectedText 167
stopBits 168
tabbing 168
userLevel 169
Pad Properties 171
cantDelete 171
cantModify 171
longName 172
name 173
passwordOnly 173
script 174
Field Properties 175
acceleratorColor 175
acceleratorKey 175
align 176
autoHilite 176
borderColor 176
color 177
currentLine 177
edgeType 178
fillColor 179
hilite 179
hiliteColor 180
hiliteIfFocus 180
ID 180
insertPoint 181
layer 182
location 182
lockText 183
longID 183
longName 184
markedLines 184
name 186
nameColor 186
________________________________________________________________________
Table of contents x
________________________________________________________________________
namePosition 187
rectangle 187
script 188
scrollable 189
showName 190
startLine 190
style 191
value 192
visible 192
withEdge 193
Button Properties 194
acceleratorColor 194
acceleratorKey 195
align 195
autoHilite 196
borderColor 196
check 197
color 198
edgeType 199
fillColor 199
hilite 200
hiliteColor 200
hiliteIfFocus 201
ID 201
layer 201
location 202
lockText 202
longID 203
name 204
rectangle 204
script 206
shadow 206
showName 207
style 207
visible 208
withEdge 208
Page Properties 209
cantDelete 209
ID 209
longID 209
longName 210
name 210
script 211
________________________________________________________________________
Table of contents xi
________________________________________________________________________
Background Properties 212
cantDelete 212
ID 212
longID 212
longName 213
name 213
script 214
Message Box Properties 215
location 215
visible 215
width 216
Tool Box Properties 217
location 217
visible 217
Menu Bar and Status Bar Properties 218
visible 218
Chapter Thirteen: Functions 219
Introduction 219
Calling a Function 219
Functions that Send Messages 219
Function Listing by Topic 220
Computer Functions 220
Conversion Functions 220
Date and Time Functions 220
DOS Functions 221
Financial Functions 221
Keyboard Functions 221
Mathematical Functions 222
Pad Information Functions 222
Text Handling Functions 222
Miscellaneous Functions 223
abs 223
acos 223
altKey 224
annuity 224
append 225
asin 225
atan 226
average 226
charToNum 226
choose 227
clean 227
commandLine 228
compound 228
________________________________________________________________________
Table of contents xii
________________________________________________________________________
coprocessor 229
cos 229
cpu 229
create 230
ctrlKey 230
currentBackground 231
currentObject 231
currentPad 232
currentPage 232
cursorLoc 233
cursorX 234
cursorY 234
date 234
directory 235
dirs 236
diskSpace 236
dosVersion 237
drive 237
drives 238
environment 238
exp 239
exp1 239
exp2 240
fact 240
fileExists 240
fileOpen 241
files 242
fileSize 242
findFile 243
freeMem 243
freeSize 244
fullName 244
graphicsCard 245
isSound 246
key 246
leftString 247
length 248
ln 248
ln1 249
longDate 249
longFiles 250
longTime 250
lower 251
max 251
min 252
mouseButton 252
________________________________________________________________________
Table of contents xiii
________________________________________________________________________
mouseClick 253
mouseExists 253
mouseLoc 254
mouseX 254
mouseY 254
number of 255
numToChar 256
offSet 257
open 258
padSize 259
param 259
paramCount 260
params 261
popup 262
product 265
proper 265
random 266
repeatChars 267
result 267
rightString 268
round 269
screenHeight 269
screenWidth 270
seconds 270
shiftKey 271
sin 272
sqrt 272
stdev 272
substitute 273
sum 273
tan 273
target 274
time 274
trim 275
trunc 275
upper 276
variance 276
version 276
________________________________________________________________________
Table of contents xiv
________________________________________________________________________
Appendix 1: PADtalk Error Messages 277
Compiler Error Messages 277
Runtime Error Messages 285
Appendix 2: Key Codes 291
Appendix 3 Writing Extensions 297
Introduction 297
How to Create an Extension 298
Limitations 299
Extension Components 299
Function Pool 299
WhenLoaded() and WhenUnLoaded() 299
WhenLoaded() 299
WhenUnLoaded() 299
A Sample C Extension 300
A Sample Assembly Language Extension 301
Passing Data Between HyperPAD and your Extension 302
Passing Parameters 302
Returning Values 303
Handling Memory 304
Pointers 304
Handles 305
Dereferencing Handles 306
HyperPAD Callbacks 306
Memory Functions 307
Conversion Functions 307
Container Get/Set Functions 308
Message Passing Functions 308
Screen Handling Functions 308
Event Handling Functions 309
Miscellaneous Functions 309
Callback Reference 310
btoh 310
Do 310
FreeHandle 311
FreePtr 311
ftoh 312
GetEvent 312
GetFieldID 312
GetFieldName 313
GetFieldNum 314
GetGlobal 314
________________________________________________________________________
Table of contents xv
________________________________________________________________________
GetSharedArea 315
GetTime 315
HandleSize 316
HideMouse 316
HighLine 316
htob 318
htof 318
htoi 318
htol 318
htos 319
itoh 319
LockHandle 320
ltoh 320
MakeWin 321
NewHandle 322
NewPtr 322
PeekEvent 322
PtrSize 323
PutAttr 323
PutCh 324
PutStr 324
ReAllocHandle 325
Refresh 325
ReleaseHPAD 326
RemWin 326
RestoreHPAD 326
ReturnValue 327
SendHPMsg 328
SendPageMsg 329
SetFieldID 330
SetFieldName 330
SetFieldNum 331
SetGlobal 332
ShowMouse 332
stoh 333
UnGetEvent 333
UnLockHandle 334
C routines defined in HyperPAD 335
Using Floating Point Math 335
Data Structures used by Extensions 336
Function Pool 337
Video Packet 338
Message 339
The Event Queue 340
Sared Data Area 342
________________________________________________________________________
Table of contents xvi
________________________________________________________________________
Appendix 4: Support for Show Partner F/X 347
Introduction 347
Show Partner File Types 347
Using the fxshow Command 348
Appendix 5: HyperPAD Utilities 349
Extension Mover 349
Pad Info 350
Strip 350
Compact 351
Appendix 6: Running HyperPAD on a Novell Network 353
Introduction 353
Installation 353
Sharing Pads 354
Where HyperPAD Looks for Files 355
Appendix 7: Edge Types 357
Appendix 8: ASCII Table 359
Appendix 9: Working with Floppy Disks 361
________________________________________________________________________
Index 363
________________________________________________________________________
Special Characters
& (concatenate) (See operators)
&& (concatenate with space) (See operators)
( ) (grouping) (See operators)
* (multiply) (See operators)
+ (plus) (See operators)
- (unary minus) (See operators)
- (minus) (See operators)
-- (comment) 18
/ (divide) (See operators)
< (less than) (See operators)
<= (less than or equal to) (See operators)
<> (not equal) (See operators)
= (equal) (See operators)
> (greater than) (See operators)
>= (greater than or equal to) (See operators)
^ (exponent) (See operators)
{} (comment) 18
; (end of statement) 16
# (pound sign)
with numberFormat 162-164
with play 122-123
-----------------------------------
A
abbreviated (keyword) 104
abs (function) 223
acceleratorColor (property)
buttons 194
fields 175
acceleratorKey (property)
buttons 195
fields 175-176
accessing data 59
acos (function) 223
add (command) 100
after (preposition) 62
alert dialog boxes (See dialog boxes)
align (property) 195
buttons 195
fields 176
altKey (function) 224
am (keyword) (See convert)
and (operator) (See operators)
animation 347-348
annuity (function) 224
answer (command) 101
any (ordinal) (See ordinals)
append (function) 225
application types 7
ascending (keyword) 141
ASCII table 359
________________________________________________________________________
Index 364
________________________________________________________________________
asciiChar (property) 149
asin (function) 225
ask (command) 102-103
assembly language programming 297
atan (function) 226
autoHilite (property)
buttons 196
fields 176
automatic highlighting
of buttons 196,201
of fields 180
autoSave (property) 149-150
average (function) 226
-----------------------------------
B
back (See go)
background
introduced 8
numbers 10
properties of (See properties)
backgrounds (keyword) (See number of)
baud (property) 151
beep (command) 74
before (preposition) 62
begin...end 53,57
blinking (color constant) 70
borderColor (property)
buttons 196
fields 176
box (effect) 142
break (message) 85,86
browsing 5
built-in functions 28,219-276
buttons
check boxes 78-79,197,198,207
creating 15
introduced 8
layering 10,201,202
messages sent to (See messages)
names 9
placing scripts in 39
properties of (See properties)
referenced by ID 11,201
referenced by name 9,204
referenced by number 10
shadows 206-207
buttons (keyword) (See number of)
-----------------------------------
C
C language programming 297
cache 114,149-150,159
cancel (message) 86-87
________________________________________________________________________
Index 365
________________________________________________________________________
cantDelete (property) 171
background 212
page 209
cantModify (property) 171-172,354
case (control structure) 51,52-54
case sensitivity 16
centered (constant) 26,195
changing disks 117,361
changing the current object 47,154
changing the name of a pad 9,173
character (See chunking)
character constants 25
characters (keyword) (See number of)
charToNum (function) 226-227
check (property) 197-198
check box buttons 78-79,197,198,207
checkBox (constant) 26
checkBox (property) 207,197,198
choose (function) 227
chunk expressions (See chunking)
chunking 59-62
character 60
deleting 107-108
highlighting 120-121
item 61
line 61
nonexistent chunks 62
number of 255-256
word 60
clean (function) 227
clear (keyword) (See query)
clockwise (direction) (See visual)
close (command) 103
closeButton (message) 74,75
closeField (message) 79,80
closePad (message) 86-87
closePage (message) 87
color (property)
buttons 198
fields 176
colors 69-71
by name
black 69
blue 69
brown 69
cyan 69
dark grey 69
green 69
grey 69
light blue 69
light cyan 69
________________________________________________________________________
Index 366
________________________________________________________________________
light green 69
light magenta 69
light red 69
magenta 69
red 69
white 69
yellow 69
numbers 70
of buttons 196,198,199,200
of fields 176,179,180,186
of popup menus 138
on monochrome 71
specifying in PADtalk 69-70
command line 269
commandLine (function) 228
commands
by name 99
defined 14,24
listing 99
sent as messages 34
that send messages 74
comments 18
compact utility 351
compiler errors
listing 277-284
compiling 21
debug option 21-22
compound (function) 228-229
conditional structures (See control structures)
configuration file 354
constants 24-26
by name
centered 26
character 25
checkBox 26
defined 24
down 25
eight 26
empty 25
even 26
false 25,51
fat 26
five 26
formfeed 25
four 26
layer 26
left 26
linefeed 25
listBox 26
nine 26
none 26
numeric 26
________________________________________________________________________
Index 367
________________________________________________________________________
odd 26
off 26
on 26
one 26
pi 25
property 26
quote 25
return 25
seven 26
six 26
space 25
tab 25
ten 26
thin 26
three 26
true 25,51
two 26
up 25
zero 26
containers 41
fields 41
introduced 28
selectedText 45
storage limit 41
variables 42
contains (operator) (See operators)
control structures 51
case 51,52-54
conditional 51
else 51
for 51,56-57
if 51-52
looping 51,54,56-58
repeat 51,55
then 51
until 51,55
while...do 51,56
convert (command) 104-107,274
coprocessor (function) 229
cos (function) 229
counterclockwise (direction) (See visual)
cpu (function) 229
create (function) 230
creating commands
with assembly language (See extensions)
with C (See extensions)
with PADtalk 16-18
ctrlKey (function) 230
currentBackground (function) 231
currentDirectory (property) 151
currentLine (property) 176
________________________________________________________________________
Index 368
________________________________________________________________________
currentObject
function 48,231
object 47
currentPad (function) 232
currentPage (function) 232-233
cursor (property) 152
cursorLoc (property)
as a function 233
as a property 152
cursorX (function) 234
cursorY (function) 234
customizing
menus 89
Open Pad dialog box 241
-----------------------------------
D
dataBits (property) 153
date
as a function 234-235
sort data 140
date formats 104,105
dateItems (keyword) (See convert)
dateTime (keyword) (See sort)
days of the week 107
debugging scripts 21-22
defining properties 137
delay (keyword) 142
delete (command) 107-108
deleteBackground (message) 87
deleteButton (message) 74,75-76
deleteField 79,80
deletePad (message) 88-89
deletePage (message) 88
descending (keyword) 141
destinations 62
dial (command) 108-110
dialog boxes 101,102,262-265
directions (See visual)
directories
changing 151
reading 236
reading current 235
reading files from 242,250
directory (function) 235
dirs (function) 236
diskChange (keyword) 117,361
diskSpace (function) 236
div (operator) (See operators)
divide (command) 111
do (command) 111-112
________________________________________________________________________
Index 369
________________________________________________________________________
doMenu (message) 89
DOS
determining if a file exists 240-241
finding a file's size 242
finding free disk space 236
getting command line parameters 228
getting environment variables 238
getting the current directory 151,235
getting the current drive 237,238
listing files 242,250
running a program 134-136
version 276
DOS path 184
dosVersion (function) 237
down (constant) 25
drip (effect) 142
drive (function) 237
drives (function) 238
-----------------------------------
E
edge types 357
edgeType (property)
buttons 199
fields 178
edit script (command) 112
effect (See visual)
eight (constant) 26
eighth (ordinal) 60
else (keyword) 52
empty 25,42
equivalence with zero 42
end (keyword) 16
environment
(See also HPADNET)
as a function 238
variable 135
even (constant) 26
events 6
exit (command) 23,35
exp (function) 239
exp1 (function) 239
exp2 (function) 240
expressions
chunking 59-62
numeric operators 63-68
extensions 297-345
attaching to a pad 298
callback functions 297,306,310-334
data structures 336-345
example 300,301
function listing 307-309,335
guidelines for writing 298,302
________________________________________________________________________
Index 370
________________________________________________________________________
memory usage and 304-306
object hierarchy 297
parameter block 302-303
scope 297
sharing data with HyperPAD 303-304
structure of 299-301
uses for 297
external handlers and functions (See extensions)
-----------------------------------
F
fact (function) 240
fade (effect) 142
false (constant) 25
fat (constant) (See cursor)
field 41
changing marks in list boxes 157-158
introduced 8,41
list boxes 191-192
messages sent to (See messages)
properties of (See properties)
referred to by ID 11,180-181
referred to by name 9,186
referred to by number 10
text justification 176
fields (keyword) (See number of)
fifth (ordinal) 60
fileExists (function) 240-241
fileOpen (function) 241
files
appending 225
closing 103
creating 230
opening 131,258
reading 131-133
reading list from directory (See directory)
sorting 153
writing 144
files (function) 242
fileSize (function) 242
fileSortMethod (property) 153
fillColor (property)
buttons (199)
fields 179
find (command) 112-114
findFile (function) 243
finding information
with find 112-114
with offset 257
with query 130
with sort 139-141
first (ordinal) 60
________________________________________________________________________
Index 371
________________________________________________________________________
five (constant) 26
floating point numbers 27
floppy disks 361
flow control in scripts (See control structures)
flushCache (command) 114
focus
as a property 154
the object with 47
for (control structure) (See control structures)
formfeed (constant) 25
"found" message 112-114,268
four (constant) 26
fourth (ordinal) 60
freeMem (function) 243
freeSize (function) 244
freezing the screen 156-157
from (preposition) 131-132
fullName (function) 244-245
functions
built-in 28
by name 219
calling 219
defining your own 23-24
examples 24
external (See extensions)
listings 220
returning values 23
sent as messages 219-220
syntax 23-24,219
user defined 23-24
fxshow (command) 115,347-348
-----------------------------------
G
get (command) 116
global (command) 116
global variables (See variables)
go (command) 117-119,361
graphics 115,347-348
graphics cards 245
graphicsCard (function) 245
-----------------------------------
H
handler 22
creating 22
examined 15-17
external (See extensions)
introduced 15
placing in the hierarchy 39
receiving parameters 22
Hayes modem 107
help (message) 90
________________________________________________________________________
Index 372
________________________________________________________________________
hide (command) 120
hiding
buttons 208
fields 192-193
menu bar 218
message box 215
objects 120
status bar 218
tool box 217
hierarchy (See object hierarchy)
highlighting (See hilite)
hilite (command) 120-121
hilite (property)
buttons 200
fields 179
hiliteColor (property)
buttons 200
fields 180
hiliteIfFocus (property)
buttons 201
fields 180
Home pad
going there 117
in the hierarchy 30-32
horizontal (direction) (See visual)
HPAD.INI configuration file 355
HPADNET environment variable 135,243,355
hsplit (effect) 142
HyperPAD (keyword) 35
-----------------------------------
I
ID (property)
background 212
button 201
fields 180-181
page 209
ID 11
idle (message) 90-91
if...then...else (control structure) 52
in (keyword) 248
in1 (function) 249
insertPoint (property) 181
installation on a network 353-354
intercepting menu commands 89
intercepting keystrokes (See keyPress)
intercepting messages 22,32-33,73-74
interrupting script execution 85-86
into (preposition) 62
is (operator) (See operators)
is in (operator) (See operators)
is not (operator) (See operators)
is not in (operator) (See operators)
________________________________________________________________________
Index 373
________________________________________________________________________
isSound (function) 246
issuing a menu command 89
it 43
with answer 101
with ask 102-103
with get 116
with read 131-133
item (See chunking)
items (keyword) (See number of)
-----------------------------------
J
justification in fields 176
-----------------------------------
K
key (function) 246-247,291
keyboard
handling 291
redefinition 91-92
keycodes
keys understood only by HyperPAD 295
listing 291-295
keyPress (message) 74,76,79,80,91-92,291
keystroke piping 124,133-134
-----------------------------------
L
language support 297
last (ordinal) (See ordinals)
launching DOS programs (See running programs)
layer (constant) 26
layer (property)
buttons 201-202
fields 182
move closer 201
send farther 201
layers 10
as a constant 168
left (constant) 26,195
leftString (function) 247
length (function) 248
line (See chunking)
lines (keyword) (See number of)
listBox (constant) 26,191
literals 27
ln (function) 248
ln1 (function) 249
local variables (see variables)
location (property)
buttons 202
fields 182
message box 215
tool box 217
________________________________________________________________________
Index 374
________________________________________________________________________
lockMessages (property) 154-155
lockRecent (property) 156
lockScreen (property) 156-157
lockText (property)
buttons 202
fields 183
long (keyword) (See convert)
longDate (function) 249
longFiles (function) 250
longID (property)
background 212
buttons 203
fields 183
page 209
longName (property)
background 213
buttons 184
pad 172
page 210
longTime (function) 250
loops (See control structures)
lower (function) 251
-----------------------------------
M
mark (message) 79,81
markerAttr (property) 157-158
markerChar (property) 158
markLines (property) 184-185
max (function) 251
maxDirtyPages (property) 149-150,159
me (object) 47,49
memory management 243
menu bar (object) 8,218
menus
creating (See popup)
selecting a command from 89
message box (object) 45,216
sending messages 33
messages 73
changing the path 37
from scripts 33
identifying the initial receiver 48
listings 74,79,85
normal 32-33
notification 32
passing 23,34,36
path 30
received by objects
receiving 34
sending (See send)
sending 30
sent by commands 34,74
________________________________________________________________________
Index 375
________________________________________________________________________
sent to a button 74
sent to a field 79
sent to page 85
system 32
translated from events 5,96-97
travel 30
types 32-34
(See also hierarchy)
middle (ordinal) (See ordinals)
min (function) 252
mod (operator) (See operators)
modem (property) 159
modem commands 108-110
months of the year 106
mouse shape 160-161,162
mouse (property) 160
mouseAttr (property) 160-161
mouseButton (function) 252
mouseChar (property) 162
mouseClick (function) 253
mouseDown (message) 74,76,79,81,92
mouseEnter (message) 74,76-77,79,81
mouseExists (function) 253
mouseLeave (message) 74,76,79,82
mouseLoc (function) 254
mouseStillDown (message) 75,77,79,82,92
mouseUp (message) 75,77,79,82,92
mouseWithin (message) 75,77,79
mouseX (function) 254
mouseY (function) 254
mover utility 349
msg (see message box)
multiply (command) 121,265
music 123
-----------------------------------
N
name (property)
background 213
button 204
field 186
pad 173
page 210
nameColor (property) 186
namePosition (property) 187
navigation 117-119
negation 63
networks 172,353-356 (See also cantModify)
newBackground (message) 92
________________________________________________________________________
Index 376
________________________________________________________________________
newButton (message) 75,77
newField (message) 79,82
newPad (message) 93
newPage (message) 93
next (ordinal) 118
nine (constant) 26
ninth (ordinal) 60
noHayes (See dial)
none (constant) 26
noSound (command) 122
not (operator) (See operators)
"not found" message 112-114,268
Novell (See networks)
number of (function) 255-256
numberFormat (property) 162-164
numeric (keyword) 140
numeric constants 26
numeric precision (See operators)
numToChar (function) 256
-----------------------------------
O
objects
hierarchy 29,31
layers 10
referencing 8
by ID 11
by name 9
by number 9
changing the name of 9
introduced 7-8
tabbing order 168
types 7
background 8
button 8
field 8
pads 7
page 8
odd (constant) 26
of (preposition) (See chunking)
off (constant) 26
offset (function) 257
on (constant) 26
one (constant) 26
opaque (constant) 191,207
open (function) 131,258
openButton (message) 75,78
openField (message) 79
openFile (function) 241
opening files (See create,append,open)
openPad (message) 93
openPage (message) 94
________________________________________________________________________
Index 377
________________________________________________________________________
operators 63-67
by name
& (concatenate) 64
&& (concatenate with space) 65
( ) (grouping) 63
* (multiply) 64
+ (plus) 64
- (minus) 64
- (unary minus) 63
/ (divide) 64
< (less than) 65
<= (less than or equal to) 65
<> (not equal) 66
= (equal) 66
> (greater than) 65
>= (greater than or equal to) 65
^ (exponent) 63
contains 66
is 66
is in 65
is not 66
is not in 66
precedence of 67
or (operator) (See operators)
ordinals
any 60
eighth 60
fifth 60
first 60
fourth 60
last 60
middle 60
ninth 60
second 60
seventh 60
sixth 60
tenth 60
third 60
otherwise (keyword) 53
out (direction) (See visual)
-----------------------------------
P
pad
compacting 351
creating 14-15
getting information 350
properties of (See properties)
protection (see userLevel,cantModify,passwordOnly)
referencing 8
saving to disk 150
padinfo utility 350
padSize (function) 259
________________________________________________________________________
Index 378
________________________________________________________________________
PADtalk
case sensitivity 16
compare with Pascal 54,58
introduced 6
writing statements 17
page
introduced 8
messages sent to (See messages)
properties of (See properties)
referred to by number 10
page stack 124-125,127-128
pages (keyword) (See number of)
paintAttr (property) 164
param (function) 22,259-260
paramCount (function) 22,260
parameter variables (See variables)
parameters 22,259,260,261
variable number of 22
params (function) 22,261
parity (property) 165
part (keyword) 113
pass (command) 23,34,36
passing messages 36
passwords 169, 173
passwordOnly (property) 173
pathnames 244-245
pause (keyword) 135
peel (effect) (See visual)
phone dialing 108
pi (constant) 25
picture file formats 347
play (command) 122-123
playback (command) 133,295
pm (keyword) (See convert)
pop page 124-125,127,128
popup (function) 262-265
position (constant) 168
precedence (See operator precedence)
precision (See numberFormat)
previous (ordinal) 118
print (command) 125-127
printDevice (property) 165
printer (property) 166
printerTranslation (property) 166-167
printing 125-127
pages 125-127
scripts 21
product (function) 265
programDirectory (keyword) 135
proper (function) 265
________________________________________________________________________
Index 379
________________________________________________________________________
properties
by name 145
constants 26
field 175
global 146,149-170
introduced 28
listings 146
of backgrounds 147,212-214
of buttons 147,194-208
of fields 148,175-193
of pads 146,171-174
of pages 147,209-211
of the menu bar 148,218
of the message box 148,215-216
of the status bar 148,218
of the tool box 148,217
retrieving 116
scrollable 189
pulse (keyword) (See dial)
push (command) 127-128
push page (command) 127-128
push recent (command) 128
put (command) 129
-----------------------------------
Q
quad (effect) 142
query (command) 130
query clear (command) 130
quit (message) 94
quote (constant) 25
-----------------------------------
R
random (function) 266
read (command) 131-133
read-only pads 354
recent (ordinal) (See go)
record (command) 133-134,295
rectangle (property)
button 204-205
field 187-188
recursion 155
referring to
backgrounds 9-11
buttons 9-11,201,204
fields 9-11,180-181,186
pages 9-11,209,210
the currently executing object 49
the initial receiver of a message 48
the object with the focus 47
________________________________________________________________________
Index 380
________________________________________________________________________
removing
leading and trailing spaces 275
non-printable characters 227
script text 350
repeat...until (control structure) 55
repeatChars (function) 267
replace (effect) 142-143
resources (See extensions)
result (function) 267-268
with append 225
with create 230
with open 258
with query 130
with read 132
with run 135
resume (message) 94,95
return (constant) 25
return (statement) 23
right (constant) 195
rightString (function) 268
round (function) 269
run (command) 134-136
running other programs
fxShow 115
messages sent 96
with run command (See run)
runtime errors 21-22
listing 285-290
-----------------------------------
S
screenHeight (function) 269
screenWidth (function) 270
script (property)
background 214
buttons 206
fields 188-189
pad 174
page 211
Script Editor 13
editing 19
editing scripts 19
exiting 14
keyboard usage 18-19
navigation 18
Scripts
accessing 13
compiling 21
components 22
copying text 20
cut text 20
editing 19
________________________________________________________________________
Index 381
________________________________________________________________________
find 20
paste text 20
removing script text 350
search & Replace 20
selecting text 19
scrollable (property) 189
scrolling (constant) 191
second (ordinal) 60
seconds (function) 270-271
select (message) 75,78-79,83
selectedText (property) 41,45,167
send (command) 37-38,136-137
serial port (See modem, stopBits,dataBits,parity,baud,dial)
set (command) 137
setDefaultPopupColors (command) 138
setPopupColors (command) 138
seven (constant) 26
seventh (ordinal) 60
shadow (property) 206-207
sharing pads 354
shiftKey (function) 271
short (keyword) (See convert)
show (command) 139
Show Partner F/X 115,347-348
showing
buttons 208
fields 192-193
menu bar 218
message box 215
objects 120
status bar 218
tool box 217
showName (property)
buttons 207
fields 190
simulating keystrokes
using keyPress (See keyPress)
using record and playback 133-134
sin (function) 272
six (constant) 26
sixth (ordinal) 60
size
buttons 204-205
fields 187-188
sort (command) 139-141
sound (command) 141
space (constant) 25
specifying a piece of data 59-62
speeding up scripts 154
spiral (effect) (See visual)
sqrt (function) 272
________________________________________________________________________
Index 382
________________________________________________________________________
square root (function) 272
standard deviation (See stdev)
startLine (property) 190-191
startUp (message) 95
status bar 8,218
stdev (function) 272
step (keyword) 56-57
stopBits (property) 168
stopping script execution 35
strings 27
concatenation 64-65
finding within other strings 257
highlighting 120-121
in quotes 27
searching for 112-114
strip utility 350-351
stripping text from script 350-351
style (property)
button 207
fields 191-192
subroutines
substitute (function) 273
subtract (command) 142
sum (function) 273
suspend (message) 95
system messages (See messages)
-----------------------------------
T
tab (constant) 25
tabbing (property) 168
tan (function) 273
target (object) 47,48
function 48,274
telephone (See dial)
ten (constant) 26
tenth (ordinal) 60
text (sort data) 140
text data (See strings)
text files (See files)
the (preposition) 17
then (keyword) 51-52
thin (constant) (See cursor)
third (ordinal) 60
this (keyword) 49
three (constant) 26
time (function) 274
time
converting 104-107,274
formats 104,105
function 274
measuring 270-271
________________________________________________________________________
Index 383
________________________________________________________________________
to (preposition)
with for 56-57
with go 117-118
with set 137
tone (keyword) (See dial)
tool box (object) 8,217
top (direction) (See visual)
transparent (constant) 191,207
trim (function) 275
true (constant) 25,51
trunc (function) 275
two (constant) 26
-----------------------------------
U
unmark (message) 79,84
until (keyword) 55-56
up (constant) 25
upper (function) 276
userLevel (property) 169-170
utilities 349-352
compact 351
mover 349
padinfo 350
strip 350-351
-----------------------------------
V
value (property) 192
variables 42-44
capacity 42
global 44,116
internal representation 43
local 43
maximum size 42
parameter 44
scope 43-44
variance 276
version (function) 276
vertical (direction) (See visual)
visible (property)
button 208
fields 192-193
menu bar or status bar 218
message box 215
tool box 217
with hide command 120
with show command 139
visual (command) 142-143
visual effect (See visual)
vsplit (effect) (See visual)
________________________________________________________________________
Index 384
________________________________________________________________________
-----------------------------------
W
wait (command) 143
weave (effect) (See visual)
while...do 54
whole (keyword) 113
width (property)
message box 216
with (preposition)
with answer 101
with ask 102-103
with dial 108-110
with go 117-118
with run 134-136
with visual 142-143
withEdge (property)
buttons 208
fields 193
word (keyword) (See chunking)
words (keyword) (See number of)
write (command) 144
-----------------------------------
Z
zero (constant) 26
_______________________________________________________________________
Preface 1
________________________________________________________________________
PREFACE
ABOUT THE PADTALK REFERENCE GUIDE
This manual is a complete reference to the PADtalk scripting language,
as well as a technical guide to the HyperPAD authoring environment.
The first three chapters are for the beginning PADtalk programmer. They
explain how to script using the Script Editor, how scripts receive
messages via handlers and functions, how to write PADtalk statements,
and how messages are passed between objects.
The next six chapters present advanced topics for the intermediate
PADtalk programmer including containers, flow control structures,
chunking expressions, numeric operators, and colors.
The last four chapters contain full descriptions of each PADtalk
message, command, property, and function.
CHAPTER SUMMARIES
CHAPTER ONE: WHAT'S REALLY HAPPENING?
A look behind the scenes in HyperPAD, including the different components
of the HyperPAD authoring environment and an introduction to the PADtalk
scripting language.
CHAPTER TWO: PADTALK SCRIPTS
How to use the Script Editor to write scripts and PADtalk statements.
CHAPTER THREE: THE OBJECT HIERARCHY
A look at HyperPAD's object hierarchy, the path along which messages are
passed.
CHAPTER FOUR: CONTAINERS
The places in HyperPAD where values can be stored.
CHAPTER FIVE: THE CURRENT OBJECT
Detailed discussion of HyperPAD facilities for referencing special
objects like the object with the focus, the object that initially
receives a message, and the object whose script is executing.
_______________________________________________________________________
Preface 2
________________________________________________________________________
CHAPTER SIX: CONTROL STRUCTURES
How to control the flow of execution of the statements within a script
through the use of control structures.
CHAPTER SEVEN: CHUNK EXPRESSIONS
How to work with chunk expressions, special PADtalk constructs that
allow you to specify any piece of information in a container.
CHAPTER EIGHT: NUMERIC OPERATORS
How to add complex expressions to your scripts.
CHAPTER NINE: COLORS
How colors are referred to in HyperPAD and displayed on the screen by
your computer.
CHAPTER TEN: MESSAGES
A complete reference to the messages generated by HyperPAD, including a
detailed description of each message.
CHAPTER ELEVEN: COMMANDS
An alphabetical listing of every built-in command available in PADtalk.
Each command's description includes its syntax and examples.
CHAPTER TWELVE: PROPERTIES
The full list of HyperPAD properties, are used to control the appearance
and behavior of objects. The properties of buttons, fields, pages,
backgrounds, pads, the message box, the menu bar, the status bar, and
the tool box are described.
CHAPTER THIRTEEN: FUNCTIONS
A complete list and discussion of HyperPAD's built-in functions.
_______________________________________________________________________
Preface 3
________________________________________________________________________
NOTATION CONVENTIONS
As you read this manual, keep in mind the following notational
conventions.
All PADtalk words are displayed in courier type, like: openPage,
graphicsCard(), and sort.
Words that appear within angle brackets (< >) are required to complete
the PADtalk statement. For example, <filename> indicates that you must
supply a filename.
Words that appear within square brackets ([ ]) are optional parameters
which may be included if you need them.
PADtalk is not case sensitive. For example OpenPage, openPage, and
openPage refer to the same word. In this manual, however, all PADtalk
language elements begin with a lowercase character. Any elements
consisting of more than one word also begin with a lowercase character;
any word within a language element, however, is capitalized. Examples:
openPage, graphicsCard, insertPoint.
________________________________________________________________________
Chapter 1: What's Really Happening 5
________________________________________________________________________
CHAPTER ONE: WHAT'S REALLY HAPPENING?
Until now, you may have only used HyperPAD and its applications (the
pads) to simplify your computing environment. Pad users do not
necessarily need to understand the inner workings of HyperPAD. They just
type into fields and push buttons.
As a pad author, you will explore the internal workings of the Browser
and learn to control your applications by writing scripts using the
PADtalk scripting language. You will also be introduced to the message
passing system which controls execution of these scripts.
Let's take a quick look at a pad from an authoring perspective.
Each pad is made up of a number of screens which the user interacts with
by pressing keys, moving the mouse, and clicking mouse buttons. Each of
these user-initiated events is translated into a message and sent to the
objects that make up HyperPAD. For example, if you select a button by
pressing ENTER, the select message is sent to that button.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 1: What's Really Happening 6
________________________________________________________________________
When an object receives a message, one of two things will occur. The
object will either ignore the message because you haven't defined any
actions to be executed when that message is received, or the object will
execute preassigned actions. As you will learn, an object only performs
actions defined in its script.
WHAT IS PADTALK?
As a pad author, you will use PADtalk scripts to define the actions that
occur when objects receive certain messages. For example, when the Home
button is selected by pressing ENTER, the select message is sent to the
Home button, telling it that it has been selected. Since the button's
script understands this message, the statements in the script are
executed and the Home pad is opened and displayed.
You will create your scripts using the HyperPAD language called PADtalk.
Unlike most programming languages, it is understandable and English-
like. Even non-programmers can understand and use PADtalk.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 1: What's Really Happening 7
________________________________________________________________________
WHAT DO YOU USE IT FOR?
Some general types of applications you can create with PADtalk and
HyperPAD are:
0 PC interfaces for launching DOS and Windows programs
0 Customized DOS shells for managing files and directories
0 Interactive computer-based training systems
0 Information bases
0 Software prototypes
0 Front ends for corporate information systems
In order to create your own applications using PADtalk, you must
understand objects, their relationship to each other, message passing,
and the object hierarchy. Therefore, it is very important to understand
the material in this chapter and the two chapters that follow: "PADtalk
Scripts" and "The Object Hierarchy."
Before exploring the object hierarchy, we will discuss the family of
HyperPAD objects and introduce you to its members.
OBJECTS
Generally, an object is something that receives and responds to
messages. All HyperPAD objects have properties that allow you to modify
their visual appearance and behavior. You can alter the properties of
objects, including object scripts, with the Info dialog boxes accessible
through the Objects menu.
Buttons, fields, pages, backgrounds, pads and even HyperPAD itself are
objects, receiving and passing messages. Messages travel between objects
along a predetermined path called the object hierarchy. Below, we will
discuss the objects, the hierarchy into which they're arranged and the
HyperPAD environment.
PAD
The word "pad" is an acronym for Personal Application Design. Pads are
the basic HyperPAD file structure. All applications designed with
HyperPAD, several dozen of which came in your package, are pads. Each
pad is made up of at least one background and one page.
________________________________________________________________________
Chapter 1: What's Really Happening 8
________________________________________________________________________
BACKGROUND
Backgrounds contain those elements (buttons, fields, text, and paint)
that recur on numerous pages throughout the pad. For example, if you
want your pad's users to be able to quit from every page in your pad,
you may place a Quit button on the background(s) in that pad.
Backgrounds can also serve as templates for pads, defining where
information is placed and what the pad looks like, since each page is
overlaid on top of a background.
PAGE
Pages form the bulk of a pad and in general display the pad's
information. Pages contain elements (text, paint, buttons, and fields)
that are unique to that page. Furthermore, pages contain all the text
from both background and page fields.
FIELD
A field is a container used to display or retrieve textual information.
Although each field is placed on its own transparent layer, it "belongs"
to either a page or a background. Regardless of where the field is
located, the information it holds is always stored on the page.
BUTTON
Buttons are objects that respond to user input by executing some pre-
defined action(s). Each button is placed on its own layer, which belongs
to either a page or a background.
OTHER HYPERPAD OBJECTS
HyperPAD also contains the following objects: menu bar, status bar,
message box and tool box.
HOW TO REFER TO OBJECTS
When writing scripts, you can refer to all objects, except pads, by
name, number, or ID. Pads must be referred to by their DOS filename. In
the sections below, each method is described.
QUALIFYING OBJECTS
When referring to objects, you may need to specify where they are in
your pad. For example, if you want to change the color of a button, you
must specify whether the button is on the page or the background:
________________________________________________________________________
Chapter 1: What's Really Happening 9
________________________________________________________________________
set the color of page button 1 to red;
set the color of background button 1 to red;
If you do not specify the whereabouts of a button or field, HyperPAD
assumes you want the one on the background. Thus, the following
statements refer to the same object:
set the color of field 1 to red;
set the color of background field 1 to red;
When referring to a page, you may need to specify what background the
page is on:
go to page 1;
go to page 1 of background 2;
If you do not specify which background a page belongs to, HyperPAD
assumes you want the one nearest the front of the pad. For example,
"page 1" and "page 1 of background 2" are not necessarily the same page.
OBJECT NAMES
Although names are optional for all objects except pads, it is usually
helpful to give your objects a name that describes their purpose. That
way, it's easy to refer to them from within a script.
To modify an object name in the Object Info dialog box:
1. Select the Pad, Bkgnd, Page, Button, or Field Info command from the
Objects menu.
2. Highlight the Name text box and type in the object's name.
3. Select the << Ok >> button.
Once a name is assigned to an object, you can use that name in a script.
For example:
go to pad "C:\MYPAD.PAD";
set the color to page button "Last Name" to red;
put "wow" into page field "Expression";
go to page "Preferences";
go to page "Setup" of background "Options";
Note: When using an object's name in a script, you must enclose it in
quotation marks.
________________________________________________________________________
Chapter 1: What's Really Happening 10
________________________________________________________________________
OBJECT NUMBERS
Each object within a pad can be referred to by a number based on its
position relative to the other objects in its class. For example, page 1
is the first page in a pad. As you edit your pads by copying, cutting,
pasting, and creating pages, the numbers of the pages will change to
reflect their new positions.
Backgrounds are assigned an object number based on the order of their
creation. For example, background 1 was the first background created
when you selected New Pad. Background numbers change only if you delete
a background from a pad by deleting each page belonging to that
background.
Buttons and fields are assigned object numbers corresponding to their
layer on either the page or background. The object layer closest to the
page or to the background is assigned the number 1 (i.e. page field 1,
page button 1). As you use the Cut, Copy, Bring Closer and Send Farther
commands, the object numbers assigned to the buttons and fields are
altered to reflect their new positions.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Since object numbers change constantly throughout pad creation, using
them to refer to objects within a script is not the most reliable
method. Determine an object's number by opening the Object Info dialog
box for that object.
________________________________________________________________________
Chapter 1: What's Really Happening 11
________________________________________________________________________
Examples of objects referred to by their number:
set the color of page button 1 to red;
set the color of field 1 to blue;
go to page 137;
go to page 3 of background 4;
OBJECT ID NUMBERS
When an object is created (this includes being copied, pasted and
cloned) HyperPAD assigns it a unique identification number. An object's
ID number cannot be altered and is never duplicated. Using this number
to refer to an object in a script is foolproof because it will never
change.
You can retrieve an object's ID number by opening the Object Info dialog
box.
Examples of objects being referenced by their IDs:
set the color of page id 5 to red;
put "wow" into field id 3;
go to page id 45;
go to page id 4 of background id 5;
go to background id 1;
READY TO SCRIPT
Now that you have a general introduction to HyperPAD objects, we will
introduce you to HyperPAD scripts.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 147
________________________________________________________________________
CHAPTER 9: ADDING AND MANIPULATING INFORMATION
This chapter describes the database-management capabilities of HyperPAD
and how to work with existing database pads. After introducing some of
the basic concepts--such as how to browse in pads and how to cut, copy,
and delete information stored in text fields--this chapter will explain
how to share information with other programs, such as dBASE IV and Word
Perfect. Finally, we'll take a quick look at the process of building
hypertext applications with HyperPAD. As you'll see, a hypertext
application can contain huge volumes of information, but in a structure
unlike that used to store more traditional types of computerized data.
We'll assume that you're familiar with the basic skills required to use
HyperPAD. If you're unable to choose commands from menus, work with
dialog boxes, move the highlight around the screen with the TAB and
SHIFT+TAB keys, and open pads from the File menu, please take a few
minutes to review the material presented in Chapter 2, "Fundamentals of
Using HyperPAD," before continuing.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 148
________________________________________________________________________
MANAGING INFORMATION WITH HYPERPAD
One of the best uses for your personal computer is managing the
information you need every day at work and at home. The information
explosion has easily outpaced our ability to keep track of the specific
information that matters. With their unsurpassed capacity for storing
and retrieving all kinds of information, today's personal computers have
become indispensable to anyone who works with information.
HyperPAD is not meant to be a high-powered database-management system,
capable of managing the strategic information of a huge business
enterprise. But it is in fact well suited for the user who needs a
better handle on personal information, such as names, addresses, to-do
lists, time-management records, reminders, and details of all kinds.
HOW HYPERPAD HELPS YOU MANAGE INFORMATION
HyperPAD is an environment from which you can launch any of your MS-DOS
or Microsoft Windows programs. Thanks to HyperPAD, you may have stopped
using the DOS prompt altogether by now, choosing to manage your
programs, documents, spreadsheets, and other files with HyperPAD's DOS
Shell.
In the past, you may have come across a piece of information that you
wanted to enter into your computer without exiting HyperPAD to launch
another program. Perhaps you jotted it down on a legal pad or scribbled
it on a Post-It note and stuck it to your computer screen. Later, when
you needed the information, maybe it was right at hand.
Or maybe not. Maybe your reluctance to take the time to run another
program forced you to lose a vital piece of information or to waste
valuable time tracking it down. The best thing about HyperPAD's
database-management capabilities is their convenience. They're always
there . . . just waiting for you to press a button . . . ready to spring
into action.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 149
________________________________________________________________________
HYPERPAD TOOLS FOR MANAGING INFORMATION
HyperPAD contains several different tools for managing information.
Before you jump right in and begin adding new information to your pads,
please take a few moments to review the concepts discussed in this
subsection.
PADS
As you know, pads are the basic type of file that HyperPAD uses to store
your work. The simplest data-management tasks can be accomplished within
the structure of a single pad. For example, you can use the Phone pad by
itself--adding names, addresses, and phone numbers--and then look up
this information later. The Daily Planner system, on the other hand,
shows off the benefits of pads that work together.
PAGES, BACKGROUNDS, AND FIELDS
Any information in a pad is placed there by the user. The basic
container of information in HyperPAD is the field, which, as you saw
earlier in the HyperPAD User's Guide, is a rectangular area of the
screen in which you can type and edit.
The Phone pad is a good example of an application designed by the pad
author to allow you to add and manage information. If you'd like to try
out some of the concepts presented in this chapter, open the Phone pad
(or a copy of the Phone pad, if you're eager to experiment without any
risk to existing information) and work with HyperPAD as we go along. (If
you plan to build your own database pads or modify the ones that came in
your package, there are many important concepts you can learn by
examining the pads that came with HyperPAD. In Chapter 14, you will find
a detailed discussion of page and background fields.)
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 150
________________________________________________________________________
ORGANIZING AND LOCATING INFORMATION
This section tells you how to manage information in an existing database
pad. In the course of this section, you will learn how to:
0 Browse though a pad and its stored information
0 Add information to a field
0 Erase information from a field
0 Copy information from one field to another
0 Search for information stored in a pad
0 Sort records of data by one or more background fields
0 Query a database so that only selected pages are displayed
BROWSING INFORMATION IN PADS
Everyone looks up information. When you need a phone number, you can
just pick up a phone book and page through it until you find the name
and phone number you need.
HyperPAD is very similar. First, use the Open command from the File menu
(ALT+F, O) to find a database pad that stores the information you want
to browse. Once you arrive, just press PGUP to move backward or PGDN to
move forward through the pages in your pad. To move to the first page in
the pad, press CTRL+PGUP. To move to the end of the pad, press
CTRL+PGDN.
If you're using a mouse, look around on the screen for buttons to take
you places. In pads like Phone and Index, there are buttons centered at
the bottom of your screen that you can point to and click on to take you
to the previous and next pages in the pad.
Next, you'll learn how to add and change information in pads.
ADDING AND EDITING INFORMATION
Keeping your important records up to date is easy when you use a
personal computer to manage information. If you're a saleswoman and you
receive a phone referral, press a few keystrokes and the name is on your
PC. If one of your best customers moves out of your territory, press a
different key and his or her name is removed from your records.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 151
________________________________________________________________________
HyperPAD makes it easy to add information to pads. Just keep one
important principle in mind: You should store each individual record of
data on a separate page.
For example, a customer named Abbott should be on one page, a customer
named Beckinridge on the next page, and an attorney named Zachary on a
page somewhere near the end of the pad.
To add a new, blank page to a pad:
Press F3.
That's all there is to it! (Since you'll add new pages so often,
HyperPAD offers this shortcut to allow you to add a page with little
effort. A slightly longer method would be to choose the New Page command
[ALT+E, N] from the Edit menu.)
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Now that you have a new page to work with, you're ready to begin
entering information. (Don't worry if you make mistakes--you'll learn
how to correct them in this section.)
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 152
________________________________________________________________________
To move to a field and then enter information:
1. TAB to the field.
2. Press F2 to remove the highlight from the field so you can begin
typing.
3. Begin typing into the field.
If you make a mistake, just press BACKSPACE to erase it.
4. To add information to another field, repeat steps 1-3 above.
After entering information into a field, you may decide to delete it or
change it in some way. A friend's phone number may have changed, or
perhaps you made a typing mistake when you first entered the record into
your database.
To delete information from a field:
1. TAB to the field.
2. Press F2 to unhighlight the field.
3. Use the arrow keys to move to the first character you want to
change.
4. Hold down the SHIFT key while you press one of the arrow keys.
You'll know that the text is selected because text that's selected
becomes highlighted.
5. When you've selected the text you want to delete, press DEL.
HyperPAD erases the selected text from the field.
Use a similar procedure to copy text from one field to another. Instead
of pressing DEL, you'll use the Copy Text and Paste Text commands, both
found on the Edit menu, to copy and then paste the selection.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 153
________________________________________________________________________
To copy text from one field to another:
1. TAB to the field.
2. Press F2 to unhighlight the field.
3. Select the text you want to copy, using the technique described in
the previous procedure.
4. When you've selected the text you want to copy, select Copy Text
from the Edit menu. (The shortcut for Copy Text is CTRL+C.)
5. TAB to a different field.
6. Select Paste Text from the Edit menu. (Or use a shortcut--CTRL+V or
SHIFT+INSERT.)
HyperPAD pastes the selection into the field.
You'll often copy information from one field to another. Keep in mind
that you can copy information from a field to:
0 A field on the same page in the same pad
0 A field on a different page in the same pad
0 A field in an entirely different pad
In the two previous procedures, you learned one way to select text. A
block of selected text can be as small as one character or as large as
the whole field. Since selecting text is something you'll do so often,
here's a table with shortcuts you can take when working with selected
text.
Action: Result:
------------------------------------------------------------------------
SHIFT+left/right arrow keys Selects one character at a time.
CTRL+SHIFT+left arrow key Selects the word to the left of the cursor
CTRL+SHIFT+right arrow key Selects the word to the right of the
cursor
Point to a word and Selects a word with the mouse
double-click
Point to a line, press Selects a line with the mouse
SHIFT, then double-click
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 154
________________________________________________________________________
Before learning how to search for information in a pad, you may want to
review the following table of navigation keys that help you quickly move
around pages and fields.
Press this key: To:
----------------------------------------------------
TAB Go to the next field
SHIFT+TAB Go to the previous field
F2 Start editing a field
Arrow keys Move the cursor within a field
ENTER Insert a new line
HOME Go to the start of a line in the field
END Go to the end of a line in the field
CTRL+HOME Go to the first character in the field
CTRL+MINUS Go to the first character in the next word
CTRL+PLUS Go to the first character in the previous word
PLUS (keypad) Go to the next portion of text in a field
MINUS (keypad) Go to the previous portion of text in a field
The following keystrokes delete text without requiring you to select it:
Press this key: To:
-------------------------------------------------------
DEL, BACKSPACE Delete one character at a time
CTRL+D Delete an entire line
CTRL+DEL Deletes from the cursor to the end of the line
CTRL+BACKSPACE Deletes the word to the left of the cursor
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 155
________________________________________________________________________
SEARCHING FOR INFORMATION
After you've entered and edited information in one of your pads, you
still haven't done much more than would be possible with an electric
typewriter. Your information is neatly arranged so anyone can read it.
However, when you use HyperPAD's tools to search for information in
pads, you move beyond mere typing and begin to tap the PC's potential
for information management.
This section explains how to use two of the commands on the Database
menu--Find and Query--to hunt down the information you need.
If you had to press PGUP and PGDN repeatedly to look for a specific
piece of data in a pad, you'd soon become frustrated and annoyed with
your PC. Fortunately, HyperPAD provides basic database functions that
let you quickly find names and phrases in your pads.
Use the Find command whenever you want HyperPAD to locate a word or
phrase and take you immediately to the page it's on. HyperPAD even
highlights the word or phrase on the screen. If you want, you can then
press a single keystroke and HyperPAD jumps to the next occurrence of
the word or phrase.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 156
________________________________________________________________________
To find information in a pad:
1. Select Find from the Database menu (ALT+D, F).
HyperPAD opens the message box and prompts you for the information
necessary to carry out your search.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
2. Type the word or phrase you want HyperPAD to find.
3. Press ENTER.
HyperPAD takes you to the first occurrence of the word or phrase,
changing pages if necessary.
4. To tell HyperPAD to take you to the next occurrence, press ENTER.
Press ENTER repeatedly to view every occurrence of the word or phrase in
the pad.
5. To close the message box, press F4.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 157
________________________________________________________________________
HOW HYPERPAD FINDS INFORMATION
HyperPAD begins its search with the fields on the current page, starting
with background fields and then looking in page fields. If it doesn't
find what it's looking for, it moves on to the next page, searching
background fields first and then page fields.
The search continues in this way until each field in the pad has been
searched. If HyperPAD arrives back at the original page without finding
the word or phrase, it will beep--a signal that the word or phrase is
not in any field in the pad.
Notes:
When HyperPAD finds the text it's looking for, it highlights the text
for you. If you begin typing immediately after a successful Find
command, you will replace the found text with whatever you type.
After you use the Find command, the message box remains on-screen. To
move the cursor back into the message box, press ALT+F4. If you want,
type a different find statement into the message box and press ENTER to
execute the statement. For a complete discussion of the many things you
can do with the message box, see Chapter 15 in this User's Guide.
SPECIAL TYPES OF SEARCHES
As you know, when you choose the Find command, HyperPAD places the
cursor in the message box and waits for you to enter the text you want
to find. If you prefer, you can edit the find command before pressing
ENTER. By changing the syntax of the Find command before pressing ENTER,
you can change the results of the command.
First, you can restrict the search to a single background field, as in
the following example:
find "New York" in field "City"
You can also tell HyperPAD to search for an entire word and to bypass
any occurrences of the text within another word. For example, the
statement
find whole "Law"
will find "Law" in the title "L. A. Law," but the same statement will
not find "law" in the sentence "My wife is a lawyer."
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 158
________________________________________________________________________
Finally, you can instruct HyperPAD to search for one of many items.
For example, the statement
find "New York", "Los Angeles", "Seattle"
will cause HyperPAD to search for "New York" or "Los Angeles" or
"Seattle" as it moves through the fields in your pad.
For a complete discussion of the Find command, see Chapter 11 in the
PADtalk Reference Guide.
USING THE QUERY COMMAND
When using a pad that contains a large number of pages, it sometimes
helps to restrict your work to a limited set of pages. For example, if
you're using HyperPAD to keep records pertaining to contract management,
you might want to work with only those pages describing contracts worth
$250,000 or more.
The Query command allows you to specify criteria that pages must match,
excluding from your view those pages that don't match. Using the Query
command, you could display only those customers in the Phone pad whose
offices are in Minnesota or select only those individuals who own a
certain type of life insurance policy.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 159
________________________________________________________________________
To query a pad:
1. Select Query from the Database menu (ALT+D, Q).
The Query Criteria dialog box, shown here, is displayed.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
2. TAB into the Operator column and move to a row containing a field
that will be part of your query.
3. Press SPACE repeatedly to select one of the operators from the
following table:
Operator: Page included if the value is:
-------------------------------------------------------
is Found in the specified field
is not Found in the specified field
< Less than the value of the specified field
> Greater than the value of the specified field
<= Less than or equal to the value of the specified field
>= Greater than or equal to the value of the specified field
is in Contained somewhere within the text of the field
is not in Not contained somewhere within the text of the field
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 160
________________________________________________________________________
4. After selecting an operator for a field, TAB into the Value column
and enter a value against which the content of the background field will
be compared.
5. Repeat steps 3 and 4 for each background field you want to include
in your query.
6. Once you have finished selecting operators and entering values into
the Query Criteria dialog box, select <<Ok>> to begin the query.
Notes:
HyperPAD displays only the names of the background fields in the Query
Criteria dialog box. You cannot use the values of page fields in your
queries.
If you make a mistake when filling out the Query Criteria dialog box,
select <Clear>. HyperPAD will remove all specified values.
By leaving <not included> as the value of a field, you are in effect
telling HyperPAD to ignore a given field when the query is carried out.
SORTING INFORMATION
After you build a database pad with more than a few pages, you'll
probably find yourself wishing you could group certain pages together.
Let's say you're using the Project pad to keep track of 20 or 30
commitments made by three or four different people in several different
departments. Since HyperPAD does not automatically sort your pages,
instead leaving them in the order in which they were originally entered,
you need a way to group your pages by date, by name, or by department.
To sort pages in a pad, simply choose Sort from the Database menu and
fill out the Sort dialog box that appears. The following procedure shows
you how.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 161
________________________________________________________________________
To sort all pages having a single background:
1. Select the Sort command from the Database menu (ALT+D, S).
The Sort dialog box, shown here, appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
2. TAB into the Background field list box, highlight the background
field you want to sort by, then press ENTER.
3. Select the Ascending or Descending option to indicate whether the
pages should be sorted first to last or last to first.
4. Select one of the Type options.
Select Text if the field you want to sort by contains text, Numeric if
the field contains numbers, or Date if the field stores date
information.
5. Select <<Ok>> to start the sort.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 162
________________________________________________________________________
EXCHANGING INFORMATION WITH OTHER PROGRAMS
Personal computers operating in isolation from other computers are
increasingly rare. Chances are good that your PC is connected to a
network, to a mainframe or minicomputer, or to information services or
bulletin boards by means of a modem in your system.
If all computers were manufactured by the same vendor and ran the same
operating systems and applications, interaction between different
computers would be a breeze. But in reality, hundreds of vendors
manufacture thousands of different types of computers, which run tens of
thousands of different applications.
As a computer user, you may own and use several software packages.
Because of the vast number of software packages available, the ability
to share data between them is increasingly important. HyperPAD offers
several ways to exchange information between pads and other
applications. This section will explain how to share your HyperPAD data.
IMPORTING AND EXPORTING .DBF FILES
Although there is no single standard for storing information with
database software, the .DBF standard established by Ashton-Tate's dBASE
products is close to a universal standard on personal computers. If you
have information stored in the .DBF format, you can easily import it
into a pad and begin working with it. You can also export information
stored in a pad to a .DBF file for use by dBASE III or another program
that can work with .DBF files.
To import a .DBF file into a pad:
1. Make sure that the user level is set to Painting or higher.
Please refer to Chapter 3 for the procedure for raising your user level.
2. Select Import from the File menu (ALT+F, I).
3. Select the DBASE III (.DBF) option in the Import dialog box.
HyperPAD displays the Import dBASE III dialog box:
4. Select a .DBF file in the Import dBASE III dialog box, then select
<<Ok>> to import the database file.
Note: When HyperPAD imports a .DBF file, it creates a new background,
with background fields that match the fields in the database file. Once
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 163
________________________________________________________________________
the file has been imported, HyperPAD displays the last page that was
imported.
EXPORTING FROM PADS TO A .DBF DATABASE FILE
You can easily export the data stored in background fields to a .DBF
database file. In general, the procedure is nearly the reverse of that
used to import a .DBF file into HyperPAD.
To export pad data to a .DBF file:
1. Make sure that the user level is set to Painting or higher.
Please refer to Chapter 3 for the procedure for raising your user level.
2. Select Export from the File menu (ALT+F, E).
3. Select the DBASE III (.DBF) option in the Export dialog box.
The Export to DBASE III dialog box, shown here, is displayed. Each
background field belonging to the open background is displayed in the
Background field column.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
4. TAB into the DBF field column, where you can modify the names that
will be assigned to the fields when the data is exported to .DBF format.
5. TAB into the Type column, where you can press SPACE to select .DBF
field types.
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 164
________________________________________________________________________
Select Character to create a text field, Numeric to create a field to
store numbers, Date to store dates, and Memo to create a dBASE III memo
field.
6. Select options in the Width and Dec columns to specify the width of
the fields to be created and the number of decimals for a numeric field.
7. TAB to the Export column to choose which fields to export.
Press the up and down arrow keys to highlight the Yes/No option for each
field and then press Y to include the field in the .DBF file or N to
exclude it from the file.
8. Select <<Ok>>.
A dialog box is displayed, asking you to give a filename to the new file
that will be created.
9. Enter a valid DOS filename and press ENTER.
IMPORTING AND EXPORTING DELIMITED ASCII FILES
If you need to exchange data between HyperPAD and another program that
is unable to work with .DBF files, your next best choice may be to use
the delimited ASCII file format. In a delimited ASCII file, database
records are stored in a format resembling the following:
"Richard","Thomas","123 Lake Road","Westport","CT"
"Alycia","Blair","One Brook Lane","San Jose","CA"
Each line in a delimited ASCII file contains items of information
enclosed by quotes and separated from one another by a comma.
To import a delimited ASCII file into a pad:
1. Make sure that the user level is set to Painting or higher.
Please refer to Chapter 3 for the procedure for raising your user level.
2. Select Import from the File menu (ALT+F, I).
3. Select Delimited ASCII from the Import dialog box.
4. Select the filename of the ASCII file to be imported.
5. Select <<Ok>>.
HyperPAD imports the information in the ASCII file, creating a new page
for each row in the file. Since ASCII files do not have field names,
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 165
________________________________________________________________________
HyperPAD assigns names to the background fields it creates in this
manner: Field 0, Field 1, Field 2, and so on for as many fields as are
created.
To export pages to a delimited ASCII file:
1. Make sure that the user level is set to Painting or higher.
Please refer to Chapter 3 for the procedure for raising your user level.
2. Select Export from the File menu (ALT+F, E).
3. Select delimited ASCII from the Export dialog box.
4. Enter the name you want to use for the new file.
By default, HyperPAD assigns the delimited ASCII files created with the
Export command an extension of .TXT.
IMPORTING AND EXPORTING TEXT FILES
Finally, you can use HyperPAD to import text files. This capability lets
you import documents from a word processor like Word Perfect or
Microsoft Word into HyperPAD. (This feature is particularly useful, for
example, if you are developing hypertext applications such as help or
computer-based training systems.)
If you want to take free-form information stored in fields and export it
to a text file in order to perform additional tasks upon it with your
word processor, choose the Text file option in the Export dialog box.
Note: You can import and export text only from single fields in
HyperPAD.
IMPORTING AND EXPORTING OTHER FILE TYPES
Since the procedures for importing and exporting information to the
other file formats supported by HyperPAD are very similar to those
described immediately above, we will not repeat them in this section. We
will limit our discussion to a brief description of the other Import and
Export options and make some suggestions about how you might use these
options.
IMPORTING AND EXPORTING .GX2 IMAGES
Brightbill-Roberts also publishes a family of desktop presentation
products for creating multimedia screen shows running under DOS. The
________________________________________________________________________
Chapter 9: Adding and Manipulating Information 166
________________________________________________________________________
members of this family--which include Show Partner, Show Partner F/X,
and PC Partner--create images that use the .GX2 file format.
If you've used one of these products to capture or create text screens,
you can import them into your pads for use.
You can also import .GX2 images created by the CAP utility that came in
your HyperPAD package. (This utility is described in Appendix 3, "Using
the CAP Utility.")
If you've developed screens in HyperPAD and want to use them in your
Show Partner or Show Partner F/X screen shows, use the Export command to
export these screens to .GX2.
IMPORTING AND EXPORTING .BSV IMAGES
Microsoft QuickBASIC and other versions of the popular BASIC programming
language use an image file format known as BSAVE, or .BSV. HyperPAD
imports and exports .BSV files.
CONCLUSION
By this point, we've introduced you to a variety of ways in which
HyperPAD can be used to manage the information on your PC. Since these
features are part of an environment in which you launch programs, manage
files, and develop your own personal applications, they're available to
you anytime that HyperPAD is running.
You've learned how to add and edit information in fields, how to find
text in a pad, how to sort the pages in a pad, and how to perform
queries that enable you to work with a limited set of pages. Finally,
you learned how to exchange information between HyperPAD and other
software applications.
In the next chapter, you'll be introduced to HyperPAD's printing
features, which offer you another way to use the information stored in
HyperPAD files.
________________________________________________________________________
Chapter 11: HyperPAD's Building Blocks 187
________________________________________________________________________
CHAPTER 11: HYPERPAD'S BUILDING BLOCKS
This chapter describes the elements of a HyperPAD application and
explains how to use these elements as building blocks for your own pads.
A pad is nothing more than a collection of pages, organized on
backgrounds, each of which can contain paint, buttons, and fields. These
building blocks are the basic structure of every pad.
As a pad user, you're already familiar with some of these elements. For
example, in navigating around the pads, you've selected buttons, typed
into fields, and moved between pages. You may have been using some other
elements all along, such as the background, without even realizing they
were there.
In the following sections, we'll introduce you to all of HyperPAD's
building blocks and show you how they interact with each other.
________________________________________________________________________
Chapter 11: HyperPAD's Building Blocks 188
________________________________________________________________________
OBJECTS
All of the building blocks used in pad construction are called objects.
However, simply being part of a pad does not qualify an element for the
family of objects. What distinguishes an object, like a button, from
paint or text is the ability of an object to respond in some way to
events happening within the HyperPAD environment.
PADS
A pad (or personal application design), like a notepad, is comprised of
one or more pages containing information. Each page in a pad is layered
on top of a similar object called the background. Together with buttons
and fields, these objects determine the structure of a pad.
BACKGROUNDS
Backgrounds provide a backdrop onto which the pages are placed.
Different types of information can be placed on the
background--including paint, text, buttons, and fields--all of which
will appear on every page associated with that background. The only time
that elements on the background are not visible is when a portion of the
page hides them.
PAGES
A page is a layer containing buttons, fields, and paint that is situated
on top of a background. Unlike a background, the elements on a page are
only visible when you're viewing that page.
You can think of the page as a transparency on top of the background.
For example, you could create a pad that has a fancy border on the
background while each page displays different information within that
border.
BUTTONS
A button is an object on either the page or the background that you can
select to carry out an action. The actions taken by a button may be
simple, such as causing your computer to beep, or more complex, such as
placing numeric values into variables.
Many of the buttons you used throughout Part 1 served as navigation
devices; selecting them allowed you to travel to other pages or pads, or
even to other programs. Other buttons activated commands, such as
finding text or sorting the pages of a pad. In short, buttons provide a
mechanism for you to deliver commands to HyperPAD.
________________________________________________________________________
Chapter 11: HyperPAD's Building Blocks 189
________________________________________________________________________
FIELDS
Fields are containers for text. A field can be placed on the page or on
the background, depending on whether or not you want pages to share the
field.
A field placed on the page contains text visible only when you view that
page. For example, on the Customize HyperPAD page of the Home pad, there
is a field that contains the user's name.
A field placed on a background can be seen and typed into from any page
that uses that background. The content of the field can be different for
each page on which the field appears. For example, the Phone pad
contains many background fields, such as the First name and Last name
fields, that appear on every page in that pad.
In addition to providing the pad user with an area in which to enter and
edit text, fields can also be used solely to display text. For example,
there are many fields in the Tutorial that only display information.
These fields are considered locked because the user is unable to type
text into them.
As a pad author, you'll find that fields offer you a flexible
environment for handling text, since all fields can be resized, moved,
copied, cut, and pasted regardless of whether they contain text. And
when you modify a field, text is immediately reformatted to fit within
its new dimensions.
WHAT IS PAINTING?
In the section above, we discussed the objects that are used to
construct pads. HyperPAD also offers you tools to make your applications
visually appealing and easier to use. Painting is the process by which
you use these tools to modify the appearance of a page or background.
With HyperPAD's painting tools, you can add and remove text, paint,
ASCII characters, and lines.
________________________________________________________________________
Chapter 11: HyperPAD's Building Blocks 190
________________________________________________________________________
TO BEGIN DESIGNING
In order to utilize HyperPAD's painting tools and work with objects, you
have to switch out of Browse mode and into Authoring mode.
To set the user level to Scripting:
1. Press SHIFT+ALT+F to open the extended File menu.
2. Press T to select the Protect command.
The Protect dialog box will appear.
3. Select the scripting user level.
The scripting user level gives you access to all of HyperPAD's tools and
object-manipulation capabilities. Additionally, you can modify and
create scripts that control the functionality of the HyperPAD
environment.
SWITCH FROM BROWSING TO AUTHORING
Once you begin modifying the pads, you'll need to switch back and forth
between authoring and browsing in order to experiment with the pad
you're working on. One way to do so is by selecting different tools from
the Tools menu, such as Paint and Browse. You can quickly toggle between
the current authoring tool and the Browse tool by pressing ALT+ESC.
CONCLUSION
Now that you've learned about HyperPAD's building blocks, you're ready
to put these elements to work in creating your own pads. Throughout the
remainder of Part 2, we'll discuss the features and functionality
available in HyperPAD's authoring environment.
________________________________________________________________________
Chapter 14: Buttons and Fields 241
________________________________________________________________________
CHAPTER 14: BUTTONS AND FIELDS
INTRODUCTION
Suppose you have designed your own pad and have mastered using
HyperPAD's painting tools. You probably created some pages and
backgrounds with attractive screen layouts. However, now you want your
pad to be more functional than just a collection of interesting screens.
Your first step is to add buttons and fields to your pad. Buttons and
fields are the focal point of all activity in a pad. Placed on pages and
backgrounds, buttons can be selected to perform actions that you define,
such as changing pages or running other DOS programs. Placing fields on
your pages and backgrounds lets you define where the user will be able
to type information. In short, buttons and fields make your pad come to
life.
________________________________________________________________________
Chapter 14: Buttons and Fields 242
________________________________________________________________________
BUTTONS
A button is an object located on the page or background that the user
can select to carry out an action. You can create buttons that allow the
user to:
0 Go to another page
0 Go to another pad
0 Perform calculations
0 Run other DOS programs
FIELDS
Fields are rectangular editing areas located on the page or background
into which textual information can be typed. Fields can contain:
0 Numbers
0 Names and addresses
0 Traveling expenses
0 A list of files on your hard disk
0 Information retrieved for further processing
A field can contain up to 30,000 characters. Every field can hold more
text than will fit within its borders.
BUTTON AND FIELD PROPERTIES
Buttons and fields can be placed anywhere on a page or background. Each
has defining characteristics, or properties, used to control its
appearance and behavior. Some examples of button and field properties
are:
0 Location
0 Color
0 Name
0 Accelerator key
By adjusting an object's properties, you can design attractive objects
that behave appropriately for your pad.
________________________________________________________________________
Chapter 14: Buttons and Fields 243
________________________________________________________________________
WHY USE BUTTONS AND FIELDS?
Buttons and fields can be added to a pad to increase its functionality.
Most of the interaction between the user and the pad occurs through the
use of buttons and fields. As a pad author, you will use buttons and
fields to:
0 Create links between pages and pads
0 Hold information that the user can manipulate
0 Automate repetitive tasks
0 Display information for instructional purposes
For example, you can create a database by adding fields to the
background of a new pad. By adding pages and information to this pad,
you are essentially adding records to the database.
Once your database includes many pages, you may want to automate
navigation, making it easier to move between pages. Simply add buttons
on the background and link them to other pages in the database.
Suppose that you then wanted to take some notes and attach them to a
specific page in the pad. Simply add a field to that page.
The procedures described in this chapter give you all the information
necessary to perform tasks like those mentioned above.
DESIGNING WITH BUTTONS AND FIELDS
Using the Selector tool, objects can be positioned, cut, copied, pasted,
edited, and duplicated. Combined with the painting tools, objects on the
page and background make your pad functional, something that users can
browse by clicking on buttons and typing into fields. This chapter will
also explain how to use the Selector tool to create and modify objects.
________________________________________________________________________
Chapter 14: Buttons and Fields 244
________________________________________________________________________
HOW BUTTONS AND FIELDS ARE ORGANIZED
OBJECT LAYERING
Buttons and fields are created on either the page or the background.
Regardless of whether they are located on the page or background,
objects are layered according to the order in which they were created.
For example, the first object you create will be on layer 1, the next on
layer 2, and so on.
Objects on higher-numbered layers overlap those on lower-numbered
layers. Objects on the lower-numbered layers are closest to the page,
while objects on the higher-numbered layers are farther away.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
BACKGROUND OBJECTS
Background buttons appear on every page that use that background. They
provide access to those functions you want available on every page that
uses that background. One example is a navigation button, such as a Home
button, that, when selected, takes a user to the Home pad, or paging
buttons which let the user move to the next or previous page.
Background fields are templates for holding text information. They
define the area and position in which text can be placed on the page.
Each page maintains its own private contents for the background fields.
________________________________________________________________________
Chapter 14: Buttons and Fields 245
________________________________________________________________________
The following diagram shows how the background fields act as templates
for text stored on the page:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Background fields are particularly useful for creating databases. The
background containing the fields acts as the database structure or
definition, and each page stores one record in the database.
EDITING OBJECTS USING THE SELECTOR TOOL
The Selector tool allows you to work with buttons and fields. Using the
Selector tool, you can resize, move, cut, copy, paste, delete, and edit
objects.
To use the Selector tool, the user level must be set to either authoring
or scripting. At the authoring level, you can create, move, resize, and
edit the properties of objects. The scripting level gives you all the
capabilities of the authoring level, plus the ability to edit an
object's script.
________________________________________________________________________
Chapter 14: Buttons and Fields 246
________________________________________________________________________
To change the user level to scripting:
1. Select the Protect command from the File menu (ALT+F, T).
2. Select the scripting option (ALT+I), then press ENTER.
Now that the user level is set to scripting, you can use the Selector
tool.
SELECTING A BUTTON OR FIELD
To select a button or field with the keyboard:
1. Choose the Selector command from the Tools menu (ALT+T, S). The
shortcut for this command is CTRL+S.
Selected buttons and fields are indicated with anchors on each corner:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If there are no objects to edit, the cursor will not move until you
create an object or move to a page with objects.
2. If the object you want to select is located on the background,
select Background from the Edit menu (ALT+E, B).
You can tell that you are editing the background if:
"BKGND" appears on the status bar.
The Background command is checked on the Edit menu.
3. Press TAB or SHIFT+TAB to place the anchors on the next or previous
object until the one you want is selected.
If you defined an accelerator key for the object, you can press ALT and
the accelerator key to quickly select the object.
To select a button or field with the mouse:
1. Choose the Selector tool from the Tools menu.
2. Point to the object and click the left mouse button.
________________________________________________________________________
Chapter 14: Buttons and Fields 247
________________________________________________________________________
CREATING OBJECTS
You can create buttons or fields by selecting the New Button or New
Field command from the Objects menu. The shortcuts for these commands
are:
To: Press:
----------------------------------
Create a new field CTRL+F3
Create a new button ALT+F3
After an object is created, it's placed in the center of the screen
ready to be positioned and resized.
ADDING FIELDS TO THE BACKGROUND
Fields, like buttons, can be added to either the page or the background.
Each field acts as a storage area for information. When added to the
page, both the field and its text are unique to that page--they have no
effect on any other page in the pad.
Background fields, however, can be shared by many pages. Each page that
uses a specific background maintains its own contents for the fields on
that background.
Creating fields on the background is no different from creating fields
on the page. However, if you create or delete any fields on a
background, when you finish editing the background, HyperPAD will
display the following message:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 248
________________________________________________________________________
Rebuilding the pad involves updating every page that uses a particular
background with new field information. This operation happens
automatically when you access a page. However, to speed access to these
pages, you may want to rebuild the pad all at once.
If you respond <<Ok>> to this dialog box, the pad will be rebuilt.
If you select <Cancel>, the pages that use the background will not be
updated until the next time those pages are accessed.
MOVING OBJECTS
When you create a button or field, it is placed in the center of the
screen. Your next step is to reposition the object in the appropriate
location on the page or background.
To move a selected object with the keyboard:
To: Press:
--------------------------------------------------------
Move the object by one line Arrow keys
Move the object by larger amounts CTRL+Arrow keys
Move the object to the left edge HOME
Move the object to the right edge END
To move an object with the mouse:
1. Point to the object.
2. Press the left mouse button and drag the object to the desired
location.
RESIZING OBJECTS
After positioning an object, you can alter its size. An object can be as
small as one row by one column, or as large as the screen.
To resize an object with the keyboard:
1. Press ALT+TAB repeatedly until the cursor reaches the corner you
want to stretch.
2. Press SHIFT+arrow keys to stretch the corner in the direction of the
arrow key.
________________________________________________________________________
Chapter 14: Buttons and Fields 249
________________________________________________________________________
The following keys can also be used to resize objects:
To: Press:
--------------------------------------------------------------------
Stretch a corner faster with the arrow keys CTRL+SHIFT+Arrow keys
Stretch a corner to the left edge SHIFT+HOME
Stretch a corner to the right edge SHIFT+END
To resize an object with the mouse:
1. Point to the corner that you want to stretch (place the mouse
pointer on top of one of the four anchors).
2. Press the left mouse button and drag the corner to its new location.
Note: Dragging the mouse away from the center makes the object larger,
while dragging the mouse toward the center makes it smaller.
COPYING AND PASTING OBJECTS
HyperPAD allows you to copy buttons and fields from one pad to another
using the Cut, Copy, and Paste commands. Once an object has been copied,
it can be placed anywhere--on another page or background in the same
pad, or even on a page or background in another pad.
When you copy an object, it is placed into the clipboard for later use.
Since only one item at a time can occupy the clipboard, the previous
contents of the clipboard are lost. When you paste the object from the
clipboard, an exact copy will be placed onto the page or background in
the same location as the original.
Note: The clipboard is a temporary storage area. When you leave
HyperPAD or run another program from HyperPAD, the clipboard will be
emptied.
________________________________________________________________________
Chapter 14: Buttons and Fields 250
________________________________________________________________________
CUSTOMIZING WITH COPY AND PASTE
The Copy and Paste commands provide powerful shortcuts for customizing
your pads. You can save time by making use of buttons and fields that
already exist in another pad. You don't have to understand how a button
or field works; simply copy an object that already does what you want,
then paste it into the pad you're working with.
For example, the Phone pad doesn't have a button that takes you directly
to your Daily Planner. You can create a button to do this by copying the
Daily Planner button from the Pads screen to the background of your
Phone pad. Then, when you want to go directly to the Daily Planner, you
can just select this button.
To use a different example, suppose you want to add a mechanism to the
Home pad that will enable you to take a quick note. You can easily
accomplish this task by copying a field from the Ideas pad and pasting
it onto your Home pad.
To copy an object with the keyboard:
1. Select the object to be copied.
2. Select Copy from the Edit menu (ALT+E, C). (The shortcuts for this
command are CTRL+C or CTRL+INSERT.)
To copy an object with the mouse:
Hold down CTRL, point to the object, then press the left mouse button
and drag the object to its new location.
Note: The exact name of the Copy command on the Edit menu depends on
the selected object. If a button is selected, the displayed command is
"Copy Button"; otherwise, the displayed command is "Copy Field."
COPYING ONLY PROPERTIES
A special copying feature available to mouse users allows you to copy an
object's properties and apply them to another object of the same type
without copying the location property or the script.
For example, suppose that you just created a field in the Phone pad and
want it to look exactly like all the other fields on the same page.
Instead of duplicating the field (by copying and pasting it), you can
just copy the properties.
Note: You can only copy properties to another object of the same type
(i.e., between two buttons or between two fields).
________________________________________________________________________
Chapter 14: Buttons and Fields 251
________________________________________________________________________
To copy an object's properties:
1. Select the object whose properties you want to copy.
2. Point to the object to which the properties to be copied (don't
click on it yet).
3. While holding down the CTRL and SHIFT keys, click the left mouse
button (CTRL+SHIFT+click).
CUTTING OBJECTS
The Cut command allows you to remove a button or field from the current
page or background and store it in the clipboard for reuse.
To cut an object:
1. Select the object to be cut.
2. Select Cut from the Edit menu (ALT+E, X). The shortcuts for this
command are CTRL+X and SHIFT+DEL.
The selected object will be copied into the clipboard and removed from
the screen. The object can then be recalled with the Paste command.
PASTING OBJECTS
Once you have stored a copy of an object in the clipboard using either
the Copy or Cut command, you can retrieve it with the Paste command.
HyperPAD allows you to paste an object from the clipboard to the same
page or background from which it was copied, to another page or
background in the same pad, or to a different pad. You can paste as many
copies of a stored object as you want.
Note: Pasted objects have all the same properties, including screen
location and script, as the original object.
To paste an object:
1. Navigate to the page on which you want to paste the object (this
could be on the same page, a different page, a background, or a
different pad).
2. Select the Paste command from the Edit menu (ALT+E, P). The
shortcuts for this command are CTRL+V or SHIFT+INSERT.
Note: The name of the Paste command changes according to what is being
pasted. If you're pasting a field, the displayed command is "Paste
Field;" otherwise, the displayed command is "Paste Button."
________________________________________________________________________
Chapter 14: Buttons and Fields 252
________________________________________________________________________
DELETING OBJECTS
Use the Delete command to remove an object from the page or background
without saving a copy in the clipboard.
To delete an object:
1. Select the object to be deleted.
2. Select the Delete command from the Edit menu (ALT+E, D). The
shortcut for this command is DEL.
The selected object is removed from the page or background, without a
copy being placed in the clipboard.
Note: A deleted object can never be recovered. Therefore, you may want
to make a backup copy of your pad before deleting many objects, in case
you need to recall them (use the Save a Copy command (ALT+F,S) on the
File menu).
CLONING OBJECTS
The Clone command allows you to quickly place a copy of an object on the
same page as the original, without copying it to the clipboard. Cloned
objects overlap the object from which they were cloned, offset slightly
down and to the right.
This command avoids the two-step process of copying the object into the
clipboard and then pasting it. In addition, the clipboard's contents are
preserved.
To clone an object:
1. Select the object to be cloned.
2. Select Clone from the Objects menu (ALT+O, C). The shortcut for this
command is CTRL+D.
A clone of the original object appears on-screen. Note: The new object
is selected, so that you can modify it immediately.
LAYERING OBJECTS
Each object created on a page or background is contained on an invisible
layer. All of these layers are stacked on top of one another. If one
object is on a higher layer than another, it will cover that object
wherever they overlap.
________________________________________________________________________
Chapter 14: Buttons and Fields 253
________________________________________________________________________
All buttons and fields are layered on top of one another. In addition,
each object is numbered by its position relative to the other layered
objects of the same type.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
When you create a new button or field, a new layer to hold that object
is placed on top of all existing object layers. You can determine the
layer of a given button or field by examining the Object Info dialog box
for that object. This is discussed later in this chapter.
The layer of a button or field can be changed using the Bring Closer and
Send Farther commands on the Objects menu. These commands move the
selected button or field up or down one layer.
To move an object up one layer:
1. Select the object that you want moved to a higher layer.
2. Select the Bring Closer command from the Objects menu (ALT+O, R).
The shortcut for this command is PLUS on the numeric keypad.
The selected object is moved one layer farther from the page or
background.
________________________________________________________________________
Chapter 14: Buttons and Fields 254
________________________________________________________________________
To move an object down one layer:
1. Select the object you want moved to a lower layer.
2. Select the Send Farther command from the Objects menu (ALT+O, S).
The shortcut for this command is MINUS on the numeric keypad.
The selected object is moved one layer closer to the page or background.
COVERING OBJECTS
A common use for layering is to cover other objects. Objects completely
covered by other objects are not selectable by the pad user.
To cover an object:
1. Select the New Button (ALT+O,B) or New Field (ALT+O, F) command from
the Objects menu to create a new button or field.
The new object will be placed in the center of the screen.
2. Move the new object over the object to be covered.
3. Resize the object, if necessary, to completely cover the desired
object.
________________________________________________________________________
Chapter 14: Buttons and Fields 255
________________________________________________________________________
The following picture illustrates a pad with two background buttons that
take you to the previous and next pages. On the first page of your pad,
however, having the Prev button doesn't make sense because there is no
previous page. Thus, you may want to cover this button up with an opaque
button on page 1.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 256
________________________________________________________________________
PROPERTIES OF OBJECTS
Until now we have focused on altering objects in relation to each other
on the screen. This manipulation of objects is important when designing
screen layouts. You can further customize your buttons and fields by
altering their properties.
Properties determine not only how an object looks--i.e., its color or
edge type--but also how it responds to actions the user performs.
HyperPAD allows you to modify an object's properties using the Button
and Field Info dialog boxes.
The following sections describe how to customize your buttons and fields
by modifying the properties listed in these dialog boxes.
THE FIELD INFO DIALOG BOX
All of a field's properties are accessible through the Field Info dialog
box. From this dialog box, you can adjust the properties that control a
field's color, edge type, and default behavior.
GETTING THE FIELD INFO DIALOG BOX
With the keyboard:
1. Select the desired field.
2. Select the Field Info command from the Objects menu (ALT+O, I). A
shortcut for this command is to press ENTER or SPACE.
The Field Info dialog box appears on the screen.
With the mouse:
To access the Field Info dialog box with the mouse, select the field,
then double-click the left mouse button.
________________________________________________________________________
Chapter 14: Buttons and Fields 257
________________________________________________________________________
The Field Info dialog box is shown below.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The following diagram shows a field with some of its field properties.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The descriptions that follow explain how each of the available field
properties modifies the appearance and behavior of the field.
________________________________________________________________________
Chapter 14: Buttons and Fields 258
________________________________________________________________________
FIELD NAME
This text box displays the name of the field. If the Show name property
is on, then the field name will appear either on top or to the left of
the field (depending on the value of the Name position property). The
field name text box is empty for a new field.
Note: The field name can be used to refer to a field from within a
script, so choose a meaningful name that you can remember.
FIELD NUMBER
This number indicates the field's layer in relation to the other fields
on the page or background.
Note: The field number can be used to refer to a field from within a
script.
FIELD ID
The ID is a unique number assigned to a field when it is created. This
number will never change.
Note: The ID is the only way to uniquely identify a field from within a
script. Unique IDs are assigned to each field on a page, but fields on
different pages may have the same ID.
________________________________________________________________________
Chapter 14: Buttons and Fields 259
________________________________________________________________________
ALIGN
The Align option controls the justification of text within a field.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
LEFT: Aligns each line of text flush with the left edge of the field.
This is the default.
RIGHT: Aligns each line of text flush with the right edge of the field.
CENTER: Centers each line between the left and right edges of the
field.
NAME POS
The Name pos (name position) property determines the positioning of the
field name that appears if the Show name property is on. The name can be
placed either on top or to the left of the field. By default, the name
is placed to the left.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 260
________________________________________________________________________
SHOW NAME
When this option is on, the field's name is displayed in the position
designated by the Name pos property.
WITH EDGE
This property determines whether the field is drawn with a border. The
edge displayed around the field is determined by the value of the Edge
type property. The color of the border matches the Border Color setting
(if the field is not transparent).
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If the With edge property is on, scrolling and list box fields are
displayed with a scroll bar on their right edge. If you turn off the
With edge property, the scroll bar will not be visible.
HILITE IF FOCUS
This property determines whether the field is highlighted when it has
the focus. When Hilite if focus is on, the field will be highlighted
using the color specified by Hilite Color.
If this property is not on, editing can begin as soon as the field
receives the focus. Otherwise, the user must press F2 to remove the
highlight and begin editing.
SCROLLABLE
This setting determines whether the field can hold more information than
can be contained within the physical confines of the field's rectangle.
When Scrollable is on, the text within the field can be scrolled to
display text located below the visible area of the field.
________________________________________________________________________
Chapter 14: Buttons and Fields 261
________________________________________________________________________
LOCK TEXT
When this property is on, a read-only field is created. If you don't
want your field to be edited or scrolled through, activate this
property. Locked text fields do not receive the focus.
STYLE
The Style options control the type of field. The style can be set to
Transparent, Scrolling, Opaque, and List box. The default style is
Opaque.
OPAQUE: This option creates a nontransparent field. The color of Opaque
fields is determined by the Fill and Border Color settings.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
TRANSPARENT: This option creates a transparent field. All characters,
paint, and objects behind the field will be visible.
SCROLLING: Scrolling fields are opaque, with a scroll bar on the right
edge. A mouse is required to use the scroll bar.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 262
________________________________________________________________________
LIST BOX: List box fields contain a list of items that can be marked
and unmarked using SPACE. Text within a list box field is not word
wrapped.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
In order to get information into a list box:
1. Set the style of the field to Opaque.
2. Type text into the field, pressing ENTER at the end of each line.
3. Set the style of the field back to List box.
BORDER COLOR
This property controls the attribute used to display the field's border
(if the field is not transparent and the With edge property is on). The
default is light grey on black.
FILL COLOR
This property controls the color used to display the field's interior
(if the field is not transparent). The default is light grey on black.
HILITE COLOR
This property controls the color used to display the field when the
field receives the focus (if the Hilite if focus property is on). The
default is black on light grey.
________________________________________________________________________
Chapter 14: Buttons and Fields 263
________________________________________________________________________
EDGE TYPE
This property controls which edge type is displayed as a field's border
(if the field's With edge property is on). Choose among 15 edge types.
The default edge type is 1 (single line).
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
NAME COLOR
The Name Color option controls the color used to display the field's
name (if the Show name property is on). The default is black on light
grey.
SCRIPT
This option opens the field's script in the Script Editor window.
THE BUTTON INFO DIALOG BOX
All button properties are accessible through the Button Info dialog box.
From this dialog box, you can adjust properties that control the
button's color, edge type, and default behavior.
USING THE BUTTON INFO DIALOG BOX
To access the Button Info dialog box with the keyboard:
1. Select the desired button.
2. Select the Button Info command from the Objects menu (ALT+O,U). A
shortcut for this command is to press ENTER or SPACE.
The Button Info dialog box appears on the screen.
________________________________________________________________________
Chapter 14: Buttons and Fields 264
________________________________________________________________________
To access the Button's Info dialog box with the mouse:
Point to the button and double-click the left mouse button.
BUTTON INFO...
The Button Info dialog box is shown below.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The following subsections describe the button properties available in
the dialog box and how they modify the appearance and behavior of a
button.
BUTTON NAME
The button name is displayed in the button rectangle. It is centered by
default.
Note: The button name can be used within a script to refer to a button.
ACCELERATOR KEY
The Accelerator property determines the ALT key combination used to
quickly select this button. Any letter or number can be used as a button
accelerator.
ACCELERATOR COLOR
This property controls the color of the button accelerators displayed
when the user holds down the ALT key.
________________________________________________________________________
Chapter 14: Buttons and Fields 265
________________________________________________________________________
BUTTON NUMBER
This number indicates the button's layer in relation to the other
buttons on the page or background.
Note: The button number can be used in a script to refer to a button.
BUTTON ID
Every object on a page or background is assigned an ID number when it is
created. This number is unique to each button on the page. (However,
there may be two buttons with the same ID number on different pages.)
Note: The ID is the only way to uniquely identify a button from within
a script.
SHOW NAME
Set this option on to display the button name. It is on by default.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
WITH EDGE
When With edge is on, the button is displayed with a border.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 266
________________________________________________________________________
HILITE IF FOCUS
This property determines whether a button is highlighted when it has the
focus (the default is off). If so, the button is displayed using the
hilite color. (The Hilite if focus property will have no effect if Auto
hilite is not on.)
AUTO HILITE
This property determines whether a button is capable of being
highlighted (the default is on). If Auto hilite is on, the button will
be highlighted when the user places the mouse pointer within its
rectangle and presses the left mouse button. If the Hilite if focus
property is also on, the button will be highlighted whenever it receives
the focus.
If Auto hilite is not on, the button will never be highlighted.
SHADOW
This property causes a button to be displayed with a shadow below and
to the right of it. The default is off (no shadow).
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
STYLE
Opaque: This option, when on, makes a button nontransparent. The button
completely hides any characters or objects under it. This option is on
by default.
Transparent: When this option is on, any empty spaces in the button
become transparent. Any characters or objects under the button are
visible through the empty spaces.
________________________________________________________________________
Chapter 14: Buttons and Fields 267
________________________________________________________________________
CHECK BOX: This option creates check box buttons. Check box buttons are
displayed with brackets to the left of the name. Selecting a check box
button toggles the check mark [X] between the brackets.
Check box buttons are transparent and cannot be shadowed.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
BORDER COLOR
This property controls the color used to display a button's edge. The
default is light grey on black. The Border Color has no effect if the
button is transparent.
FILL COLOR
This property determines the color used to display the interior of a
nontransparent button.
HILITE COLOR
This property controls the color of a button when it is highlighted.
Only buttons with the Auto Hilite property on will be highlighted. The
default is black on light grey.
EDGE TYPE
This property determines the displayed border pattern of a button. If
the button is not transparent, the edge will be displayed with the
Border Color.
SCRIPT
This option opens the button's script in the Script Editor window.
________________________________________________________________________
Chapter 14: Buttons and Fields 268
________________________________________________________________________
BUTTON AND FIELD IDEAS
The following section describes some special uses of buttons and fields.
INVISIBLE BUTTONS
You can create completely invisible buttons by:
0 Setting the Style property to Transparent
0 Setting the With edge property to off
0 Setting the Show name property to off
Buttons with these characteristics are, for all practical purposes,
invisible to the user. There is no border, name, or edge to give away
the button's position. Some practical uses for these buttons are
discussed below.
SELECTING OBJECTS OF A LOWER LAYER
By placing an invisible button on top of another button, you can create
the illusion of clicking on the visible button, when, in fact, the
invisible button is being selected.
In a help system, the background may contain paging buttons that go to
the previous and next pages. On the index page, however, you want these
buttons to be disabled (because there isn't a logical next or previous
page). You can accomplish this by placing an invisible page button which
executes the special case actions on top of the paging buttons.
SELECTING PAINT
Invisible buttons can be used on top of the paint layer to create the
illusion that the user is clicking on an icon, such as the phone or
house icon found in the Ideas pad.
Suppose you've been asked to develop an Executive Information System
(EIS) for top management. Further, your boss wants to be able to click
on icons to quickly see various reports about the company's status.
Here's how to develop this type of linked icon:
To create a linked icon:
1. Paint the icon on the picture layer.
Copy an image from the Ideas pad if you want to save time.
________________________________________________________________________
Chapter 14: Buttons and Fields 269
________________________________________________________________________
2. Create an invisible button, as described above, and place it on top
of the icon.
3. Link the button to where you want the boss to go when the icon is
selected. (See invisible button section below about linking.)
INVISIBLE FIELDS
Invisible fields have the following properties:
0 The Style property is set to transparent.
0 The With Edge property is set to off.
0 The Show Name property is set to off.
Invisible fields are useful for creating graphic typing areas. You
should specify a transparent field when the underlying graphics contain
a visual clue that a field is there. The following example overlays a
transparent field onto some painted lines to create the illusion of
ruled paper:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 14: Buttons and Fields 270
________________________________________________________________________
DATABASE FIELDS
By modifying a field's properties, you can create traditional database
entry fields. Database fields have the following properties:
0 The With edge property is set to off.
0 The Show name property is set to on.
0 The Name position property is set to left.
0 The Style property is set to Opaque.
These fields are familiar to many users who work with database programs,
which often display information on forms with these kinds of fields.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
LINKING BUTTONS
A link is a connection established between a page and another page or
pad. Links are established using buttons, so that when you select a
button on a page, you access the linked page or pad.
When you create information applications, like help systems, links are
especially useful. With HyperPAD, you can link a series of information
pages together. When browsing, a user can then move easily between
pieces of related information simply by selecting buttons.
All buttons contain link information hidden in their scripts, which is
accessible through the Button Info dialog box. HyperPAD automates the
process of creating a link, freeing you from the task of having to type
the actions into the button's script.
________________________________________________________________________
Chapter 14: Buttons and Fields 271
________________________________________________________________________
To link a button:
1. Select the button to be linked.
2. Press ENTER to open the Button Info dialog box.
3. Select the Link To button from the bottom of the dialog box.
The following popup dialog box appears:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If you have a mouse, you can move this dialog box to the side, getting
it out of the way so that you can view the page underneath.
4. Navigate to the destination page. This may involve using PGDN or
PGUP to change pages, or using Open from the File menu (ALT+F,O) to go
to another pad, or using one of the Go menu commands.
5. Select one of the following options from the dialog box:
This Page: This choice links the button to a specified page, even if it
is on a different pad than the button being linked. The shortcut for
this command is ALT+P.
This Pad: This choice links the button to this pad.
When you select the button, it will take you to the page that was
accessed when the pad was last opened. The shortcut for this command is
ALT+D.
Cancel: This choice cancels the linking process. The shortcut for this
command is ALT+C.
After selecting one of these buttons, you'll be returned to the page
that was open when you began the procedure.
________________________________________________________________________
Chapter 14: Buttons and Fields 272
________________________________________________________________________
WHAT REALLY HAPPENS
When you link buttons using the Link To command in the Button Info
dialog box, HyperPAD actually creates statements within the button's
script that perform the link. These statements essentially say, "When
this button is selected, change to this other page".
You can examine these statements by selecting the Script button from the
Button Info dialog box. Scripts are introduced in the next section.
SCRIPTING
Each button in HyperPAD has an attached script that can define what
happens when the button is selected (although each button has a script,
some scripts are blank). When you select a button, HyperPAD tells that
button that it has been selected. The button, in response, can execute a
group of commands that you have created.
The commands in a script are written in an Englishlike language called
PADtalk. Using PADtalk, you can instruct your buttons to perform diverse
tasks, such as changing to another page, running another program, or
preparing a report and sending it to the printer.
The following section introduces PADtalk and gives some practical
examples to use in your own scripts. PADtalk is examined in depth in the
PADtalk Reference Guide.
ACCESSING A BUTTON'S SCRIPT
To access a button's script:
1. Use the Selector tool to select a button.
2. Press ENTER to open the Button Info dialog box.
3. Select the Script button.
A shortcut to get to the script is to press SHIFT+ENTER when the button
is selected.
FRAMEWORK FOR SCRIPTS
PADtalk is different from most computer languages. Many languages suffer
from a strict set of rules that must be followed. PADtalk, on the other
hand, allows you to write commands in a more intuitive, Englishlike
style that is easy to read.
________________________________________________________________________
Chapter 14: Buttons and Fields 273
________________________________________________________________________
Even so, HyperPAD's commands and language syntax still follow loose
rules that you must keep in mind. Don't worry, though. HyperPAD provides
you with instant error information when you make a mistake.
HANDLERS
Scripts are composed of groups of commands; each group is called a
handler. The word handler marks the beginning of a group of statements
that is executed when something happens to the button. Generally,
commands are executed when buttons are selected (when you highlight the
button and press ENTER or click on the button with the mouse).
The following shows a sample handler that instructs HyperPAD to change
to the next page when the button is selected.
handler select;
begin
go to the next page;
end;
Simply, the above handler says: "When the button is selected, change to
the next page".
The group of commands that is executed is contained between the words
begin and end. You can specify as many commands as necessary between
these words, separating each command with a semicolon.
Don't worry about upper- or lowercase words. PADtalk pays no attention
to capitalization.
________________________________________________________________________
Chapter 14: Buttons and Fields 274
________________________________________________________________________
SOME USEFUL PADTALK COMMANDS
There are many types of statements and commands that you can type into
PADtalk. This section introduces some useful statements that you can
include in your scripts immediately, without knowing any more about
PADtalk.
THE GO COMMAND
The go command lets you change to another page or even another pad. The
following are examples of the go command:
go to page 10;
go to page "Preferences";
go to the next page;
go to the previous page;
THE RUN COMMAND
The run command lets you run other DOS programs from within HyperPAD.
When doing so, HyperPAD shrinks down to 3K of memory, providing your
programs with plenty of memory in which to run. Some examples of the run
command are:
run "C:\LOTUS\123.EXE";
run "COMMAND.COM";
THE FIND COMMAND
The find command allows you to locate a particular piece of text
anywhere in your pad. Some examples of the find command are:
find "hello";
find "lawyer" in field 1;
find "james" in field 2;
________________________________________________________________________
Chapter 14: Buttons and Fields 275
________________________________________________________________________
CONCLUSION
In this chapter you learned about buttons and fields, including how they
are created, moved, resized, and deleted. You learned how to customize
your pads by copying and pasting objects between pages and even between
different pads. We also told you about properties, which give you the
ability to create attractive buttons and fields that behave in a manner
appropriate for your pad. In the last section, you learned how to make a
button respond in different ways when it is selected by placing commands
into the button's script.
________________________________________________________________________
Appendix 3: Using the CAP utility 373
________________________________________________________________________
APPENDIX 3: USING THE CAP UTILITY
The HyperPAD CAP program is a screen capture utility for developing
computer based training or demonstration programs and other
applications. With the CAP utility, you can import character based
screen images into HyperPAD.
You can capture images from nearly any DOS program that runs in
character mode, such as Lotus 1-2-3, WordPerfect, dBASE IV and Microsoft
Word. You can capture text of three resolutions: 80 by 25, 80 by 43, and
80 by 50.
LOADING CAP
Before you start the applications program containing the screens you
want to capture, you have to load CAP into your computer's memory.
To load CAP into memory:
1. Change to the directory containing your HyperPAD program.
2. Type:
cap <filename>
Where <filename> is the name of the file in which you'd like to store
your images. If the file you name already exists, CAP adds captured
images to the end of that file
For example:
cap c:\hpad2\pics
cap screens
3. Press ENTER.
CAP displays a message that tells you that it has been loaded into
memory. CAP is loaded into memory like any other DOS program but unlike
many others, it returns you immediately to the DOS prompt.
________________________________________________________________________
Appendix 3: Using the CAP utility 374
________________________________________________________________________
CAPTURING A SCREEN
After you've loaded CAP into memory, the next step is to load a program
and bring up the screen you want to capture. The trigger (hot keys) for
taking a picture of a screen is both shift keys (SHIFT+SHIFT).
With the screen that you want to capture displayed, hold down both SHIFT
keys together until you hear a tone.
If HyperPAD can capture the image, it writes to your disk and produces a
short tone. If CAP is unable to capture the image on your screen, it
produces a longer variable tone. This occurs if you attempt to capture
from a graphics mode program, such as Windows 3.0.
A NOTE TO MICROSOFT WORD USERS
Microsoft Word versions 4.0 and higher give you the option of switching
from graphics mode to character mode. ALT+F9 is the keystroke you press
to toggle from one to the other. If you hear the HyperPAD error signal
when you press SHIFT+SHIFT, press ALT+F9 and try again.
SAVING SCREENS IN DIFFERENT FILES
Once CAP is in memory, you are free to change to a different file for
storing your images.
1. At the DOS prompt, type:
cap <newfilename>
<newfilename> is the name of a different file to receive the next
captured image.
2. Press ENTER.
________________________________________________________________________
Appendix 3: Using the CAP utility 375
________________________________________________________________________
IMPORTING CAPTURED SCREENS INTO HYPERPAD
Once you've created a CAP file, it remains on disk, waiting for you to
use the Import command from the HyperPAD File menu.
To import captured images:
1. Load HyperPAD.
2. Select the Import command from the File menu.
3. Select the Show Partner (.GX2) option from the dialog box.
4. Select the filename to be imported.
5. Select <<OK>>.
HyperPAD creates a new page on the current background for every image
you captured.
ABOUT 43-LINE EGA AND 50-LINE VGA SCREENS
Many DOS programs now support the capability of Enhanced Graphics
Adapter (EGA) and Video Graphics Array (VGA) cards to display more than
twenty five rows on a single character mode screen. You can capture
these screens with CAP, then import them into HyperPAD with the Import
command.
When importing, you must make sure the pad uses the sample screen mode
as the captured images. HyperPAD skips importing any captured images
that do not match the size of the current page. (If you have the
appropriate hardware, you can create pads in these modes by selecting
either the 43 Lines option of the 50 Lines option from the New command
on the File menu.
REMOVING CAPTURE FROM MEMORY
You can remove the capture program from memory by typing the following
command at the DOS prompt:
CAP /r
Make sure the CAP program was the last program loaded, or you will be
unable to remove it from memory.
________________________________________________________________________
Appendix 3: Using the CAP utility 376
________________________________________________________________________
CHANGING THE TRIGGER KEYS
You can change the trigger keys used to capture an images using the
following command:
cap /k
Capture responds by displaying a message instructing you to press the
new key combination.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 23
________________________________________________________________________
CHAPTER 2: FUNDAMENTALS OF USING HYPERPAD
This chapter describes the elements of a HyperPAD screen and tells you
how to perform the procedures most commonly used in working with
HyperPAD. In short, it covers all the essential terminology, concepts,
features, and operations.
Although this chapter is geared toward first-time HyperPAD users, it
will also be helpful to experienced users who have recently updated to
HyperPAD 2.0 or who need to refresh their memory about HyperPAD basics.
Here's a friendly warning to all HyperPAD users: The fundamental
terminology, concepts, features, and procedures are described at length
only in this chapter. In subsequent chapters, we'll simply use the
terminology, refer to the concepts and features, and tell you to perform
the procedures--without explaining them in detail again. That is, we'll
assume you know what we're talking about. If you forget anything, just
return to this chapter for a quick review. (To make it easier for you to
look up the major topics covered here, we've listed them below. By the
end of the chapter, you'll be quite comfortable with the terminology in
these lists, so don't be concerned if there's anything here that you
can't immediately understand.)
The components of a HyperPAD screen, which are discussed in the first
section of Chapter 2, include:
0 Menu bar
0 Title bar
0 Buttons
0 Fields
0 Command line
0 Message line
0 Status bar
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 24
________________________________________________________________________
The fundamental HyperPAD procedures, which are discussed in the second
section of Chapter 2, include:
0 Selecting commands from menus
0 Selecting buttons
0 Selecting commands from the command line
0 Working with fields
0 Selecting from list boxes
0 Filling out dialog boxes
0 Navigating within HyperPAD
0 Accessing the on-line Help system
0 Exiting from HyperPAD
COMPONENTS OF THE HYPERPAD SCREEN
The following illustrations show the elements most commonly found on
HyperPAD screens. This section will help you make sense of these
elements.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 25
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
You should be aware that some of the components of a HyperPAD screen
only display information (i.e., there's nothing you actually have to do
with these components other than understand what information they
present), whereas other components let you perform certain tasks (i.e.,
you have to know how to operate them). We'll explain the purpose of both
types of components in this section, but we'll save the how-to
procedures for the next section of the chapter, "Basic HyperPAD Tasks."
MENU BAR
A menu is a group of related HyperPAD commands. By selecting a command
from a menu, you instruct HyperPAD to carry out an action. The names of
the currently available menus are listed on the menu bar, a horizontal
strip at the very top of the HyperPAD screen.
In the second half of this chapter, you'll learn how to use the keyboard
or the mouse to open a menu (i.e., make the menu display its commands)
and then select a command from the open menu.
If you decide you don't want the menu bar displayed, you can toggle the
menu bar on and off by holding down the ALT key and pressing SPACE
(ALT+SPACE).
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 26
________________________________________________________________________
ADDITIONAL MENUS
When you first start working with HyperPAD, you have access to five
menus: File, Edit, Database, Go, and Workspace. If you start working
with HyperPAD's design capabilities, discussed in the second half of the
HyperPAD User's Guide, you'll learn how to gain access to three more
menus Tools, Objects, and Block as well as to expanded versions of the
File, Edit, and Workspace menus.
TITLE BAR
The title bar appears below the menu bar. On the left-hand side, the
title bar shows the name of the current pad. In those few cases where a
particular screen within a pad has its own name, the screen name is
displayed in the center of the title bar.
The pad name and the screen name (if any) are just there for your
information, so you'll always know where you are in HyperPAD. However,
on the right-hand side of all HyperPAD title bars (except those in the
on-line Help system), there appears a box labeled "F1=Help." This box is
a device called a button. Selecting the F1=Help button takes you to the
Help system. In the next subsection, you'll learn a bit more about
buttons, and in the second half of this chapter, you'll learn how to
operate them.
BUTTONS
Buttons are rectangular areas on a HyperPAD screen that
usually display a name indicating their function. Buttons might look
unimpressive, but they're actually powerful devices that can, among
other things, link you to different points both within and beyond
HyperPAD.
Suppose you're working in a pad and want to hop straight to another pad,
or run one of your other software programs, or go to the Index for the
Help system and pick a topic. No problem! Selecting a button can take
you from where you are to where you want to go in a single easy
operation. In the second half of this chapter, you'll learn how to
select buttons using simple keyboard and mouse techniques.
FIELDS
A field is a rectangular area on a HyperPAD screen into which you can
type information. In the page from the Phone pad shown at the start of
this section, John Smith's name, address, and phone numbers are
displayed in fields. Fields can range in size from small enough to hold
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 27
________________________________________________________________________
only a single character to large enough to cover the entire screen. In
the second half of this chapter, you'll learn how to enter information
into fields.
COMMAND LINE
The command line, a new feature in HyperPAD 2.0, appears as a row of
numbered commands near the bottom of many HyperPAD screens. It displays
both commands that are specific to the current pad and selected menu
commands that you'll use often in working with the pad.
Since the command line's numbered commands are actually buttons, picking
a command from the command line will be explained together with using
buttons in the second half of this chapter.
MESSAGE LINE
The message line, another new feature in HyperPAD 2.0, is a strip at the
very bottom of the HyperPAD screen that presents a brief reminder of how
to perform one or more basic procedures required to work with a
particular HyperPAD screen.
As indicated in the next subsection, you could have HyperPAD replace the
message line with the status bar, depending on which information you
prefer to have visible.
STATUS BAR
The status bar is a strip at the very bottom of the HyperPAD screen that
appears in place of the message line--but only if you turn it on. Its
purpose is to display important information about the pad you're working
with.
On the left-hand side of the status bar, you can see the name of the
current pad and the number of the page you're viewing within that pad.
On the right-hand side of the status bar, you can see the name of the
HyperPAD tool you're working with. (This will probably be the Browse
tool, which HyperPAD automatically selects when you're simply using the
pads rather than redesigning existing pads or designing new
pads.)
On the far right edge of the status bar, special symbols appear if you
have the CAPS LOCK and/or NUM LOCK key locked. If you were using
HyperPAD's design capabilities (discussed in the second half of the
User's Guide), you might see additional information on the right-hand
side of the status bar.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 28
________________________________________________________________________
Later in this chapter, we'll show you how to turn on the status bar
during a particular HyperPAD session. If you'd like to save yourself the
trouble of having to activate the status bar, the "Customizing HyperPAD"
section in Chapter 3 tells you how to tailor HyperPAD so it
automatically displays the status bar rather than the message line.
When first learning to use HyperPAD, you may want to leave the status
bar off so you can see the message line, with its brief reminders about
how to perform basic tasks associated with the current screen. However,
once you start working with pads that have a number of pages (such as
the Phone pad), you'll probably want to keep the status bar displayed so
you can see the page numbers.
If you have the status bar displayed and want to shut it off in order to
see the message line, hold down the ALT key and press SPACE (ALT+SPACE).
Doing this causes both the menu bar and the status bar to toggle on and
off together.
Now that you understand what you're seeing when you look at a HyperPAD
screen, let's check out the HyperPAD operations you'll need to perform
most often.
BASIC HYPERPAD TASKS
This section explains the procedures for operating some of the elements
you've already seen on the HyperPAD screen, including how to open up
menus and select commands from the open menus, how to select buttons and
choose a command from the command line, and how to use fields. This
section also introduces you to a number of other common HyperPAD
procedures, including how to use list boxes, how to fill out dialog
boxes in order to give HyperPAD vital information, how to navigate from
one place to another within HyperPAD, and how to reach HyperPAD's on-
line Help system. The last part of this section reviews the information
on exiting from HyperPAD presented in Chapter 1 and also introduces
another way to exit.
This section is your first real opportunity to play with HyperPAD, so we
suggest that you take the time to try out each of these key procedures
as you read about them. Hands-on experience is the best way to get a
feel for how any new program works, and HyperPAD is no exception.
Since we'll be showing you how to perform each of the basic HyperPAD
tasks both with the keyboard and with the mouse, we'll begin this
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 29
________________________________________________________________________
section with a brief summary of the mouse procedures used in working
with HyperPAD. If you don't have a mouse, skip the "Using a Mouse"
subsection and proceed to "Selecting Commands from Menus."
USING A MOUSE
When you work with HyperPAD, you'll be using the mouse procedures shown
in the accompanying table, which are performed with the left and right
mouse buttons. (If you have a three-button mouse, you can ignore the
middle button.)
Mouse Procedure: Explanation:
-----------------------------------------------------------------------
Point and click Place the mouse pointer on the desired item,
then press and release the left or right mouse
button. (In the User's Guide, we'll specify
which button should be used.)
Point and double-click Place the mouse pointer on the desired item,
then rapidly press and release the left mouse
button twice.
Point and press Place the mouse pointer on the desired item,
then hold down the left mouse button.
Point, press and drag Position the mouse pointer at the desired
starting point, then hold down the left mouse
button and slide the mouse, releasing it when
you reach the desired spot.
There are many HyperPAD operations that can be done with either the
keyboard or a mouse. In some cases, it's faster to use the keyboard; in
other cases, it's faster to use a mouse; and in still other cases, the
two methods are equally fast. You'll soon develop your own preference
for which method to use in carrying out each task.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 30
________________________________________________________________________
SELECTING COMMANDS FROM MENUS
Giving orders to HyperPAD is a simple two-step process. All you have to
do is open the menu that contains the command you want and then select
the command from the open menu. When you open a menu, a list of the
commands it contains appears below its name on the menu bar, as shown
here.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
You can use either the keyboard or a mouse to open a menu and select a
command from the open menu. Here's how.
To select a command from a menu:
1. To open a menu:
With the keyboard: Press ALT and the first letter of the menu name. For
example, to open the Go menu, press ALT+G.
With the mouse: Point to the menu name on the menu bar and click the
left mouse button.
2. To select a command:
With the keyboard: Press the key matching the highlighted letter in the
command. For example, to choose the Home command from the Go menu, press
H.
With the mouse: Point to the command and click the left mouse button.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 31
________________________________________________________________________
In the first step of the above procedure, you learned how to open a menu
by holding down ALT and pressing a keyboard letter. That keyboard letter
is called an accelerator key. As you'll see later in the chapter, menus
aren't the only HyperPAD elements that can be activated by pressing ALT
and an accelerator key.
The following are two optional command-selection methods you might want
to try: Once you've opened a menu with the keyboard or the mouse, you
can select a command by pressing the up and down arrow keys until the
desired command is highlighted and then pressing ENTER. And you can
select a command with a mouse by pointing to the menu name, pressing the
left mouse button, dragging the highlight bar down to the desired
command, and then releasing the button. (To avoid selecting the wrong
command, make sure the highlight bar is correctly positioned before you
release the button.)
If you're not sure which menu lists a particular command, use the
following procedure to browse through the menus.
To browse through the menus:
1. To activate the menu bar, press ALT or F10.
The name of the last menu you used is highlighted.
2. To highlight the name of a different menu, press the left or right
arrow keys.
3. To open the menu whose name is highlighted, press ENTER.
4. To open other menus, press the left and right arrow keys.
As you open each new menu, the previously opened menu automatically
closes.
To open different menus with the mouse, point to the name of each menu
and click the left mouse button. Every time you open a new menu, the
previously opened menu automatically closes.
If you open a menu and then decide that you don't want to pick a
command, here's how to close the menu without making a selection.
To close a menu without selecting a command:
Press the ESC key, click the right mouse button, or place the mouse
pointer anywhere on the screen other than the menu bar or the open menu
and click the left mouse button.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 32
________________________________________________________________________
To check out some of the keyboard procedures, start by pressing ALT+W to
open up the Workspace menu, then press S to select the Status Bar
command. The menu closes, and the message line at the bottom of your
screen is replaced by the status bar. To turn off the status bar, just
reopen the Workspace menu and select the Status Bar command again. Not
only is this a good example of how to select a command, but in the
process you learned how to activate the status bar!
Now, let's try some more keyboard procedures. With the Workspace menu
closed, press ALT or F10. Workspace (the name of the menu you opened
most recently) is highlighted on the menu bar. Use the left and right
arrow keys to move the highlight around the menu bar. When File is
highlighted, press ENTER to open the File menu. Practice using the up
and down arrow keys to move the highlight bar through the File menu's
list of commands. Then use the left and right arrow keys to open other
menus. Once you're comfortable with these techniques, press ESC to close
whatever menu is now open.
If you have a mouse, point to Workspace on the menu bar and click the
left mouse button. When the Workspace menu opens, turn on the status bar
by pointing to the Status Bar command and clicking the left mouse
button. Practice opening different menus by pointing to the menu names
on the menu bar and clicking the left mouse button. Point to File on the
menu bar, press the left mouse button, and practice dragging the
highlight bar up and down the File menu's commands. (If you accidentally
select a command, press ESC to cancel it.) When you're through
practicing, click the right mouse button to close whatever menu is now
open.
USING KEYBOARD SHORTCUTS
HyperPAD gives you the ability to select certain commands and carry out
certain actions by using a keyboard shortcut. A keyboard shortcut can
consist of either a single keystroke or a keystroke combination. If a
keyboard shortcut is available for a menu command, it appears to the
right of that command on the menu.
The Go menu, shown at the start of this subsection, contains
some examples. The Help command is followed by F1, which means you could
press F1 to access the Help system without opening the Go menu. *F5
appears after the Home command, meaning you could press ALT+F5 ("*"
means "ALT") to return to the Home pad from anywhere in HyperPAD. ^PGUP
appears after the First command, meaning you could press CTRL+PGUP ("^"
means "CTRL") to go directly back to the first page in a pad. And so on.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 33
________________________________________________________________________
To try it out, keep all the menus closed and press the F1 key. The Help
system appears. Press the ESC key to exit from Help and return to the
page you were on when you pressed F1.
Once you become more experienced in working with HyperPAD, you'll begin
to remember the keyboard shortcuts and use them to save yourself time.
INACTIVE COMMANDS
In the course of exploring the menus, you may have discovered that
you're unable to highlight some commands with the keyboard or the mouse.
These commands even look different: They may be dimmer than the other
commands, and they don't have a highlighted accelerator key. What's
going on?
There are some commands that HyperPAD won't let you select until you're
actually ready to carry them out--for example, the Edit menu's Cut,
Copy, and Delete commands. These commands (which you'll learn about in
Chapter 9) are for editing text, and in order to use them, you must
first select a specific block of text that you want to cut, copy, or
delete. If you haven't done so, HyperPAD "knows" you're in no position
to perform those particular operations and therefore prevents you from
selecting the commands. But once you take whatever preparatory action is
needed, HyperPAD enables the commands related to that operation so you
can select them.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 34
________________________________________________________________________
SELECTING BUTTONS
In the first section of the chapter, we explained that many buttons are
navigation devices that you can use to travel from the page on which the
button appears to another pad or page within HyperPAD or to somewhere
outside of HyperPAD. To start the journey, you have to select the button
that links you to your desired destination. Here's how to do it.
To select a button:
With the keyboard: Press the TAB key and/or the arrow keys until the
button you want to select is highlighted (pressing SHIFT+TAB moves the
highlight backward); then press ENTER.
With the mouse: Place the mouse pointer on the button you want to select
and click the left mouse button.
If you're ever unsure which items on a HyperPAD screen are buttons,
press CTRL+ALT. A dotted border will be displayed around all the buttons
and fields on the current page.
To check out how buttons work, go to the Home pad, which was shown at
the start of the first section in this chapter. (If you aren't at the
Home pad right now, hold down the ALT key and press F5 [ALT+F5] to go
directly to the Home pad from anywhere in HyperPAD.) Use TAB, SHIFT+TAB,
and the arrow keys to move the highlight from one button to another on
the Home pad. In the course of moving the highlight around, you'll
discover that the rectangles in the "What would you like to do?" box get
highlighted, as do F1=Help on the title bar and Shut Down and ESC=Exit
in the lower right corner of the screen. These items are all buttons.
Once you're comfortable using the keyboard to move the highlight from
one button to another, use the keyboard or the mouse to select the Go to
a pad button. A screen appears with even more buttons!
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 35
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
You've just used the Go to a pad button to travel from the Home pad to
the Pads screen, from which you can access many of the pads that come
with HyperPAD. In Chapter 3, you'll learn more about this screen, but
since we're just sightseeing right now, use the keyboard or the mouse to
select the Home button in the lower right corner of the screen to make
the return journey from the Pads screen to the Home pad.
SELECTING COMMANDS FROM THE COMMAND LINE
In the first half of this chapter, you were introduced to the command
line, a feature that appears on many HyperPAD screens to display not
only commands that are specific to the current pad but also menu
commands used frequently in working with the pad.
Use the following accelerator key method to select a command from the
command line.
To select a command from the command line:
Hold down ALT and press the number on the keyboard that matches the
number in front of the command.
Note: You must press the appropriate number on the keyboard, not on the
numeric keypad.
You may recall that we said the commands on the command line are
actually special numbered buttons. So if you wanted to, you could select
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 36
________________________________________________________________________
them just as you would select any other button--i.e., by pressing TAB,
SHIFT+TAB, and the arrow keys to highlight the command you want to
select and then pressing ENTER or by pointing to the desired command and
clicking the left mouse button. However, you'll find the accelerator key
method is much faster.
To check it out, go to the Home pad (ALT+F5) and select the Manage files
button. A pad called the DOS Shell appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The DOS Shell lets you perform a wide range of file-management tasks, as
you'll see in Chapter 4. But for the moment, all you're going to do is
get a taste for the kinds of things that can happen when you select a
command from the command line.
Start by pressing ALT+1 to select the Sort command. A list called a pop-
up appears, offering you a choice of different ways to sort your files.
Close the pop-up by pressing the ESC key or clicking the right mouse
button. Now select the Tree command (ALT+2). A list (called a tree view)
appears showing the breakdown of directories on one of your local
drives. (Notice that the tree list has its own command line.) Press the
ESC key to exit from the tree view and return to the DOS Shell. And
finally, select the Browse command (ALT+8). A rectangle (called a dialog
box) is superimposed on the screen, asking you which file you'd like to
browse. Press the ESC key or click the right mouse button to close this
dialog box. Then press ALT+F5 to return to the Home pad.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 37
________________________________________________________________________
USING FIELDS
Many HyperPAD screens have fields--rectangular areas into which
information can be entered. On the page from the Phone pad shown in the
first section of this chapter, you saw a number of fields, with John
Smith's name, address, and phone numbers typed in. (If you ever have
trouble telling which areas of a page are fields, remember the tip we
gave you earlier in the chapter: Press CTRL+ALT to make a dotted border
appear around all the buttons and fields on the current page.)
Using fields requires two skills: First you have to know how to get the
cursor into the field you want to work with; then you have to know how
to add new information or edit existing information.
To enter and type into a field:
1. To enter the field where you want to type:
With the keyboard: Press the TAB key until the field is highlighted
(pressing SHIFT+TAB moves the highlight backward); then press F2 to
unhighlight the field so you can start typing.
With the mouse: Move the mouse pointer to the spot in the field where
you want to start typing and click the left mouse button to place the
cursor there.
2. To move the cursor around the text in the field, either use the
arrow keys or reposition the cursor with the mouse; to delete text, use
the BACKSPACE key.
3. To go to the next button or field when you're done, press TAB or
point to the desired item and click the left mouse button.
To check it out, go to the Home pad (press ALT+F5 ) and select the Go to
a pad button. When the Pads screen appears, select the Phone button.
John Smith's page, which you saw earlier in this chapter, appears. To
get a fresh page that you can experiment with, select the New command
from the command line (ALT+7). When the new page appears, try using TAB
and SHIFT+TAB to move the highlight from one field to another.
Once you're comfortable moving the highlight around, either press the F2
key or place the cursor in a field with the mouse and then type in some
information. Use the keyboard or the mouse to enter a couple of more
fields and type in additional information. Then use the keyboard or the
mouse to reenter the fields into which you've already typed text and
practice pressing the arrow keys to move the cursor around within the
text. Try using the BACKSPACE key to delete some text. When you're
finished, press ALT+F5 to return to the Home pad.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 38
________________________________________________________________________
Scrollable fields: Some HyperPAD screens, such as the one shown here,
have scrollable fields.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The important thing to realize about a scrollable field is that it's
capable of containing far more information than what you see displayed
at one time. You can use the keyboard and mouse techniques shown in the
accompanying tables to "scroll" (move) up and down through the
information until the material you're after is displayed in the field.
Key(s): Action:
------------------------------------------------------------------------
Arrow keys Move the cursor in the direction of the arrows
by pressing the up/down arrow keys, you can
scroll the cursor up/down through the text.
PLUS key (keypad) Moves the cursor down one page.
MINUS key (keypad) Moves the cursor up one page.
HOME key Moves the cursor to the start of the current
line.
END key Moves the cursor to the end of the current
line.
CTRL+END keys Moves the cursor to the end of the field.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 39
________________________________________________________________________
To get some practice with a scrollable field, let's go to the Daily
Planner's Notes for the day field, which you saw earlier in this
subsection. Start by returning to the Home pad (ALT+F5) and selecting
the Go to a pad button; then select the Daily Planner button. When the
Daily Planner page appears, place the cursor in the Notes for the day
field and type in a numbered list 15 items long. As you get to about
item 9, you'll see the field scroll up to give you more room to type.
Once you've entered all 15 items, try using the keyboard and mouse
techniques presented in the tables to move around through the text in
the field. When you're finished, press ALT+F5 to return to the Home
pad.
Mouse technique: Action:
---------------------------------------------------------------------
Point to the up/down scroll Moves the cursor up/down one
arrow and click the left mouse line at a time.
button.
Point to the up/down scroll Moves the cursor up/down
arrow and press the left mouse continuously.
button, releasing the button when
the desired text comes into view.
Place the mouse pointer on the Moves the cursor up/down
field, press the left mouse button, extremely rapidly.
and drag the mouse up/down,
releasing the button when the
desired text comes into view.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 40
________________________________________________________________________
SELECTING FROM LIST BOXES
Sometimes you'll ask HyperPAD to perform a particular operation and
HyperPAD starts by telling you what your available options are. You
might, for example, select the Home pad's Run a program button because
you want to launch one of your other software programs. Since HyperPAD
can't take any action until you specify which program to run, it
displays a list box (a new feature in HyperPAD 2.0, an example of which
is illustrated here) showing the programs that can currently be
launched, so you can pick the one you're after.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
A list box, then, is simply a device that HyperPAD uses to let you
select from a large number of choices.
In order to work with list boxes, you have to know how to perform three
operations. First, you have to know how to use the keyboard or the
mouse to highlight an item on the list. Then you have to know how to
either select an item or mark one or more items. (Whether you select an
item or mark items depends on what type of operation you want to perform
in a particular list box. You can select only one item at a time from a
list box, but you can mark as many items as you want.)
As you can see from the illustration, list boxes are scrollable. This
means that in many ways list boxes work like scrollable fields. List
boxes often contain more information than what you see displayed at one
time, and you can use a number of keyboard and mouse techniques to move
up and down through the information until the item you're after is
displayed in the list box.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 41
________________________________________________________________________
Key: Action
-------------------------------------------------------------------
Up/down arrow keys Move the highlight up/down one line.
A...Z keys Move the highlight directly to the first
item on the list starting with that letter.
PLUS key (keypad) Moves the highlight down one page.
MINUS key (keypad) Moves the highlight up one page.
HOME key Moves the highlight to the first item on the
list.
END key Moves the highlight to the last item on the
list.
To use a list box with the keyboard, press TAB until the highlight
enters the list box you want to work with (if the highlight isn't
already on one of the items there). Now that one of the items in the
list box is highlighted, you can use the keys presented in the
accompanying table to move the highlight bar to the desired item. Some
of the same keys are used to move around within list boxes as to move
around within scrollable fields; however, notice that there are some
differences.
If the list you're working with exceeds the length of the list box, you
can make the list scroll up to reveal additional items by continuing to
press the down arrow when the highlight reaches the last item displayed
in the list box or by pressing the plus key on the numeric keypad. You
can make the list scroll down by continuing to press the up arrow when
the cursor reaches the first item displayed in the list box or by
pressing the minus key on the numeric keypad.
Once you've highlighted the desired item with the keyboard, press ENTER
to select it or press SPACE to mark it. When you mark a list box item,
an arrow appears in the left margin of the list box beside the item.
(To unmark an item, just highlight it and press SPACE again.)
If you have a mouse, you can scroll through a list box using the same
techniques presented earlier in the chapter for moving through a
scrollable field. Once the desired item is visible in the list box, you
can select the item by pointing to it with the mouse and double-clicking
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 42
________________________________________________________________________
the left mouse button. You can mark an item by pointing to it with the
mouse and clicking the right mouse button. (To unmark an item, just
point to it with the mouse and click the right mouse button again.)
To check it out, select the Run a program button on the Home pad to
display the Programs list box shown at the start of this subsection. If
necessary, TAB or use the mouse to move the highlight into the list box;
then practice using the keyboard and mouse techniques presented in this
chapter to move the highlight through the list.
Try using the keyboard and the mouse to mark and unmark a few items on
the list. If you're feeling adventurous, launch one of your other
software programs by selecting it with the keyboard or the mouse. When
you exit from the program, you'll come right back to the Programs list
box. Press ALT+F5 to return to the Home pad once you're through
practicing.
FILLING OUT DIALOG BOXES
Whenever HyperPAD needs to communicate with you--i.e., to send you a
message or get some information from you--it displays a special window,
called a dialog box. Every dialog box has one or more controls, which
are devices you can use to specify information or change a setting.
The most basic type of dialog box is the error message, an example of
which is shown here.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
This error message explains why HyperPAD can't carry out your command.
<<Ok>> is already highlighted, so all you have to do is press ENTER to
acknowledge that you've received the message.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 43
________________________________________________________________________
Selecting the Printer Setup command from the File menu calls up the
following more complicated HyperPAD dialog box, in which there are three
types of controls: a list box, a group of option buttons, and a text
box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If you use the Print command on the File menu to tell HyperPAD you want
to print columns, you also get a relatively complicated dialog box,
shown here, in which, in addition to the controls you saw earlier, there
are some option buttons. (In a minute, we'll explain the difference
between option buttons and option button groups.)
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Earlier in the chapter, when you practiced opening menus and viewing
their lists of commands, you may have wondered why some of the commands
are followed by three periods (called ellipses). For instance, ellipses
appear after many of the commands on the File menu, shown here.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 44
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Ellipses after a menu command are a tip-off that HyperPAD is going to
need certain information from you in order to carry out that command--
i.e., that HyperPAD will present a dialog box if you select the command.
To fill out any kind of dialog box, you must know three things: how to
move the highlight between and within controls, how to operate each type
of control, and how to tell HyperPAD that you're through with the dialog
box.
NAVIGATING BETWEEN DIALOG BOX CONTROLS
Moving the highlight between dialog box controls is simple. Just keep
pressing the TAB key until the control you want to work with is
highlighted. (Press SHIFT+TAB to move the highlight backward.)
Once you've reached the desired control, how you move the highlight from
one item to another within it depends on what type of control it is.
Therefore, navigating within dialog box controls is discussed in the
following subsections on the various controls.
TEXT BOXES
Text boxes are one dialog box control you should have no
trouble operating, since typing into a text box is just like typing into
a field, which you learned how to do earlier in this chapter. When
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 45
________________________________________________________________________
you're through entering information in a text box, move to the next
control either by pressing TAB or by pointing to it with the mouse and
clicking the left mouse button.
LIST BOXES
List boxes, another HyperPAD feature discussed earlier in this chapter,
can also appear within dialog boxes, where they're used to let you
quickly choose from a list. For instance, to change the name of the
current printer in the Printer Setup dialog box, illustrated at the
start of this subsection, just select the name of another printer from
the list box (by highlighting the name with the keyboard and pressing
ENTER or by pointing to it with the mouse and double-clicking the left
mouse button). The newly selected name is now shown as the current
printer.
OPTION BUTTONS AND OPTION BUTTON GROUPS
An option button is a dialog box control that can be turned on
(selected) or turned off (unselected). To toggle an option button from
selected to unselected or vice versa, either TAB to the option button
and press SPACE or point to it with the mouse and click the left mouse
button. When an option button is selected, an "X" appears within the
brackets in front of the button. Once you've changed the option button's
setting, TAB to the next control.
An option button group is an interconnected set of mutually exclusive
options--i.e., only one option from the group can be selected at any
given time. For example, in the Print Column Report dialog box, shown
earlier, the Spacing list is a group of two option buttons--Single and
Double. Clearly, you can pick just one of these options, since a report
can't simultaneously be both single- and double-spaced. (In contrast,
the option buttons in the Names column of this dialog box are not
grouped--i.e., they're not mutually exclusive. In the illustration, both
Field and Page are selected in the Names column, since there's no reason
why you can't simultaneously print field names and page names in your
report. Or you could have told HyperPAD to print only one of these two
names or neither name.)
To select an option from an option button group, TAB to the group of
option buttons and then use the up and down arrow keys to move the
highlight through the options. As you highlight each option, an "X"
appears in the parentheses in front of the option. When the desired
option is highlighted, press TAB to select that option and proceed to
the next control. Or point to the desired option with the mouse and
click the left mouse button. When you click on an option, an "X" appears
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 46
________________________________________________________________________
within the parentheses in front of the option and the previously
selected option in the group is automatically unselected.
You've probably noticed that option buttons and option button groups
look pretty similar and that a single dialog box can contain a number of
option buttons as well as one or more option button groups. So the
question is, how do you tell whether a control is an option button
(which can be selected or unselected independently of other option
buttons) or whether it's part of an option button group (which functions
as an interconnected set of options from which you can make only one
selection at a time)?
Here's an easy way to tell at a glance: Each option button is preceded
by a pair of brackets [ ], whereas each option in an option button
group is preceded by a pair of parentheses ( ). Just look for the
parentheses or the brackets, and you'll know how to operate the control.
CLOSING DIALOG BOXES
After you've typed in all the required information and made any
necessary changes to a dialog box's settings, TAB to <<Ok>> and press
ENTER or point to <<Ok>> and click the left mouse button. This tells
HyperPAD that you're through with the dialog box and that it can now
close the box and carry out your instructions.
If you want to exit from a dialog box without changing the status of any
of the controls, either press the ESC key, TAB to <Cancel> and press
ENTER, or point to <Cancel> and click the left mouse button. Even if
you've already typed information into a text box or changed some of the
dialog box's settings, this tells HyperPAD to ignore these changes
(i.e., leave the dialog box the way it originally was) and just close
the box.
DEFAULT SETTINGS
In some cases, you'll open a dialog box and find that HyperPAD has
already chosen certain options and values to save you the trouble of
doing so. These preselected settings, which are the settings HyperPAD
"expects" you to choose, are called default settings. For example, in
the dialog box used to set up pages for your printer, one of HyperPAD's
default settings is for letter-size paper measuring 8.5 inches by 11
inches--the most common choice. If HyperPAD failed to guess your
intentions correctly, you can easily change these default settings.
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 47
________________________________________________________________________
For practice, you can work with the dialog boxes shown in this
subsection. To access the Printer Setup dialog box, open the File menu
and select the Printer Setup command (ALT+F, U). Use the keyboard or the
mouse to select different printers from the Available printers list box
and watch how your selections change the name of the Current printer
(displayed above the list box).
TAB to the Print to control (a group of option buttons) and use the up
and down arrow keys to move the highlight within the group. If you have
a mouse, try selecting different options in this group. When you're
through practicing, close the dialog box by selecting <Cancel>, pressing
the ESC key, or clicking the right mouse button.
To call up the Print Column Report dialog box, you must be on a page
with fields (HyperPAD won't present this dialog box unless it knows
you're working with a page on which printable information could be
typed). Go to the Home pad, select the Go to a pad button, and then
select the Index Cards button. When the Index Cards pad appears, select
the Print command from the File menu (ALT+F, P). This brings up the
Print dialog box, which has only one control--an option button group.
Use the up and down arrow keys or the mouse to select the Columns
option. When you select <<Ok>> or press ENTER, the Print Column Reports
dialog box appears.
Move the highlight to the Names column and practice selecting both of
the option buttons, or only one of them, or neither. If you want more
practice with an option button group, work with the options in the
Spacing column. If you want more practice with text boxes, type in new
information for the header and footer and for the margins. When you're
finished with the dialog box, close it as indicated above.
NAVIGATING WITHIN HYPERPAD
When we talk about navigating within HyperPAD, we're referring to the
techniques you can use to travel around a HyperPAD screen, to travel
within a pad, and to travel between pads. This subsection will review
some methods you're already familiar with and introduce a number of new
methods.
NAVIGATING AROUND A HYPERPAD SCREEN
You've already seen how to use the arrow keys, TAB, and SHIFT+TAB to
move the highlight around the buttons on a HyperPAD screen and how to
use TAB and SHIFT+TAB to move between fields. You've also seen how to
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 48
________________________________________________________________________
move the highlight to the name of the most recently selected menu on the
menu bar by pressing the F10 key.
You've also learned how to save yourself time by using accelerator keys
to open menus and to select commands from the command line (i.e., hold
down the ALT key and press either the highlighted letter in the menu
name or the number of the command on the command line), as well as to
select commands from an open menu (i.e., just press the highlighted
letter in the command, without holding down ALT).
However, you may not have realized that other HyperPAD elements can
sometimes have accelerator keys, too, such as dialog box options and
buttons that are not on the command line. To identify the accelerator
keys on a particular screen, press ALT and see which letters and numbers
become highlighted. You can select any of these items simply by pressing
the highlighted letter or number while holding down ALT (i.e., without
bothering to move the highlight around).
To check it out, select the Printer Setup command from the File menu to
call up the Printer Setup dialog box again. (You saw this dialog box and
experimented with it in the preceding subsection of this chapter.) Press
ALT and watch the dialog box for highlighted accelerator keys. In this
case, 1, 2, F, O, and C become highlighted, so you could select the LPT1
option in the Print to group by pressing the accelerator key 1 while
holding down ALT (ALT+1); you could select the File option in this group
by pressing ALT+F; you could select <<Ok>> by pressing ALT+O; etc.
NAVIGATING WITHIN A PAD
When you work with pads that have more than one page (such as the Phone
pad, which you saw in the first section of this chapter), you need to
know how to get from one page to another within the pad. You could
always open the Go menu and select the Next, Previous, First, and Last
commands to get to the following or preceding page in a pad or to the
first or last page, but HyperPAD also offers some considerably faster
navigation techniques.
Earlier in the chapter, you learned about keyboard shortcuts--single
keystrokes or keystroke combinations that you can press to activate a
command without even opening a menu. The keyboard shortcuts for
navigation are PGUP and PGDN (to go to the previous page or the next
page in a pad) and CTRL+PGUP and CTRL+PGDN (to go to the first page or
the last page in a pad).
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 49
________________________________________________________________________
You can also travel between pages by selecting one of the on-screen
paging buttons, shown here.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Selecting the left-hand paging button moves you back one page within the
pad; selecting the right-hand paging button moves you forward one page.
The paging buttons are just like any other HyperPAD buttons, so you can
select them with the same keyboard and mouse techniques for button
selection that you learned earlier in
the chapter.
If you want to create a new page within the pad, press the F3 key. The
new page is inserted right after the page you were on when you pressed
F3, and the remaining pages in the pad are renumbered accordingly. You
can now use the methods described above to travel to and from your new
page.
To check it out, go to the Notes pad. (To get there, go to the Home pad,
select the Go to a pad button, then select Notes from the Pads screen.)
Start by selecting the Status Bar command from the Workspace menu if you
don't already have the status bar displayed. That way, you'll be able to
see the page numbers on the status bar as you move around within the
Notes pad. Press F3 several times to create some new pages, since you
won't get much navigational practice if your pad only has a page or two.
Practice using the PGUP and PGDN keys to go from one page to another.
Try pressing PGUP and PGDN while holding down the CTRL key to skip
straight to the first and last pages in the pad. Move between pages by
selecting the paging buttons with the keyboard or the mouse. When you're
through experimenting, return to the Home pad by pressing ALT+F5.
NAVIGATING BETWEEN PADS
You've already learned that you can move from one pad to another if the
page you're on has a button that links it to another pad.
A couple of very common HyperPAD buttons are F1=Help (which appears on
all title bars except those in the Help system) and Home. You could also
reach the Help pad and the Home pad by selecting the Help and Home
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 50
________________________________________________________________________
commands from the Go menu or by using the keyboard shortcuts F1 (for
Help) and ALT+F5 (for Home).
When you experimented with the Notes pad in the preceding subsection,
you might have noticed the following little angled double arrow near the
bottom of the page.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
This arrow, called the return button, takes you back to the place in
HyperPAD from which you originally accessed the current pad. For
example, if you select the return button on the Notes pad, you'll go to
the Pads screen again, which is where you were when you called up the
Notes pad. Return buttons are most often found on pads that you reach
via the Pads screen, and they provide a quick way to come back to that
screen so you can pick another pad.
On some HyperPAD screens, you'll see a button that reads ESC=Done, which
serves a similar purpose. Selecting ESC=Done returns you to wherever you
were when you called up the current screen.
Pressing the ESC key on the keyboard has the same effect as selecting
the on-screen return button or the ESC=Done button. It takes you from
one screen in HyperPAD to the place from which you accessed that screen.
For example, if you're in a dialog box, pressing ESC takes you back to
the screen from which you called up the dialog box. If you're in a pad
that you reached from the Pads screen, pressing ESC takes you back to
the Pads screen. From there, you could press ESC to return to the Home
pad, which is the screen from which the Pads screen is accessed. Once
you finally reach the Home pad, pressing ESC starts the procedure for
exiting from HyperPAD.
NAVIGATING BOTH WITHIN AND BETWEEN PADS
If you ever want to retrace your steps through HyperPAD, just press the
F5 key repeatedly. This takes you back through the pages you've just
viewed, one page at a time--regardless of whether the pages are in the
same pad or in different pads. (You could also backtrack by selecting
the Back command from the Go menu over and over again.)
To check it out, try pressing F5 a few times. You'll see the pages
you've just been using, starting with the most recent and working
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 51
________________________________________________________________________
backward from there. Whenever you get tired of backtracking, just press
ALT+F5 to return to the Home pad.
GETTING HELP
HyperPAD's on-line Help system is discussed in detail in Chapter 6. But
just in case you get into trouble (or simply get curious) before then,
we'll tell you how to access this feature.
Pressing F1 on your keyboard calls up a Pad Help page that summarizes
key information about the screen you were just viewing. You can then get
even more information by selecting the summary screen's Index button
(which appears on all Pad Help pages except Indexes) to access a list of
Help topics for the current pad.
Once you're in Pad Help, pressing F1 a second time calls up the Index
for General Help; you can select from the topics listed there to get
further information about basic HyperPAD operations.
Whenever you're done using Pad Help or General Help, just
press the ESC key to return to the page you were working on when you
accessed Help.
EXITING FROM HYPERPAD
In Chapter 1, you were firmly cautioned not to turn off your computer
until you first follow one of several very simple and quick procedures
for exiting from HyperPAD. Two of these exiting methods are to press the
ESC key when you're on the Home pad or hold down CTRL and press Q
(CTRL+Q) from anywhere in HyperPAD. HyperPAD then asks you to confirm
your intentions by presenting a dialog box with the question "Are you
sure you want to exit?" You can reply by selecting <<Ok>> or <Cancel>.
Another approach is to select the Home pad's Shut Down button, which
calls up a dialog box advising you that "You may now turn off your
computer safely."
The reason this step is so crucial is that when you give fair warning
that you're about to end the current session, HyperPAD immediately saves
your data, whereas if you shut off your machine without announcing your
intentions in advance, you could lose important data, including whole
pads!
________________________________________________________________________
Chapter 2: Fundamentals of Using HyperPAD 52
________________________________________________________________________
Another way to exit (besides the ESC, CTRL+Q, and Shut Down methods) is
to select the Exit command from the File menu. When you leave HyperPAD
in this manner, HyperPAD does not present a dialog box asking you to
verify your decision but instead immediately returns you to DOS once you
select Exit.
CONCLUSION
After reading this chapter, you should recognize the elements that are
common to all or most HyperPAD screens and know how to perform basic
operations in HyperPAD, including accessing Pad Help and General Help,
selecting buttons, and selecting commands from the command line. You
should also be able to use a mouse (if you have one) for basic HyperPAD
tasks, navigate within HyperPAD, type into a field, open up a menu and
select from the commands displayed there, and use list boxes and dialog
boxes to communicate your intentions to HyperPAD. And finally, you
should know how to exit from HyperPAD. Armed with this information,
you're all set to start using HyperPAD!
_______________________________________________________________________
Appendix 1: General Error Messages 357
________________________________________________________________________
APPENDIX 1: GENERAL ERROR MESSAGES
HyperPAD displays an error message when it finds itself unable to carry
out a command or action. The message displayed is intended to help you
understand the error and take an appropriate action. This section lists
each of the HyperPAD general error messages in numerical order, and
includes a description of each error and suggestions for recovering.
Notes:
All error messages are contained in the file HPAD.MSG, which was copied
to your hard disk when you first installed HyperPAD. If HPAD.MSG is not
present, only the error number is displayed when an error occurs.
See Appendix 1 of the PADtalk Reference Guide for errors received when
using PADtalk.
1. Can't delete page while linking.
You chose the <Link To...> option from a Button Info dialog box, then
attempted to delete the page containing the button you are linking.
If you want to delete this page, press ESC to cancel the Link To action,
then choose the Delete command (ALT+E,D) from the Edit menu.
2. Can't delete protected page.
You have attempted to delete a page with the Cant delete option set in
the Page Info dialog box.
Open the Page Info dialog box and set the Can't delete option off, then
choose Delete from the Edit menu to delete the page.
3. Can't delete last page.
You have attempted to delete the only remaining page of a pad.
HyperPAD does not permit you to delete a pad in this way. To delete a
pad, choose Delete from the File menu.
_______________________________________________________________________
Appendix 1: General Error Messages 358
________________________________________________________________________
4. Can't duplicate object.
You have attempted to duplicate a button or a field when your system
lacks sufficient memory to carry out the action.
Exit HyperPAD, then try to free up some memory in your system by
removing Terminate and Stay Resident (TSR) programs from memory. Then
start HyperPAD and try this action again.
You can also try reducing the number of objects on a page, therefore
reducing the memory requirement of the page.
5. Can't delete protected pad.
You have attempted to delete a pad with the Can't delete pad option set
in the Protect dialog box.
Choose Protect from the File menu and set the Can't delete pad" option
to Off, then choose Delete from the File menu.
6. Not enough memory to edit script.
You have attempted to edit a script when there is not enough memory.
Exit HyperPAD, then try to free up some memory in your system by
removing Terminate and Stay Resident (TSR) programs from memory. Then
start HyperPAD and try this action again.
You might also try reducing the number of objects on the page, thereby
reducing the memory requirement.
7. Can't modify protected pad.
You have attempted to modify a "read-only" pad.
To make it possible to modify this pad, choose Protect from the File
menu and set the Read Only option to off. (If Protect does not appear on
your File menu, press ESC to close the File menu, then press ALT+SHIFT+F
to open the extended File menu).
_______________________________________________________________________
Appendix 1: General Error Messages 359
________________________________________________________________________
8. Reserved.
Reserved for future use.
9. Invalid pad or wrong version.
You have attempted to load a DOS file that is either not a pad file, is
a corrupt pad file, or was created with a later version of HyperPAD than
the version you are running.
10. Can't use tool at current user level.
You have attempted to choose a tool when the user level of the pad is
set too low. This error is displayed, for example, if you attempt to use
the Selector tool while the user level is set to Painting.
Choose Protect from the File menu to increase the user level of the pad.
11. Can't go to that page.
You have attempted to go to a page that does not exist.
To see the current page number, turn the status bar on with the
Workspace Status bar command. To go to the last page, press CTRL+PGDN.
12. Premature end of file (possible non-ASCII file).
You have attempted to import an ASCII file with the Import command, but
the file you chose contains an unexpected end of file character.
Check to make sure that the file you are trying to import is an ASCII
text file and repeat the Import command.
13. Can't find file.
You have attempted to run a program that HyperPAD can't find. HyperPAD
searches the current directory, the directory from which you started,
the directory specified by the environment variable HPADNET, and every
directory specified in your DOS path.
Choose Run from the File menu, then enter a valid program filename,
including a directory in front of the filename if the program is not in
your DOS path.
_______________________________________________________________________
Appendix 1: General Error Messages 360
________________________________________________________________________
14. Invalid print settings--change and try again.
You entered incorrect information in a dialog box when you attempted to
print. You may have specified an invalid range of pages or more pages
than will fit on a printed page using the current printer settings.
First, choose Printer Setup from the File menu to make sure that
HyperPAD is using the printer driver for your printer. Then choose Print
from the File menu and complete the dialog boxes that appears.
15. Can't edit scripts at current user level.
You have attempted to edit a script in a pad whose user level is not
Scripting.
Choose Protect from the File menu to set the User option to Scripting.
16. Printer not ready.
The printer reported an error receiving characters that you sent with
the print command.
Check that the printer cable is connected to your parallel port and make
sure that the printer is turned on and on-line.
17. Can't delete home pad.
You have attempted to delete the Home pad.
Due to the importance of the Home pad in the HyperPAD message passing
hierarchy, you cannot delete the Home pad from within HyperPAD. Use the
DOS Delete command to delete the HOME.PAD file.
18. No records to import.
You have selected a DBF file that is empty.
Load dBASE III or another file that reads and writes DBF files and enter
some records into the file. Then repeat the Import command.
19. Modem port not found.
You have attempted to use the dial command, but HyperPAD can't find the
serial port you have chosen.
Open the Dial pad and make sure that the communications port you chose
for your modem is correct, then attempt the action again.
_______________________________________________________________________
Appendix 1: General Error Messages 361
________________________________________________________________________
20. No response from modem.
HyperPAD has sent a Hayes command to your modem, but the modem did not
respond as expected.
Make sure that your modem is on and is properly connected to your PC. If
so, it may be that your modem is not fully Hayes compatible.
21. Error printing.
There has been an error by DOS while printing.
Since DOS does not provide any specific information about the error, you
may have to try a number of actions. Check the connection between your
system and your printer. Make sure that your printer is on and is ready
to print. And make sure that there the paper is properly loaded. If
these actions do not correct the error, choose File Printer Setup from
the File menu and make sure that HyperPAD is using the correct printer
driver.
22. Can't edit mastered script.
You have attempted to edit a script that has been stripped of its source
code using the STRIP utility program. (This utility removes the readable
portions of scripts in a pad, leaving only the compiled code needed for
HyperPAD to run the pad).
Locate the original pad containing the full scripts and edit the scripts
in that pad, then remaster the pad with the STRIP utility.
23. Invalid file name.
You have entered an invalid DOS filename, such as the name of a reserved
DOS device like "con", "prn", "aux", "lpt", "lst" or "nul", into a
dialog box.
Make sure the filename you specified into the dialog box is a valid.
Invalid characters include: =,:;*?![]()/.$\~+
24. Can't create file.
You have attempted to create a file, either by Saving a copy or with the
create command, but the filename you specified was invalid, or the disk
you are working with is full, or the directory you are working with
contains too many files.
Try specifying a different name, or a different disk drive.
_______________________________________________________________________
Appendix 1: General Error Messages 362
________________________________________________________________________
25. Field too big to import.
You have attempted to read a delimited ASCII file that contains more
than 255 characters in a single field. (HyperPAD could be fooled into
thinking there were more than 255 characters in a field if the quote
required to close the field is missing).
Run the program that you originally used to create the delimited ASCII
file and make sure that all fields stay with the 255 character limit,
then start HyperPAD and repeat the action.
26. No background fields to print.
You have attempted to print a Label, Row or Column report from a pad
that has no background fields.
Since there aren't any background fields, try using Print Pages command
from the File menu.
27. Can't find text.
You have chosen Find from within the Script Editor, but HyperPAD cannot
find the text you entered.
Choose Find from the Search menu and enter a different string to search
for.
28. Error in file HPAD.PRN.
You have attempted to print, but HyperPAD cannot find the printer
definition file called HPAD.PRN.
Locate your original HyperPAD disks, copy the file named HPAD.PRN into
the directory containing HyperPAD, then start HyperPAD and attempt to
print again.
29. Page wrong size for this pad.
You have attempted to paste a page from a pad into a pad of a different
size. For example, you may have attempted to copy a page from a 43-line
pad into a 25-line pad.
There is no way to copy different sized pages from pad to pad. However,
you can copy fields and buttons between pages and backgrounds regardless
of their mode.
_______________________________________________________________________
Appendix 1: General Error Messages 363
________________________________________________________________________
30. Object too big for page.
You have attempted to paste an object whose height is larger than the
height of the target page. This error would occur if you attempt to copy
a button that is 40 lines high into a pad that is only 25 lines high.
Resize the object so it will fit on the target page.
31. Block too big for page.
You have attempted to paste a marked block than the size of the page.
This error would occur if you attempt to copy a marked block that is 30
lines high (from a 43 line pad) into a pad that is only 25 lines high.
32. Out of memory on import.
You have attempted to import a large ASCII text file into a field or
when there was insufficient memory.
Check to make sure that the ASCII file is not too large. (The number of
bytes listed in a DOS directory listing will give you an approximation
of the number of characters). If the file is less then 30,000 bytes in
size, try to free up some memory in your system by removing Terminate
and Stay Resident programs from memory. Then try importing again.
33. Can't open file.
You have attempted to load a file, but DOS reported an error.
This error will occur if the file you have attempted to load is in use
by another user or program. If you are on a network, make sure that no
one has opened the file you are trying to open.
34. Wrong password.
You have attempted to open a password protected pad and supplied an
incorrect password.
Try typing the password again.
35. Can't rename pad.
You opened the Pad Info dialog box and entered an invalid filename into
the Pad Name field.
Try entering a valid DOS filename. Also, you cannot specify a different
directory in the new name of the pad.
_______________________________________________________________________
Appendix 1: General Error Messages 364
________________________________________________________________________
36. Invalid sort.
You have attempted an invalid sort from the Sort dialog box.
To enter a valid sort, TAB into the Background Field list box and press
SPACEBAR to select a field to sort by, then select <<Ok>>.
37. Reserved.
Reserved for future use.
38. Can't restrict Find to page fields.
You have attempted to restrict a Find command to a page field.
Repeat the Find command with a background field.
39. No pages match Query.
HyperPAD could not find any pages that matched your query criteria.
Attempt the Query command with different criteria.
40. Invalid or no query criteria.
You chose Query from the Database menu but did not complete the Query
Criteria dialog box properly.
Modify the information entered into the Query Criteria dialog box.
41. Out of disk space.
You have run out of disk space while trying to copy a stack, compress a
stack, or perform a large query or sort.
Exit HyperPAD and use the DOS Delete command to free up some disk space,
then try the action again.
42. Incorrect file type.
You selected the HyperPAD Capture option from the File Import dialog box
and chose a file that was not a text mode GX2 file.
Make sure the GX2 screen you are attempting to import is a text screen
(and not a graphics file). If necessary, use the CAP utility to capture
the screen again.
_______________________________________________________________________
Appendix 1: General Error Messages 365
________________________________________________________________________
43. Pad screen mode not supported by your video card.
You have attempted to load a pad that was created in a video mode not
supported by your video hardware. For example, if you create a 43-line
pad and then attempt to load the 43-line pad on a CGA system.
Load a different pad or copy this pad to an EGA system.
44. Error creating print file.
You have attempted to print with an invalid filename specified in the
Printer Setup dialog box.
Select Printer Setup from the File menu and specify a valid filename.
45. Option not supported by printer.
You have selected an option in the Page Setup dialog box that the
current printer driver does not support. You may have selected
Compressed when the selected printer driver can't print compressed type.
Choose Printer Setup from the File menu to select a different printer
driver, then choose the Page Setup command from the File menu.
46. Must be browsing a field to import/export text.
You chose the Text option in the File Import dialog box but were not
editing a field at the time.
Choose Browse from the Tools menu, TAB into the field that will receive
the contents of the text file, then choose the File Import command.
47. No text to export.
You chose the Text option in the File Export dialog box while browsing
an empty field.
Make sure you are in a field containing some text before exporting.
48. Field widths exceed page width.
The values in the Width column of the Print Column Report dialog box are
greater than the width of the printed page.
Check the width settings in the Page Setup dialog box, then choose
column widths in the Print Column Report dialog box that fit within the
specified width of the printed page.
_______________________________________________________________________
Appendix 1: General Error Messages 366
________________________________________________________________________
49. Invalid DBASE III file.
You have attempted to import a file that is not a valid DBF file.
Try specifying another DBF file. You might also try loading the program
that created the DBF file and save it again.
50. No background fields to export.
You have attempted to export data to a delimited ASCII or DBF file from
a pad that contains no background fields.
Open a pad with background fields before choosing the File Export
command.
51. Maximum of 48 fields may be imported.
You have attempted to import a DBF file that contains more than 48
fields.
Load dBASE III or another program that reads and writes DBF files, then
modify the structure of the file so it has no more than 48 fields.
52. Not enough memory for copy.
You have attempted to copy an object at a time when there is not enough
memory in the HyperPAD environment to do so.
Exit HyperPAD, then try to free up some memory in your system by
removing Terminate and Stay Resident (TSR) programs from memory. Then
start HyperPAD and try this action again.
53. Invalid response from modem
You have tried to dial the phone, and received an error from the modem.
HyperPAD expects the modem to respond "OK" to commands.
Make sure that your modem is on and is properly connected to your PC. If
so, it may be that your modem is not fully Hayes compatible.
54. Can't hang up
You have attempted to dial the phone, and HyperPAD couldn't disconnect
the modem from the line.
It may be that your modem is not fully Hayes compatible.
________________________________________________________________________
Chapter 1: Getting Started 7
________________________________________________________________________
CHAPTER 1: GETTING STARTED
Chapter 1 covers everything you need to know in order to get HyperPAD
running so you can begin working with it. The major topics presented
here include:
0 What types of hardware HyperPAD is compatible with
0 What items your HyperPAD package should contain
0 Making backup copies of your HyperPAD disks
0 Installing HyperPAD (if your system has a hard disk)
0 Starting HyperPAD
0 Setting HyperPAD up so it will work properly on your system
0 Checking a file called the README.DOC for the latest information
about HyperPAD
0 Ending a HyperPAD session
0 Getting technical support
________________________________________________________________________
Chapter 1: Getting Started 8
________________________________________________________________________
BEFORE YOU BEGIN
Before you install HyperPAD, please review the two checklists below,
just to make sure that your system is compatible with HyperPAD and that
your HyperPAD package is complete.
SYSTEM REQUIREMENTS
The following are the system requirements for using HyperPAD:
0 Personal computer: IBM PC, PC-XT, PC-AT, IBM PS/2, Compaq, or
100% compatible system
0 Drives: Two 5.25", 360K floppy drives; or at least one 3.5",
720K floppy drive; or a hard disk and at least one floppy drive
(hard disk recommended)
0 Memory: 448K of available memory
0 Display and display adapters: Any color or monochrome display
or adapter
0 Operating system: DOS 2.0 or later
0 Mouse (optional): Microsoft Mouse or 100% compatible
0 Printer (optional): HP LaserJet series, IBM Graphics Printer, IBM
Proprinter, IBM Color Printer, Toshiba P351, Epson FX/MX/LQ,
Okidata 92/93, Okidata 192/193, Panasonic KX-P4450, Canon LPB-8,
NEC Pinwriter P6/P7, DEC LA-50, or any printer capable of
emulating one of the preceding printers
Note: If you don't have one of the printers listed above,
HyperPAD also offers the following generic printer options:
Generic Line Printer, which uses the standard IBM character set
and works with any printer, and Extended Generic, which uses the
extended IBM character set, including ASCII characters 127-255.
________________________________________________________________________
Chapter 1: Getting Started 9
________________________________________________________________________
WHAT'S IN YOUR PACKAGE
The following items should be included in your HyperPAD package:
0 HyperPAD User's Guide
0 PADtalk Reference Guide
0 Quick Reference Guide
0 Registration Card
0 The following disks:
5.25" version of HyperPAD: 3.5" version of HyperPAD
-----------------------------------------------------------------
Program Disk 1 Program Disk 1 & 2
Program Disk 2 Pad & Utility Disk
Pad Disk Help & Tutorial Disk
Utility Disk
Tutorial Disk
Help Disk
If you're missing any of these items, please call Brightbill-Roberts at
(315) 474-3400.
REGISTERING YOUR SOFTWARE
By registering your copy of HyperPAD, you become eligible for free
technical support and your name gets added to our mailing list so you'll
receive information on improvements and program updates. Therefore,
please take a moment to fill out and return the Registration Card, which
can be found in the HyperPAD disk pack.
________________________________________________________________________
Chapter 1: Getting Started 10
________________________________________________________________________
BACKING UP YOUR HYPERPAD DISKS
In your HyperPAD package, you found the disks you need to run the
program. In order to safeguard the original disks against accidental
modification or damage, we recommend that you make a working copy of
each of these disks before you begin using HyperPAD. Then put the
originals away in a safe place and use the working copies to perform any
operations that require HyperPAD disks. (Your software license agreement
authorizes you to make backup copies of the HyperPAD disks for this
purpose.)
In order to carry out the following procedures for making backup copies,
you'll need a blank disk for each of the HyperPAD disks you want to
copy, and you'll need to know how to use the Diskcopy command. (See your
DOS manual if you need information on the Diskcopy command.)
To back up your HyperPAD disks--dual floppy disk system:
1. Insert the first HyperPAD disk you want to copy (the source disk) in
drive A.
2. Insert the blank disk (the target disk) in drive B.
3. At the A prompt, type:
DISKCOPY A: B:
and press ENTER.
Follow the on-screen instructions until you've copied all of your
HyperPAD disks.
To back up your HyperPAD disks--single floppy disk system:
1. Put the first HyperPAD disk you want to copy in drive A.
2. At the A prompt, type:
DISKCOPY A: A:
and press ENTER.
Follow the on-screen instructions until you've copied all of your
HyperPAD disks.
________________________________________________________________________
Chapter 1: Getting Started 11
________________________________________________________________________
INSTALLING HYPERPAD
If you have a dual (5.25" or 3.5") floppy disk system without a hard
disk, no installation is required. Go to the next section in this
chapter, Starting HyperPAD.
If your computer has a hard disk, HyperPAD's Install program allows you
to install HyperPAD in a directory there using your working copies. Just
follow the instructions below.
To install HyperPAD--hard disk system:
1. Put the Utility Disk in the A drive.
2. To go to the A drive, type:
A:
and press ENTER.
3. Type:
INSTALL
and press ENTER.
By default, HyperPAD makes a directory called HPAD2 on the C drive and
copies the HyperPAD files to that directory. If you want to install
HyperPAD on any other drive or assign another directory name, simply use
the BACKSPACE key to delete C:\HPAD2 and type in the desired drive and
directory.
Please note that your license agreement permits use of HyperPAD on a
single system, so if you plan to install HyperPAD on a network file
server, you will need a separate license agreement for each HyperPAD
user.
Follow the on-screen instructions, and when the system prompts you,
insert the next disk. When HyperPAD is installed, the program returns
you to the DOS prompt and you are ready to start HyperPAD.
To abort the installation procedure at any time, hold down the CTRL key
and press the BREAK key (CTRL+BREAK).
________________________________________________________________________
Chapter 1: Getting Started 12
________________________________________________________________________
STARTING HYPERPAD
Regardless of whether or not you had to install HyperPAD, you must know
how to start the program before you can begin working with it. How you
start HyperPAD depends on your system's configuration, so select the
appropriate procedure from the group below.
If you plan to use a mouse, make sure the mouse software is active
before you start HyperPAD. (See your mouse manual if you need
information on activating the mouse software.)
To start HyperPAD--dual 5.25" floppy disk system with no hard disk:
1. Boot (turn on) your system with DOS.
2. Insert your working copy of Program Disk 1 in the A Drive.
3. Insert your working copy of Program Disk 2 in the B drive.
4. At the A prompt, type:
HPAD
and press ENTER.
HyperPAD starts, and you are now ready to run the Setup pad.
Note: You should not, under any circumstances, remove Program Disk 1
while you are working in HyperPAD. However, if you are prompted to do so
by HyperPAD, you can remove Program Disk 2 and replace it with your
working copy of the Pad Disk in order to use the applications, or pads,
that come with HyperPAD.
To start HyperPAD--3.5" disk system with no hard disk:
1. Boot (turn on) your system with DOS.
2. Insert your working copy of Program Disk 1 & 2 in the A drive.
3. At the A prompt, type:
HPAD
and press ENTER.
HyperPAD starts, and you are now ready to run the Setup pad.
Note: If you are using a single disk drive system, do not remove Program
Disk 1 & 2 from the disk drive while running HyperPAD.
________________________________________________________________________
Chapter 1: Getting Started 13
________________________________________________________________________
To start HyperPAD--hard disk system:
1. Boot (turn on) your system with DOS.
2. If necessary, switch to the drive that contains HyperPAD. For
example, if HyperPAD is on drive C, type:
C:
and press ENTER.
3. Switch to the HyperPAD directory. For example, if HyperPAD is in the
HPAD2 directory, type:
CD\HPAD2
and press ENTER.
4. Type:
HPAD
and press ENTER.
HyperPAD starts, and you are now ready to run the Setup pad.
You probably noticed that each of the above start-up procedures ended by
telling you that you're now ready to run HyperPAD's Setup pad. The Setup
pad loads automatically the first time you run HyperPAD, and you should
complete Setup before you start working with HyperPAD in order to
configure your new program for use on your system. It doesn't take long.
Just follow the directions in the next section.
________________________________________________________________________
Chapter 1: Getting Started 14
________________________________________________________________________
SETTING UP HYPERPAD
The first time that you load HyperPAD, the opening screen in HyperPAD's
Setup pad appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Besides welcoming you to HyperPAD, the Setup pad lets HyperPAD perform
the following functions:
0 Scan your computer's hard disk for programs that HyperPAD
recognizes. (You will then be able to launch these programs
easily from within HyperPAD.)
0 Modify one of your DOS files so that HyperPAD runs automatically
every time you start your computer, which would save you the
trouble of performing the start-up procedure described earlier in
the chapter. (Since this is an optional feature, HyperPAD lets
you skip this portion of Setup if you don't want your system to
work this way.)
0 Configure the applications, or pads, that come with HyperPAD so
they will work on your computer. (You must run Setup in order to
use many of the features of these pads.)
________________________________________________________________________
Chapter 1: Getting Started 15
________________________________________________________________________
0 Create a specially formatted list, called a tree list, that shows
you a treelike representation of the directories on each of your
computer's local drives. (As you'll see later on, the tree list
is a handy reference tool that can be used to perform a number of
HyperPAD functions that you would otherwise have to perform by
running a DOS command.)
ABORTING SETUP
Although we recommend that you complete Setup now, you could come back
and run it later. If you decide not to complete Setup at this time,
here's how to exit from the welcome screen (shown at the start of this
section): By default, Continue, in the middle of the screen, is
highlighted. Since you're not going to continue, press the TAB key until
you highlight Abort, in the lower right corner of the screen, and then
press ENTER. Aborting Setup sends you to the Home pad, HyperPAD's
control center. From there, you can either begin using HyperPAD or end
the current HyperPAD session. (See the Exiting from HyperPAD section
later in this chapter for instructions on how to end a HyperPAD
session.)
Until you complete Setup, the Setup pad automatically loads and the
welcome screen appears each time you boot your system and start
HyperPAD. Once you've completed Setup, the Home pad appears whenever you
boot your system and start HyperPAD.
RUNNING SETUP
If you do want to run Setup now, just press ENTER to tell HyperPAD to
proceed. To get more information at any point while running the Setup
pad, press the F1 key to access HyperPAD's on-line Help system. When
you're done, press the ESC key to exit from the Help system and return
to where you left off in Setup.
During Setup, you're presented with on-screen information and sometimes
told to press ENTER to continue the Setup process after you've finished
reading. The only real decision you have to make is whether or not you'd
like to modify your AUTOEXEC.BAT file (discussed below). HyperPAD
automatically performs the rest of the Setup functions for you--i.e.,
scanning your hard disk for programs, configuring the pads, and creating
a tree list.
________________________________________________________________________
Chapter 1: Getting Started 16
________________________________________________________________________
MODIFYING THE AUTOEXEC.BAT FILE:
During Setup, you're asked whether you want to modify your AUTOEXEC.BAT
file (one of your DOS files), which would make HyperPAD run
automatically every time you turn on your computer. Selecting this
option allows you to use HyperPAD as a shell that's always available
when you turn on your PC and substitutes the intuitive procedures you'll
learn throughout Part 1 of the User's Guide for the complexities of
working with DOS commands.
If you'd like to take advantage of this feature, Modify AUTOEXEC.BAT is
already highlighted, so when you reach this point in Setup, all you have
to do is press ENTER. HyperPAD then adds some commands to your
AUTOEXEC.BAT file. Before modifying this file, however, HyperPAD makes a
backup of the existing AUTOEXEC.BAT file called AUTOEXEC.OLD.
If you don't want HyperPAD to run automatically when you
boot your system, TAB to highlight Skip and press ENTER.
GOING TO THE HOME PAD:
When Setup is finished, a screen appears showing you the options
available from the Home pad. To go to the Home pad--which, as mentioned
above, serves as HyperPAD's control center--press ENTER.
Although you could start using HyperPAD now that you've reached the Home
pad, please take a few moments first to follow the instructions in the
next section. They tell you how to check for late-breaking news about
HyperPAD that could be important to you.
________________________________________________________________________
Chapter 1: Getting Started 17
________________________________________________________________________
REVIEWING THE README.DOC
HyperPAD's Utility Disk includes a file called README.DOC, with last-
minute updates and changes that we were unable to include in your
manuals. Follow the procedure below to display the README.DOC; then look
this file over to see whether it contains information you should be
aware of in order to use the HyperPAD features that you're interested
in.
To review the README.DOC:
1. Boot your system with DOS.
Note: If you modified your AUTOEXEC.BAT file during Setup so that
HyperPAD now runs automatically when you boot your system, see Exiting
from HyperPAD later in this chapter for instructions on returning to the
DOS prompt.
2. Put the Utility Disk in the A drive.
3. To go to the A drive, type:
A:
and press ENTER.
4. To display the README.DOC, type:
TYPE README.DOC
and press ENTER.
5. To halt the README.DOC's scrolling so you can read the file, press
CTRL+S. Then press ENTER to continue.
6. To get a printout of the README.DOC, type:
COPY README.DOC PRN:
and press ENTER.
The first time you scan through the README.DOC, you'll probably focus on
material that you understand immediately or that seems directly relevant
to the HyperPAD features you plan to use right away. However, as you
become more familiar with HyperPAD and as you start exploring more of
its features, you may want to review the README.DOC from time to time
for material whose meaning or relevance you may not initially have
understood. And if you run into trouble with some aspect of HyperPAD,
it's a good idea to check the README.DOC for information that might shed
some light on your problem before calling for technical support.
________________________________________________________________________
Chapter 1: Getting Started 18
________________________________________________________________________
EXITING FROM HYPERPAD
When you're done with a HyperPAD session, you just shut off your
machine, right?
Wrong! When you're finished using HyperPAD, you have to go through a
very simple procedure known as exiting, which tells HyperPAD to save
your data before it ends the current HyperPAD session. If you skip this
step, you could lose some of your work.
One way to exit is to press the ESC key. If you're somewhere in HyperPAD
besides the Home pad, pressing ESC one or more times returns you to the
Home pad, from which you can press ESC again to exit from HyperPAD. But
there's a much faster way to exit from anywhere in HyperPAD without
having to return to the Home pad. Just hold down the CTRL key and press
Q (CTRL+Q).
Regardless of which of these methods you use to exit, HyperPAD
superimposes a rectangle (called a dialog box) on the screen displaying
the question Are you sure you want to exit? <<Ok>> is already
highlighted, so just press ENTER to confirm your intention to exit and
return to DOS. If you started to exit accidentally, just TAB to
highlight <Cancel> and press ENTER to tell HyperPAD to forget about
exiting.
If you don't want to bother returning to DOS, there's one more way to
exit. When you reach the Home pad, press the TAB key until Shut Down is
highlighted and press ENTER. HyperPAD presents a dialog box with the
message You may now turn off your computer safely. In the lower right
corner of this box, Cancel is highlighted, so if you don't want to exit,
press ENTER to cancel the exiting process. If you do want to exit, just
shut off your machine.
________________________________________________________________________
Chapter 1: Getting Started 19
________________________________________________________________________
GETTING TECHNICAL SUPPORT
If you have a question about HyperPAD and can't find the answer by
checking the documentation, using the on-line Help system, accessing the
relevant portion of the on-line Tutorial, or looking through the
README.DOC, here are five ways to contact Brightbill-Roberts for
technical support:
1. Call our Technical Support department at (315) 474-3400. If you call
after regular business hours, leave a message for the Technical Support
department and a representative will get back to you when we reopen.
2. Use our bulletin board system (BBS) by setting up your modem to dial
(315) 472-1058 at 300, 1200, or 2400 baud; eight data bits; one stop;
and no parity.
3. Contact us by fax at (315) 472-1732.
4. Contact us by MCI Mail (Brightbill-Roberts).
5. Contact us through CompuServe by typing GO PCVENC and then choosing
Brightbill-Roberts from the Main Menu that appears or send mail to the
Brightbill-Roberts CompuServe account at 75300,363.
________________________________________________________________________
Chapter 1: Getting Started 20
________________________________________________________________________
CONCLUSION
At this point, you've made backup copies of your HyperPAD disks and used
them to install, start, and set up HyperPAD so that it runs on your
system. You've checked the README.DOC to see whether it contains any
last-minute information that concerns you. You've registered your copy
of HyperPAD with Brightbill-Roberts and are aware of how to get
technical support. And you know the procedure for ending a HyperPAD
session.
That's it. You're all set to begin learning HyperPAD!
One way to learn HyperPAD, of course, would be to continue reading Part
1 of the User's Guide. However, another effective learning strategy
would be to take time out at this point to explore HyperPAD's
interactive, on-line Tutorial. It's an excellent supplement to the
User's Guide that can give you some practical experience in working with
HyperPAD. To access the Tutorial, go to the Home pad, press TAB until
Learn about HyperPAD is highlighted, then press ENTER. (If you need more
information, see Chapter 5, The On-Line Tutorial.) When you're through
with the Tutorial, you can return to the next chapter in the User's
Guide.
_______________________________________________________________________
Glossary 377
________________________________________________________________________
GLOSSARY
-----------------------------------
accelerator key
A keystroke combination you use to quickly select a menu or button.
Holding down ALT highlights the available accelerator keys.
-----------------------------------
align
Orientation of a field's text or a button's name: left, right, centered.
-----------------------------------
attribute
A foreground and background color combination used in conjunction with
HyperPAD's painting tools to change the appearance of objects and pages.
-----------------------------------
authoring
The fourth user level; you can modify pads by manipulating objects.
-----------------------------------
background
A HyperPAD object that contains information shared by every page
associated with it.
-----------------------------------
browse
To use a pad by clicking on buttons and typing into fields.
-----------------------------------
browsing
The first, user level; you're limited to clicking on buttons.
-----------------------------------
button
A HyperPAD object that performs actions when selected.
-----------------------------------
capture utility (CAP)
A program that grabs a screen image from a character-mode DOS program
and saves it in a .GX2 file, which can be read by HyperPAD.
_______________________________________________________________________
Glossary 378
________________________________________________________________________
-----------------------------------
click
Press and release the left mouse button.
-----------------------------------
click and drag
Press and hold down the left mouse button while moving the mouse.
-----------------------------------
clipboard
An area in memory used to store marked blocks, text, buttons, fields,
and pages after you cut or copy them.
-----------------------------------
command line
A row of numbered commands located near the bottom of many pads.
-----------------------------------
controls
Elements of dialog boxes used to give information to HyperPAD. Controls
include text boxes, list boxes, and option buttons.
-----------------------------------
current
Refers to the active page, background, or pad.
-----------------------------------
default
A proposed value that HyperPAD presents for your convenience.
-----------------------------------
design
To modify or create a pad.
-----------------------------------
dialog box
A window that HyperPAD presents when more information is required to
carry out a command.
-----------------------------------
double-click
To press and release the left mouse button twice in rapid succession.
_______________________________________________________________________
Glossary 379
________________________________________________________________________
-----------------------------------
drag
To move the mouse with the left mouse button pressed.
-----------------------------------
error message
A dialog box that displays a message explaining why HyperPAD can't carry
out your command.
-----------------------------------
field
A HyperPAD object on a page or background into which you can type text.
-----------------------------------
focus
The button or field on which the cursor is located.
-----------------------------------
handler
A group of PADtalk commands in an object's script that get executed in
response to a user's action.
-----------------------------------
help
A group of pads that provide information about the current pad (Pad
Help) or about HyperPAD (General Help).
-----------------------------------
highlight bar
A horizontal bar that indicates the currently selected item in a list
box.
-----------------------------------
hypertext
A body of information containing links that you can select in order to
browse the information in a nonlinear manner.
-----------------------------------
layer
The order of a button or field relative to other buttons and fields
located on a page or background.
_______________________________________________________________________
Glossary 380
________________________________________________________________________
-----------------------------------
link
A connection between two different pages in the same pad or in different
pads.
-----------------------------------
list box
A scrollable field of choices from which you can select.
-----------------------------------
menu
A window containing a list of commands from which you can select.
-----------------------------------
menu bar
A line at the top of the screen containing HyperPAD's menus.
-----------------------------------
message box
A popup window used to display messages, calculate expressions, and
execute PADtalk commands.
-----------------------------------
message line
A line at the bottom of the screen displaying a brief help message.
-----------------------------------
navigating
Moving between the pages within a pad or between pads.
-----------------------------------
object
The basic elements of a pad.
-----------------------------------
option button
An dialog box control that can be turned on ([X]) or off ([ ]).
_______________________________________________________________________
Glossary 381
________________________________________________________________________
-----------------------------------
option button group
An interconnected group of option buttons in a dialog box.
-----------------------------------
pad
HyperPAD's basic file structure.
-----------------------------------
PADtalk
The Englishlike language used to control the HyperPAD environment.
-----------------------------------
page
A HyperPAD object that contains paint, buttons, and fields and is
overlaid on a background.
-----------------------------------
painting
The third user level; the painting tools become available.
-----------------------------------
popup
A defined menu of choices from which you can make a selection.
-----------------------------------
properties
The modifiable characteristics of HyperPAD objects.
-----------------------------------
script
A property of a HyperPAD object that determines how the object behaves.
-----------------------------------
scripting
The highest user level; the ability to write, edit, and print scripts.
-----------------------------------
scroll bar
A component of a scrollable field that lets mouse users move through the
field.
_______________________________________________________________________
Glossary 382
________________________________________________________________________
-----------------------------------
setup
A pad that runs the first time you load HyperPAD.
-----------------------------------
shortcut key
A keystroke or keystroke combination that invokes a menu command.
-----------------------------------
status bar
A line at the bottom of a HyperPAD screen that displays the name of the
current pad, the page number, and the currently selected tool.
-----------------------------------
text box
A dialog box control into which you can type information.
-----------------------------------
title bar
A line below the menu bar that displays the title of the pad and the
Help button.
-----------------------------------
toggle
To turn an option button, a menu, or the message box on or off.
-----------------------------------
tool box
A popup for mouse users containing all of the available HyperPAD tools.
-----------------------------------
typing
The second user level; you can select buttons and type into fields.
-----------------------------------
user level
The extent to which you are currently permitted to access HyperPAD's
tools, which is determined by a dialog box control.
________________________________________________________________________
Chapter 6: The Help System 111
________________________________________________________________________
CHAPTER 6: THE HELP SYSTEM
The Help system is an on-line resource that can be accessed from
anywhere in HyperPAD. Its material consists of informational screens and
illustrations designed to answer your questions both about individual
pads and about HyperPAD.
In this chapter, we'll discuss two basic aspects of using the Help
system:
0 Finding information in the Help system
0 Navigating within the Help system
Most users tend to regard an on-line Help system as their last resort
when they get stuck trying to operate a program. HyperPAD's Help system
does indeed serve this purpose very effectively. However, if you only
use the Help system to bail yourself out of trouble, you're failing to
take full advantage of its potential. We suggest that you might also
wish to familiarize yourself with what the Help system has to offer and
employ it as one of your supplemental resources for learning about
HyperPAD.
We'll start by showing you how to locate Help system material that's
relevant to whatever question or interest you currently have and then
explain how to navigate around within the Help system after you've
reached the desired material.
FINDING INFORMATION IN THE HELP PAD
In this section of the chapter, you'll learn how the Help system is set
up, how to get into the Help system, and once you're there, how to
access relevant information.
STRUCTURE OF THE HELP SYSTEM
HyperPAD's Help system is organized in two layers. The first layer, Pad
Help, is a context-sensitive resource designed to provide further
information about a particular pad. (For example, Pad Help for the Phone
pad is called Phone Help; for the Notes pad, it's called Note Help; for
the Index Cards pad, it's called Index Help; and so on.) The second
layer, General Help, is a resource designed to provide further
information about HyperPAD.
________________________________________________________________________
Chapter 6: The Help System 112
________________________________________________________________________
If you run into a problem while using HyperPAD or would like more
information about some aspect of HyperPAD, you'll locate relevant Help
material a lot more quickly by giving a moment's thought both to the
nature of your question and to the structure of the Help system before
accessing Help.
Does the question involve an operation common to all or most of the pads
in HyperPAD, such as how to select a button, how to work with fields, or
how to open a menu? If so, the answer probably lies in General Help.
Does the question involve an operation that seems pretty specific to the
current pad or to only a few pads, such as how to add a note to a Phone
pad page, how to find information you've entered into the Notes pad, or
how to sort your Index Cards? If so, the answer probably lies in Pad
Help for that particular pad.
Once you've decided which layer of the Help system might contain the
desired information, you'll need to know how to enter the Help system,
which is discussed in the following subsection.
ACCESSING THE HELP SYSTEM
As you can see from the accompanying table, reaching the Help system is
an extremely simple process.
Action: Result:
------------------------------------------------------------------
Press F1 from anywhere in Takes you to Pad Help.
HyperPAD.
Press F1 while in Pad Help. Takes you to General Help.
Press F1 twice from HyperPAD. Takes you directly to General Help.
Press ALT+F1 from HyperPAD. Takes you back to the last-viewed
Pad Help or General Help page.
When you press F1, you get a Pad Help page that summarizes key
information about the page you were just viewing, thereby answering the
questions you're most likely to have about that page. You can then get
even more information by selecting the summary page's Index button to
bring up a list of all the Help system material that's directly relevant
to how your current pad works.
________________________________________________________________________
Chapter 6: The Help System 113
________________________________________________________________________
When you access General Help (either from a pad or from within Pad
Help), you get the Index for General Help, which lists all the Help
system material dealing with basic HyperPAD operations.
The accompanying illustration shows a sample index page from a typical
Help system.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Each topic on a Help system Index is actually a HyperPAD button, so once
you spot the topic heading for the desired information, you can select
the heading by using HyperPAD's standard button-selecting techniques,
which takes you straight to the start of the Help system material on
that topic. In the next section of the chapter, you'll learn how to
navigate around within the Help system once you've reached the topic
you're after.
________________________________________________________________________
Chapter 6: The Help System 114
________________________________________________________________________
NAVIGATING WITHIN THE HELP SYSTEM
Moving around within the Help system is simply a matter of learning to
use the navigational buttons, nearly all of which are located on the
command line. In the following subsections, we'll explain the purpose of
these navigational devices and tell you whether each one appears on all
Pad Help and General Help pages or only on some pages in the Help
system.
PGUP=PREV AND PGDN=NEXT
These buttons appear on all Pad Help and General Help pages. Once you
leave the Pad Help or General Help Index and arrive at the start of a
Help system topic, select the PGDN button (or press the keyboard's PGDN
key) to move through the material on that topic. To return to the
previous Help page, either select the PGUP button or press the PGUP key.
If you keep pressing PGDN once you reach the end of the material on a
particular Help system topic, you'll continue into the material on the
next Help system topic listed on the Index. (If you're ever unsure about
whether you've progressed into the next topic, just check the screen
title in the center of the title bar. It matches the topic heading on
the Index page, and it changes as you move from one topic to another
within Pad Help or General Help.) If you continue pressing PGDN when you
reach the end of the last topic in Pad Help or General Help, you'll
automatically return to the Index page from which you started.
INDEX
This button, which appears on the command line of Pad Help and General
Help pages, takes you back to the Index for the layer of Help that
you're currently in. From there, you can select another Pad Help or
General Help topic.
LEARN
This button appears only on those Pad Help and General Help pages
dealing with topics covered in the on-line Tutorial. Selecting the Learn
button takes you directly to the relevant portion of the Tutorial, where
you can deepen your understanding of the topic in question by reviewing
instructional material and completing one or more practice sessions. (If
you'd like more information about the Tutorial, see Chapter 5 of the
HyperPAD User's Guide..) Upon exiting from the Tutorial, you return to
the Pad Help or General Help page on which you selected the Learn
button.
________________________________________________________________________
Chapter 6: The Help System 115
________________________________________________________________________
NOTEBOOK
HyperPAD's Tutorial includes an on-line Notebook, which you can use to
record key observations and reminders, both as you're learning HyperPAD
and as you're working with it. The Notebook button, which appears on all
Pad Help and General Help pages, provides immediate access to your
notes, so you can modify or expand upon them as the need arises. (The
Notebook is described more fully in Chapter 5 of the User's Guide,
"The On-Line Tutorial.") Upon exiting from the Notebook, you return to
the Pad Help or General Help page on which you selected the Notebook
button.
F1=HELP
The F1=Help button appears only on Pad Help pages. You can either select
this button or press the F1 key to move from Pad Help to General Help.
ESC=EXIT
Pressing the ESC key or selecting the ESC=Exit button, which appears on
all Pad Help and General Help pages, takes you directly back to the
HyperPAD page you were on when you first accessed the Help system.
HIGHLIGHTED WORDS AND PHRASES
Sometimes you'll find one or more highlighted words and phrases worked
into the text on Pad Help and General Help pages. (You might, for
instance, see a Phone Help sentence reading "You can print address
labels easily from your Phone pad.") These highlighted elements, which
are especially common on the summary pages that appear when you press F1
to call up Pad Help, are actually buttons. You can select them if you'd
like further information about that subject. (By selecting "print" in
the preceding example, you would proceed directly to a Phone Help page
that explains how to print address labels.)
HINT
When you press CTRL+ALT, HyperPAD displays a dotted border around all
buttons and fields on the current screen. You can use this technique if
you ever have trouble determining which elements on a particular Help
system screen are buttons.
Once you're finished with the supplemental material you called up by
selecting the highlighted word or phrase, press F5 to return to the Help
system page from which you accessed that material.
________________________________________________________________________
Chapter 6: The Help System 116
________________________________________________________________________
CONCLUSION
To reach the on-line Help system from anywhere in HyperPAD, all you have
to do is press F1 once to bring up Pad Help (the Help layer that
contains material directly relevant to operating the current pad) or
press F1 twice to bring up General Help (the Help layer that contains
material relevant to operating HyperPAD). Selecting a topic from the Pad
Help or General Help Index takes you to the start of the material on
that topic, after which you can use the Help system's navigational keys
to move around within the material. Pressing ESC when you're done takes
you right back to the page you were on when you first pressed F1.
Really, there's nothing to it!
However, to use HyperPAD's on-line Help system most productively, it's a
good idea to refer to it not only when you get stuck but before you get
stuck. Start by familiarizing yourself with the General Help Index and
with the Pad Help Indexes for the pads you use most often. That way,
you'll know what Help system material is available. Spending some time
browsing through those portions of the Help system that explain HyperPAD
operations you haven't quite mastered yet might very well keep you from
getting stuck in the first place.
________________________________________________________________________
Chapter 3: The Home Pad 55
________________________________________________________________________
CHAPTER 3: THE HOME PAD
At one level, the Home pad is the control center for all the work you do
with HyperPAD. At another level, the Home pad is nothing more than a
collection of buttons sitting beneath the question "What would you like
to do?" The answers to that question are what this chapter is all about.
To find the answers, we have to look more closely at those buttons and
where they can take you.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
You will recall that many buttons are navigation devices that can
transport you from where you are to where you want to go. What makes the
Home pad so special--what makes it, in fact, your gateway to HyperPAD--
is that it brings together on a single page the buttons that can take
you to all of HyperPAD's major functions.
________________________________________________________________________
Chapter 3: The Home Pad 56
________________________________________________________________________
You answer the question "What would you like to do?" by selecting one of
the Home pad's six main buttons and letting it take you to where you can
perform the operation you're interested in, which could include any of
the following:
0 Running a program that's outside the HyperPAD environment
0 Managing files that are on your disks
0 Running a DOS command
0 Going to a pad to perform an action
0 Customizing HyperPAD to suit your personal needs
0 Learning about HyperPAD
In this chapter, we'll journey to each of these destinations and see
what you can do once you get there.
But before we depart, let's give a bit of thought to the return trip.
After all, whenever you travel, it's comforting to know how to get Home
again! So in the accompanying table, we've summarized the techniques you
learned in Chapter 1 for reaching the Home pad from anywhere in
HyperPAD.
Action: Result:
------------------------------------------------------------------------
Press the F5 key. Retraces your steps through the pages you
just viewed, one by one--even if those pages
are in several different pads.
Press ALT+F5. Takes you to the Home pad.
Select the Home button Takes you to the Home pad.
Select the Home command Takes you to the Home pad.
from the Go menu.
________________________________________________________________________
Chapter 3: The Home Pad 57
________________________________________________________________________
CUSTOMIZING HYPERPAD
Let's start by selecting the Customize HyperPAD button. Even though this
isn't the first button on the Home pad, there are a couple of reasons
why it's a good place to begin our journey. What you'll learn in this
section not only could keep you from getting into trouble with HyperPAD
but will also come in handy later on, when we discuss one of the
functions you can perform with the Programs pad.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
In addition to a text box for your name, the Customize HyperPAD screen,
shown here, displays three columns of buttons--the first for setting the
user level, the second for activating or deactivating certain HyperPAD
features, and the third for choosing which pad appears when you start
HyperPAD. In the following subsections, we'll take a closer look at
exactly what each of these controls allows you to do.
SETTING THE USER LEVEL
The user level refers to the range of capabilities presently available
to you while working with HyperPAD. You can choose only one option from
this group. As soon as you select an option, the previously selected
option is automatically unselected.
With the user level set to browsing, you can manage files, run DOS
commands, and launch programs. You can also open up pads, operate their
________________________________________________________________________
Chapter 3: The Home Pad 58
________________________________________________________________________
working parts, read the information in the pads, and use the information
already entered there to print reports and labels. But you can't perform
many of the more advanced HyperPAD features.
When the user level is raised from browsing to typing, you retain all
the capabilities you had at the browsing level and also gain the ability
to add text to fields and manipulate text in fields. When you first
start working with HyperPAD, the user level is set to typing.
The remaining three user levels (painting, authoring, and scripting)
enable you to perform increasingly sophisticated operations with
HyperPAD, such as would be required to redesign existing pads or develop
new pads.
Since you'll hardly ever need the more advanced user levels just to
operate the pads that come with HyperPAD, we suggest that you keep your
user level set at typing for now. That way, you won't be able to make
any drastic changes that could accidentally damage your pads. (If you
think you might be interested in using some of HyperPAD's design
features, Part 2 of the HyperPAD User's Guide, "Designing with
HyperPAD," discusses the more advanced user levels and the capabilities
that come with them.)
When we describe how to perform those very few operations covered in
Part 1 of the User's Guide for which you do need a higher user level,
we'll remind you to reset the user level temporarily for that purpose.
You should be aware that raising the user level causes additional menus
to appear and makes some of the menus you're familiar with expand to
include additional commands. These extra menus and commands are used
almost exclusively for redesigning existing pads and developing new
pads, so don't worry about them when they appear. As soon as you finish
the operation that requires the higher user level and reset your user
level to typing, they'll disappear.
SELECTING OPTIONS
The Options column contains three buttons used to control the display of
the status bar and tool box, as well as determine how frequently
HyperPAD saves your work during a session.
THE STATUS BAR OPTION
If you select the Status bar option, the status bar is displayed at the
bottom of your HyperPAD screen instead of the message line. Even if you
turn the status bar off during a particular HyperPAD session (either by
________________________________________________________________________
Chapter 3: The Home Pad 59
________________________________________________________________________
selecting the Status Bar command from the Workspace menu or by pressing
ALT+SPACE, which toggles both the status bar and the menu bar on and
off), the status bar reappears once you restart your system or reenter
HyperPAD after exiting and returning to DOS.
THE TOOL BOX OPTION
The tool box is a feature that can be operated with a mouse at the
painting and authoring user levels. Since you won't need the tool box
just to use the pads that come with HyperPAD (it's only for performing
design functions), you should leave this option unselected.
THE AUTO SAVE OPTION
If you select the Auto save option, HyperPAD saves your work
automatically every 30 seconds. If you don't select this option,
HyperPAD still saves your work automatically but does not do so as
frequently. Lengthening the interval between "saves" may cause HyperPAD
to be a bit slower when it does save your work, simply because the
longer interval gives you time to accumulate more changes for HyperPAD
to save.
SETTING STARTUP
The options in the third column can be used to control which pad is
displayed when you start HyperPAD. The selected pad then appears
whenever you first enter HyperPAD from DOS and whenever you reenter
HyperPAD after having exited and returned to DOS. The selected pad also
appears whenever you first turn on your computer if you allowed Setup to
modify your AUTOEXEC.BAT file so that HyperPAD runs automatically every
time you start your system.
By default, the Home pad is already selected as the startup option.
Selecting the second option causes HyperPAD to start at the Programs
pad, from which you can launch your other DOS and Microsoft Windows
programs. Selecting the File manager option causes HyperPAD to start
with the file manager, which, as you'll learn in Chapter 4, you can use
to manage your files.
For now, you'll probably want to leave the default setting unchanged so
that HyperPAD continues to start with the Home pad, since this is the
pad you'll be most familiar with after completing this chapter. Later in
this chapter you'll learn about running programs, and in Chapter 4
you'll learn about managing files. After you understand those two
________________________________________________________________________
Chapter 3: The Home Pad 60
________________________________________________________________________
HyperPAD functions better, you might want to come back and select a
different startup option.
RUNNING A PROGRAM
Now that you know what the Customize HyperPAD button can do for you,
let's press ESC to leave the Customize HyperPAD screen and return to the
Home pad. Then select Run a program, the first button on the Home pad,
which takes you to the following pad.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
In this section, you'll learn not only how to launch the programs on
your hard disk but how to perform maintenance functions on the Programs
list, such as editing program information, scanning your drives for
additional programs not shown, adding programs, and creating buttons to
launch programs on the list.
RUNNING A PROGRAM FROM THE PROGRAMS LIST
Do you remember running the Setup pad before you started to use
HyperPAD? Well, one of the purposes of Setup was to let HyperPAD scan
your hard disk for programs it recognizes--programs that you might later
want to launch from HyperPAD. After Setup scans your disk, the Programs
list box displays an alphabetized list of those programs.
________________________________________________________________________
Chapter 3: The Home Pad 61
________________________________________________________________________
You can launch any of the programs on this list by highlighting the
program name with the keyboard and pressing ENTER or by pointing to the
program name with the mouse and double-clicking the left mouse button.
If HyperPAD knows enough about the program you're launching to make a
guess about the type of work file the program uses, it presents a dialog
box that asks "Load a work file?," to which you can reply <<Yes>>, <No>,
or <Cancel>.
If you select <No> (or if the "Load a work file?" dialog box doesn't
appear), HyperPAD runs your program alone, without a work file.
If you select <Cancel>, HyperPAD returns you to the Programs page
without launching the program.
But if you answer the question "Load a work file?" by selecting <<Yes>>,
HyperPAD asks you which work file you'd like to load by presenting the
Work File dialog box, shown here.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
By entering the right information into this dialog box, you can use
HyperPAD to save yourself the time and trouble of remembering how to
load a work file for the program you've chosen.
To use this dialog box, type the drive, directory, and filename of the
work file you'd like to load in the Work filename text box. If you don't
happen to remember all the vital statistics, you can also fill in this
text box by selecting the filename from the Files list box.
________________________________________________________________________
Chapter 3: The Home Pad 62
________________________________________________________________________
If the desired work file already appears in the Files list box, here's
how to tell HyperPAD to load it.
To load a work file that appears in the Files list box:
1. TAB to the Files list box.
2. Use the up and down arrow keys to highlight the work file that you
want to load.
3. Press ENTER or select <<Ok>>.
HyperPAD loads the selected work file and runs the program you want.
You can also load a work file that appears in the Files list box by
pointing to it with the mouse and double-clicking the left mouse button.
If the desired work file is on another drive, use the following
procedure to view the contents of a different drive.
To change drives:
1. TAB to the Other drives & directories list box.
2. Use the up and down arrow keys to highlight the drive that you want
to view.
3. Press ENTER or select <<Ok>>.
You can also change drives by pointing to the desired drive with the
mouse and double-clicking the left mouse button.
If the work file you want is located on the drive whose contents you're
currently viewing but is in a different directory, here's how to view
the contents of the desired directory.
To change directories:
1. TAB to the Other drives & directories list box.
2. Use the up and down arrow keys to highlight the desired directory.
If you want to view the contents of the parent directory, select the ".
." choice in the Other drives & directories list box. This moves you up
one level in the directory hierarchy.
3. When the directory you want is highlighted, press ENTER.
________________________________________________________________________
Chapter 3: The Home Pad 63
________________________________________________________________________
You can also change directories by pointing to the desired directory (or
to the ". ." choice) with the mouse and double-clicking the left mouse
button.
Once the desired filename appears in the Files list box, load the file
as described above.
Assuming you do run a program (either with or without a work file),
HyperPAD gets out of your way by shrinking down to 3K of memory while
the other program is running. When you exit from the selected program,
HyperPAD reloads and returns you
to the Programs pad.
SCANNING YOUR DRIVES FOR ADDITIONAL PROGRAMS
Suppose you go to the Programs pad with high hopes of launching a
program that you know is on one of your drives, only to find that the
program doesn't appear on the Programs list. Why not? When HyperPAD last
scanned your hard disk, it didn't recognize your program, either because
the program hadn't been installed on your hard disk yet, or because it
was located on a remote drive on a network file server, or because
HyperPAD simply doesn't have the information it needs to launch your
program successfully.
You'll have to give HyperPAD a chance to scan each drive where such
changes have occurred and update its Programs list accordingly. To do
this, select Misc. from the command line (ALT+4) and then select the
Scan for programs button from the screen that appears. HyperPAD displays
a list of drives, from which you can choose the drive you want scanned.
You can select a network drive if you wish, but be aware that network
drives can have enormous capacity, leading to a time-consuming scan.
HyperPAD then scans the selected drive for programs it recognizes that
don't already appear in the Programs list box. If it finds any, the new
program names are added to your Programs list, and the list is
automatically realphabetized.
________________________________________________________________________
Chapter 3: The Home Pad 64
________________________________________________________________________
ADDING PROGRAMS AND EDITING PROGRAM INFORMATION
Suppose you want to run a program that doesn't appear on your Programs
list and you come up empty-handed after scanning for additional
programs? Perhaps the program you're trying to run isn't one that
HyperPAD recognizes. To add a program to your Programs list, select the
Add command (ALT+2) from the Programs screen's command line. The Add New
Program dialog box, shown here, appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
To fill out this dialog box, you can use the same procedures you learned
above for filling out the Work File dialog box.
After you select a program filename, HyperPAD presents a dialog box that
asks "Would you like to edit the program description and run
parameters?" If you answer <No>, HyperPAD simply adds the program to
your Programs list and realphabetizes the list accordingly.
If you answer <<Yes>>, HyperPAD presents the Edit Program dialog box,
shown here. (This dialog box can also be accessed by highlighting a
program name in the Programs list box and then selecting the Edit
command [ALT+1] from the command line.) You may want to use this dialog
box to give HyperPAD some important information about the program, such
as where to find its work files and how to load them.
________________________________________________________________________
Chapter 3: The Home Pad 65
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The following subsections explain how to fill out the Edit Program
dialog box. If you need further information about what should appear in
any of the text boxes in this dialog box, refer to HyperPAD's Help
system (which can be accessed by pressing F1).
PROGRAM DESCRIPTION
The default entry in this text box is the name of the program you
selected. If you'd like the program name to read differently when
HyperPAD adds it to the Programs list, you have to change it here.
PROGRAM PATH
This is the location of the program on your hard disk. You cannot edit
this information.
COMMAND LINE PARAMETERS
This text box contains optional instructions that HyperPAD will pass on
when it runs the program. For information on your program's command line
options, refer to your program's documentation and to HyperPAD's Help
system.
WORK FILE DIRECTORY AND WORK FILE EXTENSION
Earlier in this section, you learned that HyperPAD may ask whether you'd
like to load a work file when you run a program. The information you
enter in the Work file directory and Work file extension text boxes sets
________________________________________________________________________
Chapter 3: The Home Pad 66
________________________________________________________________________
the defaults for the Work File dialog box, which appears when you run
your program. The Work file directory text box specifies the location
where work files associated with the program are stored, and the Work
file extension text box shows the default extension for your program's
work files.
For example, if your Word Perfect documents are located in the C:\WPDOC
directory and each uses a .DOC extension, you would enter C:\WPDOC into
the Work file directory text box and .DOC into the Work file extension
text box.
KEYSTROKES
In this text box you tell HyperPAD the exact sequence of keystrokes it
must use to load a work file from a particular program. You won't
ordinarily need to edit this text box. If you ever do, refer to the Help
system (F1) for directions.
RUN FROM PROGRAM DIRECTORY
This option, which is selected by default, causes the program to be run
from its own directory. In rare circumstances, you may want to unselect
this option, causing the program to be run from the directory in which
HyperPAD is located.
When you're through editing program information, select Ok to implement
your changes and return to the Programs screen, where the new program
now appears on the Programs list. In the future, HyperPAD will
automatically run the program according to the additions and changes you
made.
RUNNING A PROGRAM QUICKLY
Here's a program-launching shortcut you can use when you want to launch
a program that isn't on your Programs list and you don't want to take
the time to add the program to the list by scanning your drives for
additional programs or using the command line's Add command.
To run a program quickly:
1. Select Run Program from the File menu (ALT+F, R).
The Run Program dialog box appears.
2. Type the program name, including drive and directory, into the
Program to run text box.
________________________________________________________________________
Chapter 3: The Home Pad 67
________________________________________________________________________
3. If necessary, select the Keep current directory option if you want
the program to be run from the directory in which HyperPAD is located.
4. Select <<Ok>>.
Your program runs immediately.
You can also access the Run Program dialog box by selecting
Misc. from the command line (ALT+4) and then selecting the Quickly run a
program button.
REMOVING PROGRAMS
At some point you may find your Programs list getting a bit cluttered.
Perhaps you'd like to tidy up the list by removing the names of seldom-
used programs.
There are two ways to take unwanted programs off the list. The first way
is to use the keyboard or the mouse to highlight the name of a program
you want to remove from the list and select Remove from the command line
(ALT+ 3).
The second way to weed out your Programs list is to "mark" programs for
removal by highlighting the name of each unwanted program and either
pressing SPACE or clicking the right mouse button. An arrow appears
beside each program name as you mark it. Then select the Remove command
to take the marked programs off the list. This method is especially
handy if you're trying to remove more than one item at a time.
The Remove command only takes program names off the Programs list. It
does not remove these programs from your hard disk. After removing a
name, you could restore it to the list by rescanning the drive on which
the program appears or using the Add command (ALT+2).
________________________________________________________________________
Chapter 3: The Home Pad 68
________________________________________________________________________
CREATING A PROGRAM BUTTON
Once you become proficient in working with HyperPAD and begin to explore
the other pads that came in your package, you may find yourself wishing
you had a button you could use to launch one of the programs in the
Programs list from a different pad. In fact, it's easy to create such a
button.
To create a program-launching button from the Programs pad:
1. Set your user level to Authoring.
To do this, go to the Home pad (ALT+F5), select the Customize HyperPAD
button, reset the User level control, press ESC to return to the Home
pad, and then select the Run a program button to come back to the
Programs pad. (If you need more information on resetting the user level,
refer to the "Customizing HyperPAD" section earlier in this chapter.)
2. Highlight the program name in the Programs list box.
3. Select Misc. from the command line (ALT+4).
4. When the screen of miscellaneous commands appears, select Create
button.
HyperPAD presents a dialog box informing you that the button has been
created.
5. Use the Open command from the File menu (ALT+F, O) to go to the pad
where you want to put the button.
6. When you arrive at the target pad, select Paste Button from the Edit
menu (ALT+E, P).
7. To move the button to the desired location, press the arrow keys or
point to the button with the mouse and drag it while pressing the left
mouse button.
8. To end the button-pasting operation and make the button operative,
it's important that you press CTRL+B.
This tells HyperPAD that you're through performing design functions,
such as pasting buttons, and want to resume using the pads. If you
forget this step, your pads will no longer work the way you expect!
9. Set your user level back to Typing.
You can now use your new button to launch the program directly from the
pad where the button appears. When you exit from the program, HyperPAD
________________________________________________________________________
Chapter 3: The Home Pad 69
________________________________________________________________________
"remembers" which page that particular program-launching button is on
and returns you there.
If you ever want to delete a program button, refer to the directions in
Chapter 14.
GOING TO THE DOS PROMPT
If you want to return to the DOS prompt from anywhere in HyperPAD,
here's how.
To go to the DOS prompt without exiting from HyperPAD:
1. Select Run Program from the File menu (ALT+F, R or ALT+F10).
2. When the Run Program dialog box appears, press ENTER.
HyperPAD shrinks down to 3K of memory and sends you to the DOS prompt.
When you want to come back to HyperPAD from DOS, type
EXIT
and press ENTER.
HyperPAD reloads and returns you to the page you were from when you
selected the Run Program command.
You can also return to the DOS prompt by selecting Misc. on the Programs
screen's command line (ALT+4) and then selecting the Go to DOS prompt
button from the screen of miscellaneous command buttons that appears.
When you exit from DOS, HyperPAD reloads and returns you to the Commands
screen.
________________________________________________________________________
Chapter 3: The Home Pad 70
________________________________________________________________________
MANAGING FILES
Press ESC to leave the Programs pad and return to the Home pad's Main
Menu, where you'll learn about the Manage files button next. This button
takes you to HyperPAD's DOS Shell, shown here, which can be used to
perform a wide variety of file-management chores.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
For instance, the DOS Shell is where you go if you'd like to view the
files in each of your drives and directories; sort and find files; view
your files in a tree list format; copy, move, and delete files; and
browse the contents of files. But we're going to postpone our tour of
the DOS Shell because this is such a powerful pad that we've devoted all
of Chapter 4 to explaining the capabilities it gives you.
RUNNING A DOS COMMAND
To end your brief journey to the DOS Shell and return to the Home pad's
Main Menu, press ESC. To proceed to the next stop on our tour, select
the Home pad's Run a DOS command button, which is your ticket to the DOS
Commands Index screen, shown here.
________________________________________________________________________
Chapter 3: The Home Pad 71
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The buttons displayed on the DOS Commands Index screen let you perform
some very common DOS operations within HyperPAD, merely by filling out
simple dialog boxes. This saves you the trouble of having to exit to
DOS, look up the long, complicated, and often nonintuitive syntax for a
particular DOS command, and then type it in.
But before we check out these buttons, let's take a look at the command
line. The purpose of the DOS Prompt command is pretty straightforward.
Select it (by pressing ALT+2) if you want to exit to DOS to run a DOS
command not available from this page. When you're finished, type EXIT at
the DOS prompt and press ENTER to return directly to this page. The
Options command (ALT+1), however, requires a bit more explanation.
________________________________________________________________________
Chapter 3: The Home Pad 72
________________________________________________________________________
In order to carry out a command listed on the DOS Commands Index screen,
HyperPAD needs to find the program on your system that runs the command.
So if you select a command whose program HyperPAD can't find for some
reason, use Options (ALT+1) on the command line to call up the Options
dialog box, shown here, which you can use to tell HyperPAD where to look
for your DOS programs.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
If necessary, press F1 to access the on-line Help system, which provides
instructions for using this dialog box.
CHECKING A DISK
When working with DOS, you sometimes need to check how much disk space
or memory is free. To do this with HyperPAD, select the Check a disk
button. This produces a very simple dialog box, in which you can specify
the drive you want to check (the Pick button lets you indicate a drive
other than the one already shown). Use the two option buttons to tell
HyperPAD whether you want it to write corrections to the disk and
display a list of the directories it checked. HyperPAD prints out the
results in a scrollable field for your review. When you're done, press
ESC to close the dialog box.
________________________________________________________________________
Chapter 3: The Home Pad 73
________________________________________________________________________
FORMATTING A DISK
HyperPAD makes it easy for you to prepare a disk for use. Just select
HyperPAD's Format a disk button, which brings up a simple dialog box.
Fill it out by picking which drive to format, specifying what type of
disk you're formatting, and indicating whether you'd like to make the
disk bootable and whether you want to assign a volume label to the newly
formatted disk. Close the dialog box by pressing ESC when you're
through.
COPYING A DISK
A really simple dialog box appears when you select the Copy a disk
button. All you have to specify is which drive your source disk is in
and which drive your target disk is in. When you're done, press ESC.
BACKING UP FILES
You can also use HyperPAD to run the DOS Backup command, a helpful DOS
command that receives little use, perhaps because of its difficult
syntax. HyperPAD merely asks you to fill out a simple dialog box and
then creates the proper syntax and runs the Backup command for you.
To run the DOS Backup command, select the Backup files button. A dialog
box appears that lets you tell HyperPAD the location of the files you
want to back up (use the Pick button if you prefer to select this
information from a tree list rather than type it in) and the drive to
which you want to back up the specified files (again, use the Pick
button to choose a drive other than the one shown).
With the option buttons in this dialog box, you can tell HyperPAD
whether to include subdirectories, back up only changed files, overwrite
duplicate files, or back up only those files created since a particular
date or time.
The default settings for this dialog box are for files to be backed up
to the A drive and for the Include subdirectories and Overwrite
duplicate files options to be selected, with the remaining options
unselected. To instantly restore the default settings, select the Set
Default button.
Once you've finished backing up your files, press ESC to
exit from the dialog box.
________________________________________________________________________
Chapter 3: The Home Pad 74
________________________________________________________________________
RESTORING FILES
The Restore files button takes you to a dialog box that you can fill out
to tell HyperPAD the location of the files you want to restore and where
you want them restored to. The two Pick buttons are used to change the
source drive that's specified and to call up a tree list from which you
can select the target drive and directory. With the option buttons, you
can control whether subdirectories are included and whether HyperPAD
prompts you before overwriting files. Press ESC to close this dialog box
once you're done.
SETTING THE DATE AND TIME
Whenever you ask DOS to display a list of the files in your directories,
it also shows the date and time when each file was created or when it
was last modified. In order for this information to be accurate, your
personal computer's clock and calendar must be set properly. The Set
date and time button gives you an easy way to reset DOS's clock and
calendar. After you've reset the date and/or time, exit from the dialog
box by pressing ESC.
GOING TO A PAD
Once you're through exploring the DOS Commands pad, press ESC to get
back to the Home pad's Main Menu, where we'll be selecting the Go to a
pad button next. This button takes you from the Home pad to the screen
shown here.
________________________________________________________________________
Chapter 3: The Home Pad 75
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
As you can see, its buttons hint at a variety of intriguing
capabilities. Just to whet your appetite, let's take a brief peek at the
pads you can access by selecting these buttons.
0 Phone: Enables you to create a flexible, easily accessible
database of names, addresses, and phone numbers. Selected
information from this database can also be used to print labels.
You can access the Phone Dialer pad and the Track Call pad from
within the Phone pad (as well as from the Pads screen) to
automatically dial phone numbers in your database and record
histories of your calls to people listed there.
0 Phone Dialer: Dials calls for you if your computer is connected
to a Hayes-compatible modem. This pad is accessible not only from
the Pads screen but from within the Phone pad, the Take Message
Pad, and the Track Call pad, too. Phone Dialer allows you to
automatically dial a phone number recorded on the current page of
those pads.
0 Take Message: Lets you quickly and easily record phone messages
on-line and then print them out. If you later decide you want to
call the individual who left the message, you can access the
Phone Dialer pad from within the Take Message pad and place that
call automatically.
________________________________________________________________________
Chapter 3: The Home Pad 76
________________________________________________________________________
0 Track Call: Enables you to create (and print out) an ongoing
history of your calls, both to individuals listed in your Phone
pad and to others. A timer feature is included, which records the
starting time and elapsed time for each call you make. The Phone
Dialer pad is linked to the Track Call pad and can be used to
automatically place your calls and start the timer.
0 Project: Helps you coordinate and monitor the progress of team
projects by keeping track of who's supposed to do what by when.
0 Notes: Enables you to create a database of notes, which can be
searched for specified material, and also offers the capability
of printing out the notes, importing text into the notes from
files created in other programs, and exporting text from the
notes to files in other programs.
0 Calculator: Offers, in addition to a regular calculator,
specialized calculators for performing financial, scientific,
programming, and time computations.
0 Expenses: Consists of a spreadsheet that business travelers can
use to record--and automatically total--daily and weekly
expenses, which can then be printed out.
0 Letter Writer: Gives you the capability of creating and
printing form letters, which you can automatically address to
selected recipients from your Phone pad's database.
0 Daily Planner: Offers vastly more capacity and flexibility than
conventional printed planners. This on-line appointment book's
navigation devices let you record and easily access appointments,
reminders, and notes on pages that are dated months or even years
from now. Used on a laptop, this planner can go wherever you go,
keeping you on time and up to date.
0 Index Cards: Offers the on-line equivalent of a very large and
flexible stack of index cards, with which you can create a
database of information that can be searched, sorted, and
printed.
0 Label Printer: Lets you create a database of labels and then
print either the entire database or selected items from it onto a
wide variety of standard Avery labels or onto custom-designed
labels of your choice.
0 Network: Lets you send messages and modify print queues if
you're running HyperPAD on a Novell network.
________________________________________________________________________
Chapter 3: The Home Pad 77
________________________________________________________________________
0 Computer Info: Automatically records important information
about your system, such as its configuration, memory, and
settings; allows you to enter general information about your
computer; and lets you obtain a printout of this information.
0 Script Printer: Enables users who are working with PADtalk,
HyperPAD's scripting language, to print out specified scripts
created in HyperPAD.
0 F/X Show: Lets you view graphic slide shows and animation
using the FXSHOW.EXE program. (This pad is geared toward users
who want to operate HyperPAD in conjunction with Show Partner
F/X, another Brightbill-Roberts program).
0 Puzzle: Provides a bit of diversion whenever you're in need of
a break!
0 Ideas: Consists of a storehouse of navigational devices,
musical and visual special effects, and working parts that you
can copy and incorporate into the pads you create. (This pad is
geared toward users who want to work with HyperPAD's design
features.)
One enjoyable way to familiarize yourself with what HyperPAD has to
offer is to spend some time browsing through the pads that can be
accessed via the Pads screen. And if you ever lose your way, just
remember to press ALT+F5 to return to the Home pad.
LEARNING ABOUT HYPERPAD
The HyperPAD Tutorial is your destination when you select the Home pad's
Learn about HyperPAD button. You could either select this button and go
through the Tutorial right now or come back to it whenever you like. If
you do decide to explore the Tutorial at this point, you may want to
refer to Chapter 5, which explains in detail how to get the most out of
this on-line, interactive tour of HyperPAD.
________________________________________________________________________
Chapter 3: The Home Pad 78
________________________________________________________________________
CONCLUSION
Having read this chapter, you should recognize the Home pad as your
gateway to HyperPAD--the point of access for all of HyperPAD's major
functions. More specifically, this means you should understand where the
buttons on HyperPAD's Home pad can take you and what you can do once you
get there.
You should know quite a bit about the Customize HyperPAD button (which
takes you to a dialog box that lets you control important aspects of how
HyperPAD works), the Run a program button (which takes you to where you
can launch programs and perform related chores), and the Run a DOS
command button (which takes you to where you can carry out some common
DOS commands in a hassle-free way).
And although you probably won't have an in-depth understanding of
everything that the Manage files button, the Learn about HyperPAD
button, and the Go to a pad button enable you to do, you will know that
file management and the Tutorial are discussed in detail in Chapters 4
and 5, respectively, and that the Go to a pad button takes you to the
Pads screen, from which you can reach many of the pads that come with
HyperPAD.
Our journey through the Home pad has undoubtedly made you realize just
how many other exciting HyperPAD features and capabilities remain to be
explored. So now that you know how to use the Home pad to reach those
destinations, you can begin taking side trips to additional points of
interest!
________________________________________________________________________
Chapter 4: Managing Files 55
________________________________________________________________________
CHAPTER 4: MANAGING FILES
Selecting the Home pad's Manage files button takes you to a pad called
the DOS Shell, shown here.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The DOS Shell is an especially powerful pad that makes it easy for you
to perform a wide range of file-management tasks without having to exit
to DOS and type in complicated commands.
At first glance, though, the DOS Shell looks pretty formidable! The
screen seems chock-full of information, and you may be wondering just
how "easy" it's going to be to operate this pad. Actually, you'll find
it surprisingly simple once you understand how the DOS Shell works.
________________________________________________________________________
Chapter 4: Managing Files 56
________________________________________________________________________
In addition to such standard HyperPAD screen elements as the menu bar,
the title bar, the command line, and the message line or status bar, you
also see two main components when you look at the DOS Shell screen:
0 A group of three list boxes (titled Files, Directories, and
Drives) in the middle of the screen.
0 A portion of the screen just above the list boxes (called the
status area) that displays key information about the files shown
in the Files list box.
Of these elements, the Files list box is really the heart of the DOS
Shell, because you must get your files displayed in the Files list
before you can work with them.
The first section of this chapter, "Displaying Files," shows you how to
make the file(s) you're interested in working with appear in the Files
list box. The second section of the chapter, "Working with Files,"
explains what you can do with those files once you have them displayed
there. In the last section of the chapter, "Using the Tree View," you'll
learn how the tree view, a tool accessible from the DOS Shell, can be
used to change the structure of your directories.
DISPLAYING FILES
The DOS Shell offers you a number of ways to display the files in each
of your directories. It also offers you a number of ways to zero in on
particular files by displaying subsets of your files and by sorting your
files in various ways. In this section of the chapter, you'll learn how
to:
0 Change the directory whose files are displayed in the Files list
box.
0 Create separate DOS Shell pages to display the contents of the
directories you work with most often.
0 View specified subsets of the files in a particular directory.
0 Sort the files displayed in the Files list box according to
specified criteria.
0 Find a particular file and view the contents of the directory
containing that file.
0 Update the information in the DOS Shell and tree view to reflect
any changes you've made to your drives, directories, and files
while outside of HyperPAD.
________________________________________________________________________
Chapter 4: Managing Files 57
________________________________________________________________________
The preceding list reflects the order in which the topics in this
section are presented. We'll start with the most basic operation
(displaying all the files in a specified directory) and then progress to
more sophisticated operations.
DISPLAYING THE CONTENTS OF A DIRECTORY
When you first go to the DOS Shell, the following information may appear
in the three list boxes:
0 Files: A list of files (including the number of bytes in each
file and the date and time that the file was created or last
modified)
0 Directories: A list of subdirectories
0 Drives: A list of one or more drives
The location of the files and subdirectories that you're viewing is
displayed in the status area after "Directory."
There are two ways to view the files and subdirectories in a different
directory. The first is to use the DOS Shell's Drives and Directories
list boxes, and the second is to use the tree view. In the following
subsections, we'll take a look at each of these methods.
SELECTING A DIRECTORY WITH THE DOS SHELL
Sometimes you may want to work with files that are on a drive other than
the one specified after "Directory" in the status area.
To change the drive:
1. TAB to highlight the Drives list box.
2. Use the up and down arrow keys to highlight the drive that you want
to view.
3. Press ENTER.
You can also change the drive by pointing to the desired drive with the
mouse and double-clicking the left mouse button. The "Directory" portion
of the status area is automatically updated to show the new directory
for the drive you just picked.
If the files that you want to work with are located on the same drive
but in a different directory, select the desired directory from the
Directories list box, using the procedure described above for changing
the drive.
________________________________________________________________________
Chapter 4: Managing Files 58
________________________________________________________________________
To view the contents of the parent directory, just select the ". ."
choice from the Directories list box. This simply moves you up one level
in the directory hierarchy.
As you use the Directories list box to move around between the parent
drive and its directories, you'll see that the contents of the Files
list box keep changing accordingly and that the information following
"Directory" and "Number of Files" in the status area is also
automatically updated.
With a little practice, you'll soon become quite adept at using the
Drives and Directories list boxes to display the contents of different
directories. However, you may find it a bit cumbersome to use the
Directories list box if you have to move between many subdirectories--
e.g., between C:\123\SHEETS\BACKUP and C:\WORD\DOC\PROJ1\BACKUP.
Whenever complex DOS Shell navigation would be required to display a
particular group of files or you can't immediately recall where the
desired files are located, the tree view (discussed next) is an
invaluable tool.
SELECTING A DIRECTORY WITH THE TREE VIEW
To display the tree view, shown here, select the Tree command (ALT+2)
from the DOS Shell's command line.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 4: Managing Files 59
________________________________________________________________________
The tree view illustrates the structure of the directories on a
specified drive. Later in this chapter, we'll discuss the tree view more
fully, but for now, you'll use the tree view as a way to quickly access
the directory containing the files you want to work with so those files
can be displayed in the DOS Shell's Files list box.
When you call up the tree view, it shows the structure of the drive
whose contents you're currently viewing on the DOS Shell. To see a tree
view of a different drive, use the command line's View Tree command
(ALT+1), which lets you pick from a list of drives. Once you have a tree
view of the drive containing the files you want to work with, use the
keyboard or the mouse to scroll through the tree view list box until you
spot the location of the desired files.
To select the target directory, either highlight it with the keyboard
and press ENTER or point to it with the mouse and double-click the left
mouse button. As soon as you select your target, the DOS Shell
automatically reappears, showing the contents of the selected directory
in the Files list box.
CREATING DOS SHELL PAGES
Since there are probably a number of directories whose files you work
with often, HyperPAD lets you make separate DOS Shell pages to display
the contents of those directories. By doing so, you can save yourself
the trouble of having to access the drive and directory each time you
want to work with that group of files. To create DOS Shell pages, just
follow the instructions below.
To create DOS Shell pages:
1. Use the DOS Shell's Drives and Directories list boxes or the tree
view to display the desired files in the Files list box.
2. Select Misc. (ALT+7) from the command line.
3. When the pop-up showing miscellaneous commands appears, select New
Page either by highlighting it with the keyboard and pressing ENTER or
by pointing to it with the mouse and clicking the left mouse button.
A dialog box then appears containing a text box that's already filled in
with the path of the directory whose files are now shown in the Files
list box. Just press ENTER or select <<Ok>> to make a separate DOS Shell
page for the currently displayed information.
________________________________________________________________________
Chapter 4: Managing Files 60
________________________________________________________________________
Once you've created a few DOS Shell pages, you can navigate through them
either by pressing the PGUP and PGDN keys on the keyboard or by
selecting the on-screen paging buttons. The page number of the current
DOS Shell page appears at the center of the title bar.
If you want to remove DOS Shell pages that you no longer need, use the
Delete Page command from the Edit menu. (This command only eliminates
unwanted pages from the DOS Shell; it has no effect on the contents of
your hard disk.) Once you remove a page from the DOS Shell, the
remaining pages are renumbered accordingly.
CHANGING THE FILESPEC
Whether you realized it or not, up until now we've been telling you how
to display all the files in a particular directory. (HyperPAD's default
setting is to display all files.) But if you only want to view a portion
of the files in a particular directory, select the FileSpec command
(ALT+3) on the DOS Shell's command line.
The FileSpec popup that appears can be used to change the file
specification from All Files to a particular subset of files (and vice
versa) in the directory whose contents you're viewing. The file
specifications you can select from are shown in the accompanying table.
FileSpec: Files displayed:
------------------------------------------------------------------------
All Files Displays all the files in the directory you're viewing.
Programs Displays only the program files in that directory.
Mask Displays only the files in that directory with a certain
extension.
Search Displays only the files containing specified text.
The currently selected file specification appears after "Viewing" in the
status area, so you can always tell at a glance whether the Files list
box shows all files or a given subset of files. In the following
subsections, we'll take a closer look at the four FileSpec options.
PROGRAMS
Selecting Programs from the FileSpec pop-up makes the DOS Shell's Files
list display only the program files in the directory whose contents
you're currently viewing. (These are files having the file extension
COM, EXE, or BAT.)
________________________________________________________________________
Chapter 4: Managing Files 61
________________________________________________________________________
If you then use the DOS Shell to view the contents of a different
directory, HyperPAD continues to display only the program files in the
newly selected directory until you change the file specification (for
example, by selecting All Files from the FileSpec pop-up).
MASK:
Selecting Mask from the FileSpec pop-up produces a dialog box asking you
for the mask of the files you want displayed.
To display only the files in the currently viewed directory that
have a particular extension, type an asterisk (*), a period (.), and the
extension, like "*.DOC." When you press ENTER or select <<Ok>>, the
files with the specified extension are displayed in the DOS Shell's
Files list box. If, for example, you were in the HPAD2 directory and
wanted to view the files in that directory with the extension PAD, you
would type *.PAD in the dialog box's New mask text box. If you wanted to
view only the files that start with the letter C and have the extension
PAD, you would type C*.PAD.
Once you use the FileSpec command to specify an extension and then use
the DOS Shell to view the contents of a different directory, HyperPAD
continues to display only the files (if any) with that extension in the
newly selected directory until you change the file specification (for
example, by selecting All Files from the FileSpec pop-up).
________________________________________________________________________
Chapter 4: Managing Files 62
________________________________________________________________________
SEARCH
Selecting Search from the FileSpec pop-up produces the Search dialog
box, shown here. You can use this dialog box to tell HyperPAD to search
the contents of the files in the currently viewed directory for the word
or string that you type into the Search for text box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Selecting the Case sensitive option tells HyperPAD to identify only
files that contain the specified text exactly as you've typed it. If,
for example, you type Bill in the Search for text box and select the
Case sensitive option, HyperPAD lists the files in the currently viewed
directory that contain the word "Bill" (i.e., capital "B," lowercase
"ill," just the way you typed it). But if you don't select the Case
sensitive option, HyperPAD lists all the files that contain the text
string "bill"--including not only "Bill" but also such instances as
"Brightbill" and "billing."
Once you've typed in the text string and selected the Case sensitive
option (if desired), select the Start Search button to initiate the
search. HyperPAD uses the Found list box to display the files from the
Search list in which it finds the specified text string.
When HyperPAD has finished its search, select the Search dialog box's
Set View button. The DOS Shell reappears, with the list of files
containing the specified text string now displayed in the Files list
box.
________________________________________________________________________
Chapter 4: Managing Files 63
________________________________________________________________________
ALL FILES
When you're through viewing any of the file subsets, you can display all
the files in the directory again by selecting the command line's
FileSpec command (ALT+3) and then selecting All Files from the FileSpec
pop-up.
SORTING FILES
HyperPAD offers a variety of options for sorting the files currently
displayed in the DOS Shell's Files list box. The default is for files to
be listed by name in ascending alphabetical order. However, you can also
sort files by extension, size (in bytes), and the date and time that the
files were created or last modified.
To sort files, select the Sort command (ALT+1) from the command line.
A popup appears from which you can select Name, Extension, Size, and
DateTime. Once you select any one of these options, a second pop-up
automatically appears showing the options Ascending and Descending.
(This means you really have eight sort options because you could sort
according to any of the four options in either ascending or descending
order.)
Once you've selected an option and specified ascending or descending
order, the files in the Files list box are rearranged accordingly, and
your sort option is recorded after "Sorted by" in the status area. If
you selected descending order, the sort option in the status area is
followed by a downward-pointing arrow.
Once you select a sort option with the Sort command, if you then use the
DOS Shell to view the contents of a different directory, HyperPAD
continues to display the files in the newly selected directory according
to the current sort option until you use the Sort command again to
select another option (for example, HyperPAD's default setting--Name and
Ascending).
________________________________________________________________________
Chapter 4: Managing Files 64
________________________________________________________________________
FINDING FILES
Suppose you're trying to locate a file but you don't know which
directory it's in? Worse yet, suppose you don't even remember the file's
name?!
To resolve this dilemma, select the Misc. command (ALT+7) from the DOS
Shell's command line, and when the pop-up of miscellaneous commands
appears, select Find File. The DOS Find File dialog box, shown here,
appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
To fill out this dialog box, type into the Find what text box the first
letter of the filename (if you happen to know it), an asterisk (*), a
period (.), and the extension of the desired file, like "*.BAT." Then
use the Drive to search text box to specify the drive you think the file
is located on. (Select the Pick button to choose a drive other than the
one already shown.)
Up to this point, the preceding explanation probably sounds a lot like
using the Mask command on the FileSpec pop-up. However, the Mask command
searches only the files listed for the currently viewed directory,
whereas the Find File command performs a global search of all the
directories on a particular drive.
Once HyperPAD displays the results of its search in the DOS Find File
dialog box's Found list box, you can use the keyboard or the mouse to
________________________________________________________________________
Chapter 4: Managing Files 65
________________________________________________________________________
select one of the files. As soon as you select a file, the DOS Shell
reappears and displays the contents of the directory containing that
file.
REREADING DIRECTORIES AND TREES
In order to keep your DOS Shell and tree view current, you should give
HyperPAD a chance to update its information whenever you know that
you've made changes that affect your drives, directories, and files. (If
you happen to notice discrepancies between the information displayed on
the DOS Shell or the tree view and the actual status of your drives,
directories, and files, you've probably failed to advise HyperPAD of
recent changes!)
If you've made changes affecting the contents of a directory, start by
displaying that directory on the DOS Shell. Then select the Misc.
command (ALT+7), and when the pop-up of miscellaneous commands appears,
select Reread Directory. HyperPAD rereads the currently viewed directory
and automatically displays an updated version of it.
If you've made changes affecting the structure of a directory, start by
selecting Tree (ALT+2) from the DOS Shell's command line to bring up the
tree view. Then, if necessary, use the View Tree command (ALT+1) on the
DOS Tree's command line to select a drive other than the one whose tree
view is displayed. Once you have a tree view of the drive containing the
directory where you made the changes, select Reread Tree (ALT+2) from
the command line. HyperPAD rereads the tree for the selected drive and
automatically displays an updated version of it.
Now that you've seen how to display selected files in the DOS Shell's
Files list box so you can work with them, let's take a look in the
following section at some of the operations you can perform on those
files.
________________________________________________________________________
Chapter 4: Managing Files 66
________________________________________________________________________
WORKING WITH FILES
Once you have the files you want to work with displayed in the DOS
Shell's Files list box, you can use that list to run a program; browse
the contents of files; and copy, move, and delete files. The subsections
below explain how.
If in the course of working with your files, you need to carry out a DOS
command, there's a handy shortcut you should be aware of. Simply select
Misc. (ALT+7) from the DOS Shell's command line and then select DOS
Command from the pop-up of miscellaneous commands that appears. This
takes you directly to the DOS Commands Index page, just as if you had
selected the Home pad's Run a DOS command button.
RUNNING A PROGRAM
In this subsection, you'll learn how to use HyperPAD's DOS Shell to
launch a program.
To launch a program from the DOS Shell:
1. Get the program file displayed in the Files list box.
2. Select the program with the keyboard or the mouse.
HyperPAD launches the program but does not ask you whether you'd like to
load a work file.
When you exit from the program, HyperPAD returns you to the DOS Shell.
Another way to launch a program from the DOS Shell is to get the work
file that you want to load displayed in the Files list box. When you
select that file with the keyboard or the mouse, HyperPAD automatically
searches for the program that uses that type of file and (assuming it
finds the program) launches the program with the selected work file.
When you exit from the program, HyperPAD returns you to the DOS Shell.
BROWSING FILES
Suppose you have a group of files displayed in the DOS Shell's Files
list box but aren't quite sure which of the files contains certain
material that you want to work with. You can view the contents of a file
by highlighting the file in the Files list box and then selecting the
Browse command (ALT+8) from the DOS Shell's command line. A dialog box
appears with the name of the highlighted file, but if you want to browse
a different file, you can type another choice in the text box. Once the
name of the file you want to browse is shown in the text box, press
________________________________________________________________________
Chapter 4: Managing Files 67
________________________________________________________________________
ENTER to call up the View File dialog box, illustrated here, which
displays the raw contents of the file.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Some files contain readable text (e.g., HyperPAD's README.DOC). The
contents of other files consist of both readable text and other data,
which may look like strings of meaningless characters. Some files, in
fact, contain no readable text at all.
When you browse the contents of a file (even a file whose raw contents
aren't deliberately made to be readable, such as the one shown here),
you can usually pick out enough readable text strings to determine
what's in the file. In short, the Browse command lets you take a quick
peek at a selected file to see whether it contains the material you want
to work with.
If you'd like to browse the contents of more than one file from the DOS
Shell's Files list box, first mark the files (by highlighting each file
with the keyboard and then pressing SPACE or by pointing to each file
with the mouse and clicking the right mouse button) and then select
Browse (ALT+8) from the command line. The View File dialog box
immediately appears. When you're finished browsing the contents of the
first marked file, you can select the Next button below the scroll box
in the View File dialog box to display the contents of the next marked
file without having to return to the DOS Shell and make another
selection.
________________________________________________________________________
Chapter 4: Managing Files 68
________________________________________________________________________
MANIPULATING FILES
As shown in the accompanying table, three of the commands on the DOS
Shell's command line can be used to manipulate the files that appear in
the Files list box.
Command: Result:
-----------------------------------------------------------------------
Copy Places a copy of the file in another location on you system
while leaving the original file in its directory.
Move Takes the file off the directory where it now appears and
places it in another location on your system.
Delete Removes the file from your system entirely.
In this subsection, you'll learn how to perform each of these
operations.
COPYING AND MOVING FILES
The procedures for copying and moving files are very similar. First,
display the files you want to work with in the DOS Shell's Files list
box and use the keyboard or the mouse to mark the files you want to copy
or move.
As you mark files, notice how the number of files marked and the total
number of bytes they contain are recorded after "Marked files" and
"Bytes marked" in the status area. This information can be useful if
you're trying either to free up a certain amount of space on a drive or
to make sure the marked files will fit on another drive. (We'll explain
below how to tell whether the marked files will fit on your target
drive.)
________________________________________________________________________
Chapter 4: Managing Files 69
________________________________________________________________________
Once you've marked the files you want to work with, select Copy (ALT+4)
or Move (ALT+5) from the command line. If you're copying files, the Copy
dialog box, shown here, appears; if you're moving files, a nearly
identical Move dialog box appears. In either case, the files you just
marked appear in the scroll box, and the number of marked files and
their source are recorded immediately above the scroll box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
To use the Copy or Move dialog boxes, type the desired destination for
the files in the Copy to or Move to text boxes. If you'd prefer to fill
in the Copy to or Move to text boxes automatically by selecting the
target destination from a tree view, just use the Pick button. The
amount of free space on the target drive is shown after "Bytes free" to
the right of the tree view, so you can determine whether the marked
files will fit there.
Select the Confirm overwriting option on the Copy or Move dialog box if
you want HyperPAD to replace any existing files with the same names at
the target location with the files that you're about to move or copy to
that location.
DELETING FILES
To remove files from your hard disk, start by displaying the contents of
the directory containing the files in the Files list box. Then use the
keyboard or the mouse to mark which files you want to delete. If you're
interested in freeing up space on the drive containing the files, you
________________________________________________________________________
Chapter 4: Managing Files 70
________________________________________________________________________
can check "Bytes marked" in the status area to see the total number of
bytes in the marked files.
After making sure the files you've marked are the ones you intend to
delete, select Delete (ALT+6) from the DOS Shell's command line. A
dialog box appears asking you to confirm your intention to delete the
specified number of files. When you select <<Ok>>, the marked files are
removed from your hard disk.
In the first two sections of this chapter, you learned how to use the
DOS Shell to display files that you're interested in working with and
how to perform a number of common file-management operations on those
files. We'll close the chapter with a look at some additional functions
you can carry out with the tree view.
USING THE TREE VIEW
Earlier in the chapter, you were introduced to the tree view as a tool
for specifying the directory whose contents you want to display on the
DOS Shell and the directory to which you want to copy or move files.
As you'll see in the next two subsections, in addition to these
functions, the tree view is an excellent information resource as well as
a tool that you can use to change the structure of your directories.
USING THE TREE VIEW AS AN INFORMATION RESOURCE: Examining a tree view
is a good way to get a feel for the structure of the directories on one
of your drives, since it displays the hierarchy of directories,
subdirectories, and sub-subdirectories at a glance.
To make it easier for you to browse through the tree views of your
drives, HyperPAD creates a separate tree view page for each drive the
first time you call up a tree view of that drive. (This process is
similar to creating separate DOS Shell pages, except that in the case of
the tree view, HyperPAD performs this function automatically.) Once your
tree list contains more than one page, you can use the keyboard's PGUP
and PGDN keys or the on-screen paging buttons to travel between pages
rather than having to use the command line's View Tree command (ALT+1)
to specify a drive each time you want to see a tree view.
If you find that your tree view is becoming cluttered with pages for
drives that you seldom work with, just access each unwanted tree view
page and remove it by selecting Delete Page (ALT+3) from the command
________________________________________________________________________
Chapter 4: Managing Files 71
________________________________________________________________________
line. Doing this simply eliminates the tree view page; it has no effect
on the contents of your hard disk. The next time you have occasion to
work with a drive whose tree view page you previously deleted, you can
create another tree view page for that drive by using the command line's
View Tree command (ALT+1).
USING THE TREE VIEW TO CHANGE YOUR DIRECTORIES' STRUCTURE
The tree view also lets you create a new directory and delete a
directory from a drive.
To create a new directory, call up a tree view of the drive on which you
want to place the directory, use the keyboard or the mouse to select the
directory to which you want to add a subdirectory, and then select Make
Dir (ALT+4) from the command line. A dialog box appears containing the
New directory text box, with the drive and directory information already
filled in (e.g., C:\FX\SAMPLES). All you have to do is type in the name
of the new directory and select <<Ok>>.
To remove a directory or branch (including all the files and subordinate
directories within it) from your hard disk, call up a tree view of the
drive containing that branch, mark the branch with the keyboard or the
mouse, and then select Delete Branch (ALT+6) from the command line.
HyperPAD presents a dialog box asking you to confirm your intention to
delete the specified branch, together with its contents. Selecting
<<Ok>> removes the branch from your system.
Be careful when you use the Delete Branch command, because if you take
material off your hard disk with this command, it's gone for good.
________________________________________________________________________
Chapter 4: Managing Files 72
________________________________________________________________________
CONCLUSION
Once you master the information presented in this chapter, you should be
able to access the files you want to work with by using the DOS Shell
and the tree view to display those files in the DOS Shell's Files list
box. You should also know how to sort the currently viewed files, how to
display subsets of the files in a particular directory, and how to find
a file on a drive. And you'll be able to update your DOS Shell and tree
view to reflect any changes you've made to the contents or structure of
your directories.
After you have the files you want to work with displayed in the DOS
Shell's Files list box, you should know how to launch a program by
selecting a program file or a work file on the list; how to browse the
contents of one or more of the listed files; and how to copy and move
files on the list or delete them from your system.
And finally, you'll know how to use the tree view not only as an
information resource that shows the structure of your directories but
also as a tool for selecting directories in order to perform certain DOS
Shell functions and as a tool for changing the structure of your
directories.
In short, you'll be able to manage your files simply by using HyperPAD's
DOS Shell and tree view to display the contents of your directories and
then selecting easily understandable options and commands from pop-ups
rather than by manually entering a lot of hard-to-remember DOS commands.
________________________________________________________________________
Chapter 16: Menu and Command Reference 293
________________________________________________________________________
CHAPTER 16: MENU AND COMMAND REFERENCE
THE FILE MENU
The File menu commands allow you to execute file and pad maintenance
tasks. Open the File menu to:
0 Open, save, and create new pads
0 Perform pad maintenance tasks
0 Import and export screen and database files
0 Print reports and labels
0 Run DOS programs
0 Exit HyperPAD
The commands displayed on the File menu change depending on the current
user level. Below, the File menu is shown at the browsing and painting
user levels:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 294
________________________________________________________________________
-----------------------------------
NEW
Accelerator Key: ALT+F, N
Keyboard Shortcut: F11
User Level: All
The New command saves the current pad and creates a new pad.
When you select New, you must type a name for the new pad in the New Pad
dialog box. If the "Keep current background" box is checked, the new pad
will use the current background.
Depending on the graphics card in your system, you can select from
different screen modes. If your system is CGA-compatible you must select
25 line mode. EGA systems support 25 and 43 line mode, and VGA systems
support 25, 43, and 50 line mode.
-----------------------------------
OPEN
Accelerator Key: ALT+F, O
Keyboard Shortcut: F12
User Level: All
The Open command saves the current pad and accesses another pad. Either
type in the name of the pad you want to open or select the pad from the
Files list box in the Open Pad dialog box.
-----------------------------------
SAVE A COPY
Accelerator Key: ALT+F, S
Keyboard Shortcut: ALT+F11
User Level: All
Use the Save a Copy command to save the current pad under a new name or
to create a backup copy of your pad. Since HyperPAD saves all changes to
the current pad, a backup copy provides the only means of restoring a
pad to its previous state. So you should always make backups prior to
editing a pad.
________________________________________________________________________
Chapter 16: Menu and Command Reference 295
________________________________________________________________________
When you select the Save a Copy command, the Save a Copy dialog box
appears. The default pad name is the current pad name with a .BAK
extension. To choose the default, press ENTER. Otherwise, type in the
new name (and the drive and directory if you are saving the pad in a
drive or directory other than the current directory) and press ENTER.
-----------------------------------
COMPRESS
Accelerator Key: ALT+F, C
Keyboard Shortcut: none
User Level: Painting
The Compress command decreases the amount of disk space occupied by the
pad by freeing space created when you delete pages, backgrounds,
buttons, and fields. Use the Compress command periodically to free disk
space and thereby increase disk access speed. While compressing,
HyperPAD displays a status box showing which pages and backgrounds are
being compressed.
Compress requires twice the disk space that the uncompressed pad
occupies.
-----------------------------------
PROTECT
Accelerator Key: ALT+F, T
Keyboard Shortcut: none
User Level: Painting
Use the Protect command to set passwords and to set the various forms of
pad protection.
Note: When the user level is typing or browsing, the Protect command
will not appear on the File menu. This protects your pad from
modification. When the pad is protected, access the extended File menu
by holding down the SHIFT key and pressing ALT+F (ALT+SHIFT+F). If you
are using a mouse, hold down the SHIFT key and click on the File menu.
________________________________________________________________________
Chapter 16: Menu and Command Reference 296
________________________________________________________________________
When you select Protect from the File menu, the Set Pad Protection
dialog box appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Read only: When this option is set, HyperPAD prevents modification of
the file. Further, the pad is opened in a shared, read-only mode that
allows network users to open and use the pad simultaneously. Using
PADtalk, you can still modify pages by putting information into fields
and modifying button properties, etc.; however, these changes will not
be saved.
Activating this option does not limit the user's ability to alter the
user level.
Can't delete pad: This option prevents you from accidentlaly deleting
your pad from HyperPAD. When this option is active, the Delete command
from the File menu will not work.
By password only: When this option is selected, you may only access the
pad after providing the correct password. Assign a password with the
<Set Password> button.
Entering a password without checking the By password only option will
allow all users to access the pad. However, only those who know the
password can access the Protect dialog box.
________________________________________________________________________
Chapter 16: Menu and Command Reference 297
________________________________________________________________________
User level: Determines which tools, menus, and editing capabilities the
user can access. The following describes the five user levels:
User level: Description:
Browsing Allows you to only click on buttons
Typing Allows you to type into fields
Painting Allows you to use the painting tools
Authoring Allows you to create and manipulate objects
Scripting Allows you to create and modify scripts
Each user level encompasses all of the capabilities of the previous
levels. For example, painting gives you all of the capabilities of
typing and browsing.
Set Password: This option accesses the Set Password dialog box into
which you enter the password.
-----------------------------------
DELETE
Accelerator Key: ALT+F, D
Keyboard Shortcut: none
User Level: Painting
Use the Delete command to remove a pad from disk. To delete a pad, open
the pad you want to delete, then select the Delete command. Once a pad
is deleted, you can only restore it with a DOS file recovery program.
While the "No Delete" option in the Set Pad Protection dialog box is
activate, the pad cannot be deleted.
-----------------------------------
IMPORT
Accelerator Key: ALT+F, I
Keyboard Shortcut: none
User Level: Painting
Use the Import command to bring dBASE III, HyperPAD Capture, ASCII text,
Delimited ASCII, and BASIC BSAVE files into HyperPAD.
________________________________________________________________________
Chapter 16: Menu and Command Reference 298
________________________________________________________________________
When you select the Import command, the Import dialog box appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
HYPERPAD CAPTURE (.GX2)
This option imports character mode screen images captured using
HyperPAD's Capture utility program, CAP.EXE. A new page is created for
each image in the .GX2 file.
For an image to be imported into the current pad, the resolution (i.e.,
the height and width) of the image must be the same as the current pad.
Those images with different character modes will not be imported.
TEXT
This option imports a text file into the current field.
To import text:
1. Make sure you are using the Browse tool (CTRL+B).
2. Press TAB until the receiving field has the focus.
3. If the field is highlighted, press F2 to edit the field.
4. Position the cursor where you want to insert the imported text.
5. Select Import and choose the Text option.
6. Select the text file to import from the Import Text File dialog box.
DBASE III (.DBF)
This option imports records from dBASE III and dBASE III Plus files.
HyperPAD will automatically create a new background in the current pad
with fields that correspond to the dBASE fields. HyperPAD then creates a
separate page in the pad for each record in the dBASE III file. You can
import a maximum of 48 fields.
________________________________________________________________________
Chapter 16: Menu and Command Reference 299
________________________________________________________________________
DELIMITED ASCII
This option imports records from delimited ASCII files created by
spreadsheets, databases, word processors, and other programs. When
importing delimited ASCII files, HyperPAD creates a new background in
the current pad containing fields that correspond to the fields in the
delimited ASCII file. HyperPAD then creates a separate page for each
record in the delimited ASCII file.
BASIC BSAVE
This option imports a BASIC.BSV file into HyperPAD. These files are
memory images of the screen data usually created in BASIC. The .BSV file
replaces all painting on the page or background. For example, when you
import a .BSV file, everything painted on the current layer (page or
background) is replaced with the screen image contained in the file.
The following BASIC statements create a BSAVE file called MYFILE.BSV:
DEF SEG=&HB800 'use &HB000 for mono
BSAVE "myfile.bsv",0,4000 'use 8000 for 50 lines
'use 6880 for 43 lines
-----------------------------------
EXPORT
Accelerator Key: ALT+F, E
Keyboard Shortcut: none
User Level: Painting
Use the Export command to save data from the current pad to the
following file formats: Show Partner F/X (.GX2), BASIC BSAVE (.BSV),
dBASE III (.DBF), Delimited ASCII, and Text (.TXT).
Selecting the Export command accesses the Export dialog box:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 300
________________________________________________________________________
SHOW PARTNER (.GX2)
This option exports the current screen (excluding the menu bar, status
bar, and tool box) to a Show Partner F/X (.GX2) file. The exported file
can then be used with Show Partner F/X and other products that support
the .GX2 file format. When this option is activated, HyperPAD displays a
dialog box that asks you for a filename. Type in the filename, including
a drive and directory if necessary, then press ENTER.
BASIC BSAVE (.BSV)
This option exports the current screen (excluding the menu bar, status
bar, and tool box) to a .BSV file. This file is a memory image of a
screen that can be used by BASIC or other programming languages. The
following BASIC statements read and display the file MYFILE.BSV:
DEF SEG=&HB800 'use &HB000 for mono screens
BLOAD "myfile.bsv"
dBASE III (.DBF)
This option exports data from background fields to a dBASE III (.DBF)
file. If you select dBASE III, HyperPAD displays the Export to DBASE III
dialog box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 301
________________________________________________________________________
Background field: Lists the current background fields.
.DBF field: HyperPAD proposes the first eight (8) characters of the
field name as the .DBF field name. For example, if a HyperPAD field is
named "STREETADDRESS", "STREETAD" is proposed as the .DBF field name.
Type: DBASE III supports five types of fields: character, numeric,
date, logical, and memo. Initially, each field is a character type. To
change the field type, TAB to highlight Type and press SPACE until the
correct field type is displayed.
Width: This option allows you to set the width of the dBASE III field.
Initially, HyperPAD assigns a field width (number of characters wide)
based on the physical dimensions of the field (no greater than 255). To
change the width, enter a new value in the Field Width text box. The
maximum allowable widths for each are:
Field Type: Maximum width:
-------------------------------------------
character 255
numeric 10 (8 decimal places)
date 8
logical 1
memo 10
Orientation: The orientation options determine how the characters are
placed on the paper. Portrait positions the print in standard page
format. Landscape rotates the paper horizontally, so that the pages are
wider than they are long. Use the Landscape option to produce wide
reports. The Landscape option can only be used on page printers, such as
the HP LaserJet Series III.
When you select <<Ok>> from the Export to dBASE III dialog box, HyperPAD
displays a dialog box that asks you to name the dBASE III filename
you're exporting to. Type in the filename, including the drive and
directory, if necessary.
________________________________________________________________________
Chapter 16: Menu and Command Reference 302
________________________________________________________________________
DELIMITED ASCII
This option exports data from the current background fields to a
delimited ASCII file. ASCII files can be used by most word processors
and database programs. If you select the Delimited ASCII option,
HyperPAD displays the Export Delimited ASCII dialog box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Type in the filename, include the drive and directory, if necessary. If
you do not specify a file extension, HyperPAD assumes .TXT.
Delimited ASCII files are exported in the following format:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Each line is terminated with both a carriage return character (ASCII 13)
and a linefeed character (ASCII 10). The file itself is terminated with
an end of file character (ASCII 26).
________________________________________________________________________
Chapter 16: Menu and Command Reference 303
________________________________________________________________________
TEXT
This option exports the content of the current field to a text file.
To use the Export Text command:
1. Make sure you are using the Browse tool (CTRL+B).
2. TAB until the field you want to export information from has the
focus.
3. Select Export and choose the Text option.
A dialog box is placed on screen.
4. Type in the filename and include the drive and directory, if
necessary. If you don't specify a file extension, HyperPAD assumes .TXT.
The carriage returns (ASCII 13) in the field are translated to carriage
return/linefeed pairs (ASCII 13/ASCII 10).
-----------------------------------
PRINTER SETUP
Accelerator Key: ALT+F, U
Keyboard Shortcut: none
User Level: All
Use the Printer Setup command to select your printer and the port to
which your output is directed. When you select the Printer Setup
command, the Printer Setup dialog box appears:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 304
________________________________________________________________________
Available Printers: In the Available printers list box, HyperPAD lists
all the available printer drivers. If your printer is not listed, choose
Generic Line Printer. Select a printer by TABBING to the Available
Printers list, using the UP and DOWN arrow keys to highlight a printer,
and then pressing SPACE.
If your printer is not listed, you have two printer options, which are
described below:
0 Generic Line Printer: Use this driver to print to a file or
to a standard printer. This driver prints all printable
characters, translating extended characters (less than 32 and
greater than 126) to printable characters (usually a space). The
end of line character is printed as a carriage return and
linefeed pair. The end of page character is printed using a
formfeed.
0 Extended Generic: This driver is the same as the Generic Line
Printer with one exception: it allows characters greater than 126
to be printed. Choose this option if your printer supports these
characters.
Print to: Select LPT1 or LPT2 if your printer is connected to a
parallel port, or COM1 or COM2 if your printer is connected to a serial
port. If you don't want to immediately print the information, you can
print to a file with the File option. If you print to a file, you must
specify a valid DOS filename in the text box to the right of the File
prompt.
-----------------------------------
PAGE SETUP
Accelerator Key: ALT+F, G
Keyboard Shortcut: none
User Level: All
Use the Page Setup command to specify the print orientation, the paper
size, and whether manual or continuous feed is used. Once these
parameters are set, they are retained until the next time you alter
them.
________________________________________________________________________
Chapter 16: Menu and Command Reference 305
________________________________________________________________________
When you select the Page Setup command, the Page Setup dialog box
appears:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Orientation: The orientation options determine how
the characters are placed on the paper. Portrait positions the print in
standard page format. Landscape rotates the paper horizontally, so that
the pages are wider than they are long. Use the Landscape option to
produce wide reports. The Landscape option can only be used on page
printers, such as the HP LaserJet Series III.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 306
________________________________________________________________________
Compressed: This option allows you to print more
characters on a line. The Compressed option can be activated, regardless
of which orientation option is selected.
Form: Form determines the page size. Letter specifies a standard 8.5- x
11-inch page, Legal specifies a 8.5- x 14- inch page, and Custom allows
you to set your own dimensions. If you select Custom, TAB to the Height
and Width text boxes under Custom and enter the page's dimensions (to
two decimal places).
Feed: Feed determines how paper is fed into your printer. Manual feed
pauses between pages and prompts you to insert pages by hand. Continuous
feed does not pause between pages. Use Continuous Feed for tractor feed
and automatic feed printers.
-----------------------------------
PRINT
Accelerator Key: ALT+F, P
Keyboard Shortcut: none
User Level: All
Use the Print command to print pages, reports, and labels.
When you select the Print command the Print dialog box appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 307
________________________________________________________________________
When you select one of the print type options, its corresponding dialog
box appears and then prompts you for information regarding the print
type.
PAGES
This option allows you to print a page (or group of pages) as it appears
on screen. When you select the Pages option, the following dialog box
appears:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Header: Select the Header text box and enter any text you want to
appear at the top of each printed page. (See the table at the end of the
Print section for format code information.) If you don't want a header
to appear, leave this text box empty.
Footer: Select the Footer text box and enter any text you want to
appear at the bottom of each printed page. (See the table at the end of
the Print section for format code information.) If you don't want a
footer to appear, simply leave the text box empty.
Pages: The Pages option specifies the range of pages to be printed. If
the All option is selected, then all the pages in the pad are printed.
If the Pages option is active, you must specify the range of pages to be
printed. Type the starting and ending page numbers in the From and To
text boxes.
________________________________________________________________________
Chapter 16: Menu and Command Reference 308
________________________________________________________________________
As is: The As is option specifies that the page be printed exactly as
it appears on the display. This includes the menu bar, the status bar,
and tool box, if they are currently displayed.
Margins: All margins default to 0.5". Change the margins by selecting
the appropriate margin text box and typing in a new value. All
measurements are given in inches.
Pages per printed page: The Pages per printed page option specifies the
number of pages to be printed on a single sheet of paper. The default is
one page per sheet of paper. The maximum value depends on the size of
the HyperPAD page and the paper size.
LABELS
The Labels option prints mailing labels using selected background
fields.
When you select the Labels option, the Print Labels dialog box is
displayed. By default, all background fields are included on the label.
However, you can select which fields are included with this dialog box.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The dialog box options allow you to specify the dimensions of each label
and the layout of the labels on the page.
________________________________________________________________________
Chapter 16: Menu and Command Reference 309
________________________________________________________________________
The following diagrams will help you to understand what each option
specifies:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 310
________________________________________________________________________
Background field: This column lists all the fields on the current
background. If a field does not have a name, its ID is displayed.
Print: This option specifies the background fields to print on the
label. To toggle the value between Yes and No, TAB to this column and
press SPACE.
Labels across: This option specifies the number of labels printed
across each page. By default, labels are printed two across, which is
typical for laser printer label sheets. For tractor feed labels, use the
value 1.
Labels down: This option selects the number of labels placed vertically
on the label sheet. For tractor feed labels, use the value 0 (which
means that the labels are continuous). The default is 7.
Top margin: This option specifies the top margin on the label sheet.
For laser labels, specify the exact number of inches from the top of the
page to the top of the first label. For tractor feed labels, set the Top
Margin to 0 and position the print head at the top of the first label.
The default is 0.25".
Left margin: This option specifies the distance from the left side of
the paper to the left side of the first label in inches. The default is
0.25".
Horizontal (space between labels): This option controls the horizontal
spacing between labels. When you choose to print two or more labels
across, you must specify the space between labels. The default is 0.134
" (1/8").
Vertical (space between labels): This option controls the vertical
spacing between labels. The default is 0 (used by most tractor feed
labels).
Width: The Width option specifies the width of the label in inches. The
default is 4".
Height: This option specifies the height of the label in inches. The
default is 1.5".
Label Margins (left and right): These options allow you to specify the
margins within the label itself. Normally, you will have to make a few
test prints in order to find the correct margin settings.
COLUMNS
The Columns option prints data in column reports using information from
selected background fields. The column report has the following format:
________________________________________________________________________
Chapter 16: Menu and Command Reference 311
________________________________________________________________________
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
When you select the Columns option from the Print dialog box, the Print
Column Report dialog box appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Background field: This column lists all the fields on the current
background. If the field does not have a name, then its field ID is
used.
________________________________________________________________________
Chapter 16: Menu and Command Reference 312
________________________________________________________________________
Width: This option specifies the column width allowed for the field on
the printed page. By default, HyperPAD tries to print all the background
fields on the page and adjusts the width of each field accordingly. To
change the width, use TAB and the UP and DOWN arrows to highlight the
field's width that you want to change, then type in a new value. The
measurement must be in inches.
Print: This option specifies the background fields to print in the
column report. To toggle the value between Yes and No, TAB to the
setting and press SPACE.
Single (Spacing): This option allows you to print a single-spaced
report.
Double (Spacing): This option allows you to print a double-spaced
report.
Field (Names): This allows you to print field names across the top of
the report. If field names are printed, they are wrapped within the
allowed column width.
Page (Names): This option allows you to print the pad's name along the
left side of the printed page. If this is not selected, there will be
more room in which to print the field information.
Header: This option allows you to specify the text that will print at
the top of each page. If you do not want to include a header, leave this
text box empty. See the table at the end of the Print section for format
code information.
Footer: This option allows you to specify text that will print at the
bottom of each page. If you do not want a footer, leave the text box
empty. See the table at the end of the Print section for format code
information.
Margins (top, bottom, left, right): These options allow you to specify
the page margins (in inches).
________________________________________________________________________
Chapter 16: Menu and Command Reference 313
________________________________________________________________________
ROWS
Prints data in row reports using selected background fields. A row
report has the following format:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 314
________________________________________________________________________
When you select the Rows option from the Print dialog box, the Print Row
Report dialog box appears:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Background field: This column lists all the current background fields.
If the field does not have a name, then its ID is used.
Width: This field is not used.
Print: This option allows you to specify the background fields printed
in the row report. To toggle the value between Yes and No, TAB to the
setting and press SPACE.
Single: This option specifies a single-spaced report.
Double: This options specifies a double-spaced report.
Field (Names): This option causes field names to be printed to the left
of the field's content. If you want more room for your field
information, don't select this option.
Page (Names): This option allows you to print the page names, if one
has been assigned, before each set of field information. If the page
doesn't have a name, its number is printed instead. Use this option to
identify the sections of a report.
Margins (top, bottom, left, right): These options allow you to specify
the page margins in inches.
________________________________________________________________________
Chapter 16: Menu and Command Reference 315
________________________________________________________________________
Header: This option allows you to specify text that will be printed at
the top of each page. If you do not want a header, leave this text box
empty. (See the table at the end of the Print section for format code
information.)
Footer: This option allows you to specify text which will appear at the
bottom of each printed page. If you don't want a footer, leave this text
box empty. (See the table at the end of the Print section for format
code information.)
All headers and footers can include print commands to execute at print
time. Each command is preceded by an ampersand. The commands and their
functions are:
Command: Function:
-------------------------------------------------------
&L Prints text flush left
&R Prints text flush right
&C Prints centered text
&P Automatic page numbering
&D Prints the date
&E Prints the long date
&T Prints the time
&S Prints the pad name
&A Prints the page name
&N Prints the page numbers from the pad
________________________________________________________________________
Chapter 16: Menu and Command Reference 316
________________________________________________________________________
-----------------------------------
RUN PROGRAM
Accelerator Key: ALT+F, R
Keyboard Shortcut: ALT+F10
User Level: All
Use the Run Program command to run a DOS program or a batch file. When
you run a program from HyperPAD, HyperPAD shrinks to 3K bytes,
essentially freeing up all the computer's memory. When you exit the
program, HyperPAD returns to the page in the pad where you left off.
When you run a program, HyperPAD displays the Run Program dialog box:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Program to run: Type in the name of the program you
want to run. If you do not specify a directory for the program, HyperPAD
will search the current directory first. If the program is not found,
HyperPAD searches the directories given by the DOS environment variable
"PATH", which is set in the AUTOEXEC.BAT.
If you do not include a file extension, HyperPAD will look for .COM
files, then .EXE files, then .BAT files. If you specify a batch file
(.BAT), HyperPAD will attempt to locate your copy of COMMAND.COM, which
is necessary to run a batch file.
By default, HyperPAD presents "COMMAND.COM." If you press ENTER,
HyperPAD will load DOS. To return to HyperPAD, type EXIT and press
ENTER.
Keep current directory: This option runs the specified program from the
current directory--i.e., the directory is not changed to the one
containing the program. This should be activated when you want to run a
program from the directory that contains its work files.
________________________________________________________________________
Chapter 16: Menu and Command Reference 317
________________________________________________________________________
Some executables, like Lotus 1-2-3, require program files to be in the
same directory as the executable. For instance, if Lotus 1-2-3 is not in
the current directory, the directory must be changed to where the
program and its files are located. For this case, this option must not
be activated.
Note: Be careful when running memory-resident programs. If the
available memory after you run a memory-resident program is too small,
HyperPAD may not be able to reload.
-----------------------------------
EXIT
Accelerator Key: ALT+F, X
Keyboard Shortcut: CTRL+Q
User Level: All
Use Exit to quit HyperPAD. Exit is available in all pads. When you
select this menu command, HyperPAD saves the current pad and exits
immediately. If you use the keyboard shortcut (CTRL+Q), HyperPAD prompts
for confirmation to quit.
________________________________________________________________________
Chapter 16: Menu and Command Reference 318
________________________________________________________________________
THE EDIT MENU
Open the Edit menu to:
0 Switch between editing the page and the background
0 Toggle between the page and background
0 Create new pages using the existing background
0 Cut, copy, or paste text in a field, objects, and marked
blocks
0 Undo the most recent painting operation
-----------------------------------
UNDO
Accelerator Key: ALT+E, U
Keyboard Shortcut: CTRL+Z or CTRL+U
User Level: Painting
Use the Undo command to cancel the most recent painting change to a pad.
Note: Only painting modifications can be undone.
-----------------------------------
CUT (TEXT, BLOCK, BUTTON, FIELD)
Accelerator Key: ALT+E, T
Keyboard Shortcut: CTRL+X
User Level: Typing
The Cut command removes the selected text, objects, or marked block and
places it in the clipboard. You can retrieve the cut item using the
Paste command.
-----------------------------------
COPY (TEXT, BLOCK, BUTTON, FIELD)
Accelerator Key: ALT+E, C
Keyboard Shortcut: CTRL+C
User Level: Typing
This command copies text, objects, or a marked block to the clipboard,
depending on the current tool. The Copy command changes as you select
________________________________________________________________________
Chapter 16: Menu and Command Reference 319
________________________________________________________________________
different types of information. For example, when you highlight text in
fields, the command appears as Copy Text, and when you mark a block
using the Mark Block tool, the command appears as Copy Block.
Copy saves the selected information to an area in memory called the
clipboard. You can retrieve the clipboard's content with the Paste
command. Because the clipboard can only store one piece of information
at a time, its contents are overwritten each time you use the Copy or
Cut commands.
-----------------------------------
PASTE (TEXT, BLOCK, BUTTON, FIELD, PAGE)
Accelerator Key: ALT+E, P
Keyboard Shortcut: CTRL+V
User Level: Typing
Use the Paste command to retrieve the contents of the clipboard (placed
in the clipboard by the Cut or Copy command). The Paste command is only
available after something has been copied or cut. The name of the Paste
command changes depending on the item in the clipboard (i.e., Paste
Button, Paste Text, Paste Page).
Pasting is dependent on the tool in use. For example, to paste a button
or field, you must be using the Selector tool; to paste text, you must
be editing a field using the Browse tool; and to paste a paint block,
you must be using the Paint tool.
-----------------------------------
DELETE (TEXT, BLOCK, BUTTON, FIELD)
Accelerator Key: ALT+E, L
Keyboard Shortcut: none
User Level: Typing
Use the Delete command to remove an object, text, or a marked block from
the current page. When you use Delete, HyperPAD removes the selected
item from the pad. Delete does not store a copy in the clipboard.
________________________________________________________________________
Chapter 16: Menu and Command Reference 320
________________________________________________________________________
-----------------------------------
NEW PAGE
Accelerator Key: ALT+E, N
Keyboard Shortcut: F3
User Level: Typing
Use the New Page command to create a new, blank page immediately after
the current page. Once a page is created, it becomes the current page.
For database pads (like a phone/address database pad), creating a new
page is similar to adding a new record to the database.
-----------------------------------
CUT PAGE
Accelerator Key: ALT+E, G
Keyboard Shortcut: none
User Level: Typing
Use the Cut Page command to remove a page and its background from the
pad and copy it to the clipboard. Retrieve the page and background using
the Paste Page command.
-----------------------------------
COPY PAGE
Accelerator Key: ALT+E, O
Keyboard Shortcut: none
User Level: Painting
Use the Copy Page command to copy a page and its background to the
clipboard. Use the Paste Page command to paste the page and the
background.
When you paste a page, you will also paste the background if the
background doesn't exist in the pad.
________________________________________________________________________
Chapter 16: Menu and Command Reference 321
________________________________________________________________________
-----------------------------------
DELETE PAGE
Accelerator Key: ALT+E, D
Keyboard Shortcut: none
User Level: Typing
Use the Delete Page command to remove the current page from the pad.
When you delete a page, the next page in the pad becomes the current
page. HyperPAD prevents you from deleting the only page remaining in a
pad.
To prevent a page or background from being deleted, activate the No
delete option in either the Page or Background Info dialog box.
Note: Use the Delete command from the File menu to remove the entire
pad from your disk.
-----------------------------------
BACKGROUND
Accelerator Key: ALT+E, B
Keyboard Shortcut: None
User Level: Painting
Use the Background command to switch between editing the background and
the page. When editing the background, the following keys are available:
Keystroke: Result:
----------------------------------------------------------------
CTRL+SHIFT+PGUP Edit the previous background in the pad
CTRL+SHIFT+PGDN Edit the next background in the pad
________________________________________________________________________
Chapter 16: Menu and Command Reference 322
________________________________________________________________________
THE DATABASE MENU
Open the Database menu to:
0 Find information in a pad
0 Sort the pages in a pad
0 Create a subset of pages in a pad
-----------------------------------
FIND
Accelerator Key: ALT+D, F
Keyboard Shortcut: CTRL+F, CTRL+N, or ENTER = find next
User Level: All
Use the Find command to search the fields of the current pad for text.
When you select Find, the message box is displayed with the Find
command.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Type the text string that you want to locate, between the quotes, and
press ENTER. HyperPAD will search the pad, beginning with the fields on
the current page.
________________________________________________________________________
Chapter 16: Menu and Command Reference 323
________________________________________________________________________
If HyperPAD locates the text, the page the field is on becomes the
current page and the text is highlighted.
If HyperPAD locates the text within a locked field (one that cannot be
edited), the page the field is on becomes the current page.
If HyperPAD is unable to find the text anywhere in the pad, it will
sound two beeps. To find the next occurrence, press ENTER or CTRL+N (for
next). HyperPAD will locate the next occurrence after the one just
located.
If you want to locate only whole words, use BACKSPACE to delete the word
"part" so that the command reads like this:
find "<<text>>"
If you want to restrict the search to a particular field, use a command
that looks like this:
find part "<text>" in field "Last Name"
________________________________________________________________________
Chapter 16: Menu and Command Reference 324
________________________________________________________________________
-----------------------------------
SORT
Accelerator Key: ALT+D, S
Keyboard Shortcut: none
User Level: All
Use the Sort command to rearrange the page order in the current pad
based on an alphabetic, numeric, or date comparison. Specify a sort by
one, two, or three fields in ascending or descending order.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Sort by: This text box allows you to specify a field to use as the sort
key.
Background field: Lists the names or ID numbers of all the current
background fields.
Ascending: This option arranges the pages in ascending order (from low
to high).
Descending: This option arranges the pages in descending order, (high
to low) depending on the specified sort type.
Text: This option sorts the specified field alphabetically. The text
sort also treats numbers as characters; consequently, the number 1,000
appears before 20 because the first character of 1,000 (1) is lower than
the first character of 20 (2)
________________________________________________________________________
Chapter 16: Menu and Command Reference 325
________________________________________________________________________
Numeric: This option sorts fields by their numeric values.
DateTime: This option sorts fields containing dates. HyperPAD
recognizes common date formats. For example, HyperPAD converts March 5,
1973, 3/5/73, and 3-5-73 to the same expression before sorting.
European-style date formats (DD/MM/YY) are not supported directly by
HyperPAD but may be supported through a PADtalk script. (See the PADtalk
Reference Guide for more information.)
-----------------------------------
QUERY
Accelerator Key: ALT+D, Q
Keyboard Shortcut: none
User Level: All
Use the Query command to view a group of pages that match the criteria
you establish. The Query Criteria dialog box allows you to specify the
conditions the fields are checked against.
The Query Criteria dialog box is shown below:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 326
________________________________________________________________________
Background field: This column lists the fields on the current
background. If the field does not have a name, then its ID is used.
Operator: This column specifies the operator used to compare the field
content to the data you specify in the Value column. To change the
operator, TAB to this column and press SPACE.
Operators: Description:
----------------------------------------------------------------
contains TRUE if the value can be found within the field
is TRUE if the field is the same as the value
is not TRUE if the field and the value are different
is in TRUE if the value can be found within the field
< TRUE if the field is less than the value
<= TRUE if the field is less than or equal to the value
> TRUE if the field is greater than the value
>= TRUE if the field is greater than or equal to the value
You may specify a numeric quantity in the Value text box (such as 3500).
Text may also be specified in the Value text box (such as Jim, Hisur,
delicious). The text must be entered without quotes. Text comparison is
case-insensitive; thus, JOHN and john are equal.
________________________________________________________________________
Chapter 16: Menu and Command Reference 327
________________________________________________________________________
THE GO MENU
Open the Go menu to:
0 Open a pad
0 Return to a pad
0 Return to the last page viewed (even if the page is in a
different pad)
0 Navigate through the current pad
-----------------------------------
HELP
Accelerator Key: ALT+G, E
Keyboard Shortcut: F1
User Level: All
Use the Help command to access HyperPAD's on-line Help system. To access
Pad Help, press F1 once. If you want to open General Help, press F1
twice.
Note: In a pad you designed, pressing F1 will take you directly to
General Help.
-----------------------------------
HOME
Accelerator Key: ALT+G, H
Keyboard Shortcut: ALT+F5
User Level: All
Use the Home command to open the Home pad.
________________________________________________________________________
Chapter 16: Menu and Command Reference 328
________________________________________________________________________
-----------------------------------
BACK
Accelerator Key: ALT+G, B
Keyboard Shortcut: F5
User Level: All
Use the Back command to retrace the path of your current HyperPAD
session. HyperPAD keeps a record of the previous 100 pages opened and
the order in which you opened them. When you select this command,
HyperPAD returns you to the previously opened page. Even if you go to a
different pad, you can still use this command to backtrack through the
pages you viewed.
-----------------------------------
NEXT
Accelerator Key: ALT+G, N
Keyboard Shortcut: PGDN
User Level: All
Use the Next command to go to the following page in the current pad.
-----------------------------------
PREVIOUS
Accelerator Key: ALT+G, P
Keyboard Shortcut: PGUP
User Level: All
Use the Previous command to go to preceding page.
-----------------------------------
FIRST
Accelerator Key: ALT+G, F
Keyboard Shortcut: CTRL+PGUP
User Level: All
Use the First command to go to the first page in the current pad.
________________________________________________________________________
Chapter 16: Menu and Command Reference 329
________________________________________________________________________
-----------------------------------
LAST
Accelerator Key: ALT+G, L
Keyboard Shortcut: CTRL+PGDN
User Level: All
Use the Last command to go to the last page in the current pad.
THE TOOLS MENU
Open the Tools menu to select an authoring tool. HyperPAD's authoring
tools are used to:
0 Alter the design of a pad
0 Change the appearance of a page or background
0 Mark a section of a page or background for modification
0 Select buttons and fields
0 Browse
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 330
________________________________________________________________________
-----------------------------------
TEXT
Accelerator Key: ALT+T, T
Keyboard Shortcut: CTRL+T
User Level: Painting
Use the Text tool to add text to the paint layer of a page or
background. Any text you add to a background appears on every page
sharing that background. You cannot use the Text tool to enter text into
a field or to change scripts.
-----------------------------------
PAINT
Accelerator Key: ALT+T, P
Keyboard Shortcut: CTRL+P
User Level: Painting
Use the Paint tool to add color to your pads. The Paint tool operates on
the page or background and has no effect on buttons or fields. Use the
Paint Attr command on the Workspace menu to select different attributes.
(See the "Workspace Menu" section of this guide for information about
the Paint Attr command.)
-----------------------------------
ERASE
Accelerator Key: ALT+T, E
Keyboard Shortcut: CTRL+E
User Level: Painting
Use Erase to delete text, ASCII characters, or paint from the current
page or background. To erase, move the cursor to your starting point,
hold down SHIFT, and then use the arrow keys to erase.
________________________________________________________________________
Chapter 16: Menu and Command Reference 331
________________________________________________________________________
-----------------------------------
LINE
Accelerator Key: ALT+T, L
Keyboard Shortcut: CTRL+L
User Level: Painting
Use the Line tool to draw single or double lines on a page or
background. To specify the type of line, use the Line type command on
the Workspace menu.
-----------------------------------
MARK BLOCK
Accelerator Key: ALT+T, M
Keyboard Shortcut: CTRL
User Level: Painting
Use the Mark Block tool to select an area of a page or background
(excluding buttons and fields) and then edit it with the Block commands.
Each option is explained in the "Block Menu" section of this chapter.
-----------------------------------
CHAR PAINT
Accelerator Key: ALT+T, H
Keyboard Shortcut: CTRL+H
User Level: Painting
Use the Char Paint tool to paint the current ASCII character (selected
from the Set Paint Character dialog box), which is specified to the
right of the ASCII Char command on the Workspace menu.
________________________________________________________________________
Chapter 16: Menu and Command Reference 332
________________________________________________________________________
-----------------------------------
SELECTOR
Accelerator Key: ALT+T, S
Keyboard Shortcut: CTRL+S
User Level: Painting
The Selector tool allows you to select buttons and fields for
modification. Use the Cut, Copy, Delete, and Paste commands from the
Edit menu, and Button Info and Field Info from the Objects menu, to
modify a selected button or field. With the Selector tool you can also
change a button or field's size and position.
-----------------------------------
BROWSE
Accelerator Key: ALT+T, B
Keyboard Shortcut: CTRL+B
User Level: Painting
Use the Browse tool to select buttons, view information in fields, or
enter text into fields. HyperPAD automatically chooses the Browse tool
when the user level is set to browsing or typing.
________________________________________________________________________
Chapter 16: Menu and Command Reference 333
________________________________________________________________________
THE OBJECTS MENU
The Objects menu commands allow you to create new objects (pads, pages,
backgrounds, buttons, and fields), and edit object properties.
Open the Objects menu to:
0 Add new buttons and fields to a page or background
0 Create new backgrounds
0 Alter or set object properties
0 Access object information
0 View object scripts
0 Duplicate a field or button
0 Change the order of layering of fields and buttons
The Objects menu is available at the authoring and scripting levels.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 334
________________________________________________________________________
-----------------------------------
NEW BUTTON
Accelerator Key: ALT+O, B
Keyboard Shortcut: ALT+F3
User Level: Authoring
Use the New Button command to create a button associated with a page or
background. A button on a page is exclusive to that page; it is not
shared among pages. A button added to a background appears on all the
pages that share that background.
-----------------------------------
NEW FIELD
Accelerator Key: ALT+O, F
Keyboard Shortcut: CTRL+F3
User Level: Authoring
Use the New Field command to create a field on the current page or
background. A field on the page is unique to that page, while fields
created on the background appear on all pages that share that
background.
-----------------------------------
NEW BKGND
Accelerator Key: ALT+O, G
Keyboard Shortcut: SHIFT+F3
User Level: Authoring
Use the New Background command to create a new blank page and
background. HyperPAD inserts the blank page immediately after the
current page. The new background remains active until you select the
Background command from the Edit menu and return to viewing both the
page and background.
-----------------------------------
BUTTON INFO
Accelerator Key: ALT+O, U
Keyboard Shortcut: ENTER (when the button is selected)
User Level: Authoring
________________________________________________________________________
Chapter 16: Menu and Command Reference 335
________________________________________________________________________
Use the Button Info command to:
0 View the button ID and button object number relative to the
other buttons on the page.
0 Modify button properties and attributes.
0 Link the current page to a page in the current pad or in a
different pad.
0 Write or edit a button's script.
The Button Info command is only active when a button is selected with
the Selector tool. To use this command, select either the Button Info
command from the Objects menu or double-click on the selected button.
Button Name: Assign the button's name.
Accelerator Key: Assigns the character within the button's name used to
activate a button from the keyboard (by pressing ALT).
Accelerator Color: Choose the color in which the accelerator key
character appears when the user presses ALT.
Show name: Displays the button name (on by default).
With edge: Displays the button border (on by default).
Hilite if focus: Changes the button's color to the highlight color when
the button receives the focus. This is used in combination with the Auto
Hilite option.
Auto hilite: Changes the button's color to its highlight color when the
button receives the focus (on by default).
Shadow: Places a black shadow at the right and bottom edges of the
button. If the button is placed on a black area, its shadow will not be
visible.
Opaque: Makes a button non transparent. The button completely hides the
characters under it (selected by default).
Transparent: Makes the empty areas within the button see-through.
Characters underneath the button can be seen when you select this
option.
Check Box: Places a check box [ ] to the left of the button's name. The
check box attribute is useful to the pad designer for setting the state
of a control option.
________________________________________________________________________
Chapter 16: Menu and Command Reference 336
________________________________________________________________________
<Border Color...>: Determines the color of the button boundary when the
With edge attribute is selected.
<Fill Color...>: Determines the color of the button interior.
<Hilite Color...>: Determines the color of the button when the button
receives the focus.
Whenever one of the options listed above is selected, a color selection
dialog box appears.
You select an attribute from this dialog box with the arrow keys. Move
the cursor box to enclose the desired color combination and press ENTER.
If you are using a mouse, move the mouse pointer to the desired color
combination and click the left mouse button. Press ESC to leave the
dialog box without making a selection.
<Edge Type...>: Controls the border style when the With edge attribute
is selected.
<Script...>: Select this button to access the button's script.
<Link To...>: Allows you to create a one-way connection to another page
in the current pad or in another pad.
To use the Link To command:
1. Select <Link To...> in the Button Info dialog box, then go to the
target page or pad.
2. When you reach your destination, select <<This Page>> or <This Pad>
from the Link To dialog box as your target for the source button.
-----------------------------------
FIELD INFO
Accelerator Key: ALT+O, I
Keyboard Shortcut: ENTER
User Level: Authoring
Use the Field Info command to verify and change a field's attributes
and, access the field's script. The Field Info command is only active
when a field is selected.
________________________________________________________________________
Chapter 16: Menu and Command Reference 337
________________________________________________________________________
When you select the Field Info command, the Field Info dialog box
appears.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Show name: Displays the field name.
With edge: Displays the field border using the current Border Color and
Edge Type (set by default).
Highlight if focus: Changes the field's color to the highlight color
when the field receives the focus.
Scrollable: Changes the field from fixed text to scrollable text. Use
this option when the amount of text in the field is greater than can be
displayed at one time (set by default).
Lock Text: Creates read-only fields to prevent users from overwriting
or deleting field contents or properties. A locked-text field cannot be
scrolled.
Opaque: Makes the field non transparent. The field will completely hide
any characters underneath it (set by default).
Transparent: Makes empty areas in the field see-through, so characters
located under the field can be seen.
________________________________________________________________________
Chapter 16: Menu and Command Reference 338
________________________________________________________________________
Scrolling: Makes the field opaque and creates a scroll bar on its right
edge. This allows you to scroll through text in the field. You must have
a mouse to use the scroll bar.
Left: Left-justifies text (flush left) (set by default).
Right: Right-justifies text (flush right).
Center: Centers each line of text in the field.
Left (Name pos): Places the field name to the left of the field
(selected by default). This decreases the width of the field by the
number of characters in the field's name plus two characters.
Top (Name pos): Places the field name directly above the field,
decreasing the field height by one line.
<Border Color...>: Determines the color of the field boundary when the
With edge attribute is selected.
<Fill Color...>: Determines the color of the field interior.
<Hilite Color...>: Determines the color of the field interior when the
field has the focus.
<Edge Type...>: Determines the border style when the With edge
attribute is selected.
<Name Color...>: Determines the color of the field name.
<Script...>: Select this button to access the field's script.
-----------------------------------
PAGE INFO
Accelerator Key: ALT+O, P
Keyboard Shortcut: F6 (when the Selector tool is active)
User Level: Authoring
Use Page Info to create, change, or verify a page name, protect the
current page from being deleted, and access the page's script. You can
also check the page ID, the hierarchical position of the page relative
to other pages in the pad, and the number of fields and buttons on the
page.
________________________________________________________________________
Chapter 16: Menu and Command Reference 339
________________________________________________________________________
When you select the Page Info command, the Page Info Dialog box appears
with the following items:
Page Name: Assigns or changes the page name.
<Script... >: Writes or edits the page script.
No Delete: Prevents the page from being deleted. Attempts to delete the
page will result in an error message.
-----------------------------------
BKGND INFO
Accelerator Key: ALT+O, K
Keyboard Shortcut: F7 (when the Selector tool is active)
User Level: Authoring
Use the Bkgnd Info command to name a background or edit its script. You
can also use Bkgnd Info to check the background ID, find out how many
pages in the pad use the background, and determine how many buttons and
fields are associated with it.
When you select the Bkgnd Info command, the Bkgnd Info dialog box opens,
presenting the following items:
Background Name: Enter, verify, or change a background name
No Delete: Prohibits a background from being deleted.
<Script>: Edit the background's script (active only at the Scripting
level).
-----------------------------------
PAD INFO
Accelerator Key: ALT+O, D
Keyboard Shortcut: F8 (when the selector tool is active)
User Level: Authoring
The Pad Info command allows you to access information about the current
pad. When this command is selected, the Pad Info dialog box appears.
Here, you can change or retrieve the pad's name and its script. The
dialog box also tells you how many backgrounds and pages this pad
contains as well as the amount of disk space it uses.
Pad Name: Change or verify the pad name.
<Script...>: Accesses the pad's script (scripting level only).
________________________________________________________________________
Chapter 16: Menu and Command Reference 340
________________________________________________________________________
-----------------------------------
CLONE
Accelerator Key: ALT+O, C
Keyboard Shortcut: CTRL+D
User Level: Authoring
Select a button or field with the Selector tool, then use the Clone
command to create a duplicate of the object on the original page or
background. The cloned object contains the same attributes, properties,
and script as the original object.
-----------------------------------
BRING CLOSER
Accelerator Key: ALT+O, R
Keyboard Shortcut: PLUS (numeric keypad)
User Level: Authoring
Use the Bring Closer command and the Selector tool to change the order
of objects layered on a page or background. Each time you create an
object, the object is placed on its own transparent layer. If you want
an object to move closer to the top, select it with the Selector tool
and choose the Bring Closer command.
-----------------------------------
SEND FARTHER
Accelerator Key: ALT+O, S
Keyboard Shortcut: MINUS (numeric keypad)
User Level: Authoring
Use the Send Farther command with the Selector tool to change the
position of an object's layer on a page or background. Each time you
create a new object, it hides any other objects occupying the same
location. If you select an object and use the Send Farther command, the
selected object moves farther back in the object hierarchy and reveals
the object beneath it.
________________________________________________________________________
Chapter 16: Menu and Command Reference 341
________________________________________________________________________
THE WORKSPACE MENU
Open the Workspace menu to:
0 Display and hide the menu and status bars
0 Change the current paint attribute
0 Assign function keys for colors and edge types
0 Open and close the message box
The Workspace menu commands vary, depending on the current user level.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
________________________________________________________________________
Chapter 16: Menu and Command Reference 342
________________________________________________________________________
-----------------------------------
PAINT ATTR
Accelerator Key: ALT+W, P
Keyboard Shortcut: - (numeric keypad)
User Level: Painting
Use the Paint Attr command to select attributes to use with the painting
tools. When you select Paint Attr, the following dialog box is placed on
screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Accelerator Keys: Accelerator keys allow you to switch between
attributes without accessing the Paint Attr palette. To assign a paint
attribute to an accelerator key, move the cursor to the desired color,
hold down ALT and press a number (0-9) from the main keyboard (i.e., do
not use the numeric keypad).
________________________________________________________________________
Chapter 16: Menu and Command Reference 343
________________________________________________________________________
-----------------------------------
ASCII CHAR
Accelerator Key: ALT+W, A
Keyboard Shortcut: PLUS (numeric keypad)
User Level: Painting
Use the ASCII char command to select extended ASCII characters for use
with the Char Paint tool, Workspace options, and Fill Block command (See
the "Block Menu" section).
-----------------------------------
LINE TYPE
Accelerator Key: ALT+W, L
Keyboard Shortcut: CTRL+=, CTRL+- (not on the numeric keypad)
User Level: Painting (when Mark Block is active)
Use the Line type command to switch between single- and double-width
lines.
-----------------------------------
OPTIONS
Accelerator Key: ALT+W, O
Keyboard Shortcut: none
User Level: Painting
Use the Options command to:
0 Attach the current paint attribute to the painting tools
0 Set automatic indenting
0 Automatically switch between the Selector tool and the
previous painting tool
0 Toggle between Insert mode and overtype mode
0 Push or not push characters off the page
________________________________________________________________________
Chapter 16: Menu and Command Reference 344
________________________________________________________________________
When you select the Options command, the dialog box, shown here, appears
on screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Use painting tools with current attribute: This option causes all the
painting tools to apply the current paint attribute.
Automatic Indenting: When Automatic Indenting is selected and the ENTER
key is pressed, the cursor moves directly below the leftmost character
on the previous line. This is helpful when you are using the Text tool.
Use extended ASCII characters as end of line: This option causes the
extended ASCII characters to act as the right margin of a typing area
when using the Text tool. If existing text is pushed across the page or
background, the text will be lost when it reaches the extended ASCII
character.
Automatic tool switching: This option allows you to alternate between
the Selector tool and the most recently applied painting tool. If
Automatic tool switching is on and you select a button or field, the
Selector tool is activated. If you click anywhere else on the page, the
most recent painting tool selected becomes active. (This option can only
be used with the mouse.)
Insert mode (push characters right): Use Insert mode to insert text
without overtyping. If you type to the left of existing text, that text
________________________________________________________________________
Chapter 16: Menu and Command Reference 345
________________________________________________________________________
will be pushed to the right. Use the INS key as a keyboard shortcut for
the Insert mode option.
Push characters off edge of page: If this option is selected, and you
are in Insert mode, text that is pushed beyond the right margin will be
lost. If this option is inactive, HyperPAD will beep when the right
margin is reached, and no more text will be inserted on that line.
-----------------------------------
MESSAGE BOX
Accelerator Key: ALT+W, M
Keyboard Shortcut: F4
User Level: All
The message box allows you to communicate directly with HyperPAD, by
executing a command immediately or retrieving information about the
current pad.
-----------------------------------
TOOL BOX (MOUSE ONLY)
Accelerator Key: ALT+W, T
Keyboard Shortcut: none
User Level: Painting
The tool box is a popup window, for mouse users, that contains
HyperPAD's authoring tools. The tool box remains on-screen and can be
moved as you work without affecting any of the elements contained on the
page or background.
-----------------------------------
STATUS BAR
Accelerator Key: ALT+W, S
Keyboard Shortcut: ALT+SPACE (if the status bar is active)
User Level: Painting
Use the status bar command to toggle the status bar. The status bar,
located at the bottom of the screen, displays the current pad name, page
number, layer (page or background), tool, cursor position, and the
status of the Number Lock and Caps Lock keys.
Note: The menu bar must be active for the status bar to be displayed.
________________________________________________________________________
Chapter 16: Menu and Command Reference 346
________________________________________________________________________
-----------------------------------
MENU BAR
Accelerator Key: ALT+W, E
Keyboard Shortcut: ALT+SPACE
User Level: All
The menu bar, at the top of the page, displays the menus available at
the current user level.
THE BLOCK MENU
Open the Block menu to:
0 Manipulate a marked block
0 Select a box style
0 Turn a marked block into a button
The Block menu appears only when the Mark Block tool is active (see the
"Tools menu" section). Once a block is marked, you can use the Block
menu commands to modify the marked block.
-----------------------------------
ERASE BLOCK
Accelerator Key: ALT+B, E
Keyboard Shortcut: E (with a marked block)
User Level: Painting
Use the Erase Block command on a page or background to delete all paint
and characters from a marked block.
-----------------------------------
BOX BLOCK
Accelerator Key: ALT+B, B
Keyboard Shortcut: B (with a marked block)
User Level: Painting
Use the Box Block command to place a rectangular border around the area
selected with the Mark Block tool. The type of border is determined with
the Box Style command, described below.
________________________________________________________________________
Chapter 16: Menu and Command Reference 347
________________________________________________________________________
-----------------------------------
PAINT BLOCK
Accelerator Key: ALT+B, P
Keyboard Shortcut: P (with a marked block)
User Level: Painting
Use Paint Block to color a marked block with the current paint
attribute. If you want to change the current paint attribute, select
Paint Attr from the Workspace menu before using a painting command.
-----------------------------------
OPAQUE BLOCK
Accelerator Key: ALT+B, O
Keyboard Shortcut: O (with a marked block)
User Level: Painting
Use the Opaque Block command to make the marked block non transparent.
Opaque Block is the opposite of Clear Block. If you move an opaque block
over a painted area, all elements under the opaque block are hidden from
view.
-----------------------------------
CLEAR BLOCK
Accelerator Key: ALT+B, C
Keyboard Shortcut: C (with a marked block)
User Level: Painting
Use the Clear Block command to make all of the empty space in a marked
block transparent.
-----------------------------------
FILL BLOCK
Accelerator Key: ALT+B, F
Keyboard Shortcut: F (with a marked block)
User Level: Painting
Use the Fill Block command to paint the selected area with the current
extended ASCII character, which is specified next to the ASCII char
command on the Workspace menu.
________________________________________________________________________
Chapter 16: Menu and Command Reference 348
________________________________________________________________________
Note: You can combine the Fill Block command with the Paint Block
command to fill a block with the current ASCII character and paint it at
the same time. When your block has been selected, press F to fill it and
P to paint it.
-----------------------------------
TRIM BLOCK
Accelerator Key: ALT+B, T
Keyboard Shortcut: T (with a marked block)
User Level: Painting
Use the Trim Block command to decrease a selected area such that all the
transparent space is excluded from the selection. The Trim Block command
does not physically change the attribute or the content of the marked
block; it simply allows you to be more precise in selecting an area.
---------------