home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
DATABASE
/
DBT123S.ZIP
/
DBTQREF.DOC
< prev
next >
Wrap
Text File
|
1990-08-10
|
15KB
|
326 lines
dBTools dBASE Enhancement Tools Quick Reference Guide
Version 2.0 08/07/1990
(c) 1990 BERNATH COMPUTER
To load dBTools: LOAD DBTWORK
mADDR=SPACE(14)
CALL DBTWORK WITH mADDR
LOAD DBTOOLS
CALL DBTOOLS WITH "0,"+mADDR
To call a dBTools function:
CALL DBTOOLS WITH "function name or number,parameter string"
You can use either the function name or number. Only the 1st
4 characters of the function name are significant, and can be
in upper or lower case. Using the function number runs
slightly faster.
Color pairs (FG/BG) can be specified using the standard DOS
color numbers 0-15 or with the dBASE color format (eg, +W/N,
etc.) and are also case insensitive. Using the DOS color
numbers is slighty faster.
Func Name Syntax
---- --------- ----------------------------------------------
1 ATSAY fast screen write
"atsay,<S>,row,col,FG,BG,page,text"
optional S parameter gives a small shadow
2 SOUNDEFF sound effects
"effects" or "2,0" bronx cheer (formerly 'BLAT')
"2,1" or "18" 3 note 'TWIDDLE'
"2,2" sounds an alarm until a key is pressed
"2,3" 'CHIRP' sounds like a bird chirp
"2,4" 'BLIP', a short, high pitched beep
3 BOX draw a framed box
"box,ULR,ULC,LRR,LRC,FG,BG,frame,page,shadow"
Frame: 0 - no frame
1 - single line
2 - double line
3 - single on horz, double on vert
4 - double on horz, single on vert
5 - thick line frame
Shadow = 1 to activate, 0 for no shadow
4 CURSOR cursor attributes
"cursor,off/on,normal/fat"
0 to turn off cursor or set to normal
1 to turn on cursor or set to fat
5 ERASE erase text
"erase,ULR,ULC,LRR,LRC,<BG>"
optional BG to erase to a color. If not specified,
blanks text but leaves colors intact.
6 DELAY wait for a specified time
"delay,delaytime"
7 DITHER dithered background
"dither,chartype,FG/BG,page"
Chartype: 0 - <solid BG color>
1 - ░
2 - ▒
3 - ▓
4 - <solid FG color>
8 FADE slideshow fades
"fade,fadetype,mode/color,delay,slot"
Fadetype: 0 - instant
1 - vertical alternate fingers wipe
2 - vertical scroll, top to bottom
3 - vertical scroll, bottom to top
4 - horizontal wipe, left to right
5 - horizontal wipe, right to left
6 - horizontal alternate fingers wipe
7 - sparkle fade
Mode/color should be 0 if fading in a screen image,
or specify a color if fading to a blank screen.
Delay time is somewhat dependent on processor speed and
so might vary with processor type.
If Mode/color is 0, you MUST specify a slot number.
9 HMENU horizontal moving bar menu
"hmenu,<Y>,choice,row,col,LowFG,LowBG,HighFG,HighBG,
item1,item2,...,@"
mPARM = "9,Y,"+STR(choice,2)+",24,25,15,0,0,7,Add,Change,Quit,@"
CALL DBTOOLS WITH mPARM
choice = VAL(mPARM)
IF choice = 99 && Fkey was pressed
mKEY = ASC(SUBSTR(mPARM,4,1))-1 && Extract 1st scancode
mSCAN = ASC(SUBSTR(mPARM,5,1))-1 && Extract 2nd scancode
choice = ASC(SUBSTR(mPARM),6,1)) && Extract highlighted opt
ENDIF
10 PAUSE "press any key to continue...", or alternate message
"pause,<Y>,row,col,FG,BG,<alternate message>"
mPARM = "10,Y,5,15,11,1,F1 Recall F2 Add new F3 Blank"
CALL DBTOOLS WITH mPARM
mKEY=ASC(mPARM)-1 && Extract 1st scancode
mSCAN = ASC(SUBSTR(mPARM,2,1))-1 && Extract 2nd scancode
11 PRINTER printer driver
"printer,0,0,filespec"
"11,0,1, "
"11,seqcode"
You must first load the definition file with
CALL DBTOOLS WITH "11,0,0,filespec".
Example printer codes:
1 Initialize printer
2 Set to 10 CPI
3 Set to 12 CPI
4 Compressed print ON
5 Compressed print OFF
6 Double wide ON
7 Double wide OFF
8 Bold ON
9 Bold OFF
10 Italic ON
11 Italic OFF
12 Underline ON
13 Underline OFF
14 Superscript ON
15 Superscript OFF
16 Subscript ON
17 Subscript OFF
18 NLQ ON
19 NLQ OFF
20 Set to 6 LPI
21 Set to 8 LPI
22 Set to 4 LPI
23 Set left margin
To get printer info:
mPARM = "11,0,1,"+SPACE(31)
CALL DBTOOLS WITH mPARM
mNUMESC = ASC(SUBSTR(mPARM,1,1)) && # of defined esc seq's
mPRTYPE = ASC(SUBSTR(mPARM,2,1)) && printer type
&& 0 = nonprogrammable
&& 1 = 80 col dot matrix
&& 2 = 132 col dot matrix
&& 3 = laser/inkjet
mPRNAME = SUBSTR(mPARM,3,36) && printer name
12 READSCR read screen image from a file into memory
"readscr,slot,filespec"
Legal slotnumbers 1-4.
Filespec is a 4000 byte screen image.
13 RECOLOR recolor an area
"recolor,ULR,ULC,LRR,LRC,FG/BG"
14 RESTSCR restore a screen image from memory to the screen
"restscr,slotnumber,page"
Legal slotnumbers 1-4.
15 SAVESCR save current screen into memory
"savescr,slotnumber"
Legal slotnumbers 1-4.
16 SCROLL scroll an area
"scroll,ULR,ULC,LRR,LRC,FG,BG,numlines,direction"
Direction = 1, up = 2, down
17 PLAY play notes on the speaker
"play,frequency,duration"
Frequency range 50 to 17000 cps
Duration is in clock tics (1/18th second)
18 TWIDDLE three note twiddle
"twiddle" or "2,1"
19 UNPOP restore area under a popup window
"unpop,windownumber" Legal windownumer 1-24
20 VMENU vertical moving bar menu
Non-popup:
"vmenu,<Y>,choice,0,ULR,ULC,LRR,LRC,LowFG/LowBG,frame,
shadow,HighFG/HighBG,Jus,item1,item2,...,@"
Frame and shadow same as BOX, function 3.
Jus = 1, text left justified
Jus = 2, text centered
Popup:
(set up a Window first with function 21)
"vmenu,<Y>,choice,windownumber,HighFG/HighBG,Jus,
item1,item2,...,@"
(use UNPOP function 19 to restore window)
CALL DBTOOLS WITH mPARM
choice = VAL(mPARM)
IF choice = 99 && Fkey was pressed
mKEY = ASC(SUBSTR(mPARM,4))-1 && Extract 1st scancode
mSCAN = ASC(SUBSTR(mPARM,5,1))-1 && Extract 2nd0 scancode
choice = ASC(SUBSTR(mPARM,6,1)) && Extract highlighted opt
ENDIF
21 WINDOW popup window
"window,windownumber,ULR,ULC,LRR,LRC,FG/BG,
frame,shadow"
Legal windownumbers 1-24.
Frame and shadow same as BOX, function 3.
22 PAGE Change active video page. Legal page = 0-3.
"page,pagenum"
23 NOBLINK Enable/disable blinking
"noblink,blinkattr"
blinkattr=0 disable blinking, enable hi intensity BG
blinkattr=1 enable blinking, disable hi intensity BG
24 PALETTE Set EGA palette colors (EGA/VGA only)
"egapal,0" reset to standard default palette
"egapal,1,RR/VV,RR/VV,RR/VV,...." one to all 16 registers
where RR is one of the 16 EGA color registers 0-15
and VV is one of the possible 64 color values 0-63
25 GETKEY Trap keystrokes and return unambiguous codes
"getkey,0" without echo
"getkey,1" with echo
mPARM="25,0"
CALL DBTOOLS WITH mPARM
mKEY=ASC(mPARM)-1
mSCAN=ASC(SUBSTR(mPARM,2,1))-1
26 DIALOG "dialog,0,0" clear all dialog buttons
BUTTONS "dialog,0,X" clear dialog button X (1-24)
"dialog,1,row,col,length,lowFG/lowBG,hiFG/hiBG,shadow,
prompt text"
Define dialog button. Starting at row,col the prompt
text is displayed in color lowFG/lowBG. If length is
specified, text is centered in a 'box' of length. If
shadow=1, a small shadow (like ATSAY's) is drawn.
mPARM="26,2,0" activate all dialog buttons
mPARM="26,2,X,Y,Z,..." activate specific dialog buttons
CALL DBTOOLS WITH mPARM
mCHOICE = VAL(mPARM)
When dialog buttons are activated, a moving bar high-
light (which is color hiFG,hiBG for each button) is
displayed, which is moved with the arrow keys. Pressing
ENTER will cause the value associated with the high-
lighted button to be returned (ESC returns 0). The
initial highlighted button will be the one with the
lowest number if you use "26,2,0", or the first button
in the list if you use "26,2,X,Y,Z,...".
Alternatively, clicking the left mouse button on a
dialog button returns its value, or clicking the right
button acts like ESC.
27 MOUSE "mouse,0,0" turn mouse cursor off (deactivate mouse)
CONTROL "mouse,0,1" turn mouse cursor on (activate mouse)
"mouse,1,ULR,ULC,LRR,LRC" set mouse boundaries
mPARM="27,2 " total length of 7 bytes
CALL DBTOOLS WITH mPARM return mouse status
row=VAL(LEFT(mPARM,2))
col=VAL(SUBSTR(mPARM,3,2))
left button= SUBSTR(mPARM,5,1)) 1 is ON, 0 is OFF
middle button= SUBSTR(mPARM,6,1))
right button= SUBSTR(mPARM,7,1))
28 ENCRYPT String encryption (for passwords, etc). Encrypt or
decrypt a string of up to 128 bytes.
"encrypt,1,<string to encrypt>"
"encrypt,2,<string to decrypt>"
Must use a memvar to pass parameters. String is
returned in the memvar.
29 SCHEME Color schemes, a la FoxPro.
"scheme,1,schemeno,FG/BG,FG/BG,...." define a color scheme
"scheme,2,schemeno" set current dBASE colors to scheme
"29,3" save current dBASE colors
A color scheme consists of 10 color pairs which
define colors of various items:
1) Standard @SAY color
2) GET highlight color
3) Window frame
4) Window text
5) Menu active item (unselected)
6) Menu selected item (highlighted)
7) Menu inactive item
8) Menu hotkey highlight
9) Message color
10) Title color
There is space to store 12 color schemes.
30 MOVEWIND Move a window
31 COPYWIND Copy a window
32 SETCOL Set Columns