Legend: Bn, Tn, Cn, Dn, Hn, Gn, Sn, Fn, In, Mn, Pn : obect letter in parens (T)n
where T=text, C=comb D=data, H=tree, G=grid, S=string, F=filespec, I=image, M=variable, P=picture; are object designations
where "n" is an object occurrence number. Multiple functions and commands may be in a command string separated by "|"
examples: db3make=comb1; | textin=2;open | textqry=2;grid1; | treein=1;diagrams\Orgchart2.tre
Note: Mem0 is a universal donor/recipient variable in many functions. Data from objects and functions is often loaded into Mem0 when change occurs. There 20 other variables Mem1 through Mem20 that are only changed by users in a process. More information about variables is found in the Addendum section.
Function | Syntax | Description |
addfield= | addfield= | opens dialogue to add a column to the default table |
about= | about= | display information about runtime |
append= | append=S1/(T)1;S2/(T)2 | append the file named in string 2 or text object T2 to the file named in string 1 or text object T1 |
archive= | archive= | toggle set TCB to no data loss |
banon= | banon=L1;[S1,clip,open,F1] | Turns a label object into a scrolling banner. Example: banon=1;msgdmp.txt |
banoff= | banoff= | Turns off and restores label object |
borderfix= | borderfix=, borderset= | toggle window sizable |
browser= | browser=Sf/mem0f | load and display a file(HTML PDF DOC TXT) in the internal document browser |
butnoff= | butnoff=(B)n; | sets the specified button invisible |
butnon= | butnon=(B)n; | sets the specified button visible |
butnpop= | butnpop=(B)n; | toggles visibility of the specified button |
caption= | caption=| | Sets window caption sets move - caption=| sets no move |
checkmake= | checkmake=OptionSpec| | Make CheckBox using OptionSpec |
checkval= | checkval=Cn;Cmd | if CheckBox = 1 execute Cmd |
clip2file= | clip2file= | copies clipboard graphic to a file |
clip2pic= | clip2pic=Pn | copies clipboard graphic to a picture box |
clip2text= | clip2text=T1 | copies clipboard text to a text box |
clipfrtext= | clipfrtext=T1 | copies text box to the clipboard |
clipform= | clipform= | copies form image to clipboard |
cmd= | cmd=F1/S1|F2/S2|F3/S3|...|; | load and run from file or run library command(s) Sn |
cmdspec= | cmdspec=NAME|commandstring|...; | load library command string accessed by cmd=NAME| |
colors= | colors= | display system colors dialogue |
combclr= | combclr=(C)n; | clears the selected drop-down object |
combin= | combin=(C)n;S1/open | fill combo object from file, "open" use file dialogue, (C) means the object type name isn't used |
comboff= | comboff=(C)n; | sets the specified dropdown object invisible |
combon= | combon=(C)n; | sets the specified dropdown object visible |
combpop= | combpop=(C)n; | toggles visibility of the specified dropdown object |
compute= | compute=S1;S2 | computes expression and stuffs result in mem0. S2 is optional format string |
copy= | copy=S1/(T)1;S2/(T)2 | copy file named in string 2 or text object T2 to file named in string 1 or text object T1 |
cpyrit= | cpyrit= | sets program copyright notice |
csvexport= | csvexport= S1|Q1| | opens dialogue to export data from query to a .csv file |
csvimport= | csvimport=/FONT> | opens dialogue to get file contents into the default table |
ctrlbox= | ctrlbox= | display prototype control box |
date+= | dates+=S1[;S2] | returns yyyy-mm-dd from todays date + S1 or optional date in S2 (mem22) Ex: date+=14;2015-09-02 returns 2015-09-16 in mem22 |
datctrl= | datctrl=n;[first|prior|next|last| save|add|delete|dbfind| |
defines a TCB data control function addendum at the end explains more |
datespec= | datespec=BackColor;ForeColor; FontName;FontSize;FontBold |
defines a datetime popup attributes |
datetime= | datetime=Tn/Ln;date/time;format(n) | puts the date or time in 1 of many formats into a text box. An addendum at the end explains DateTime |
dateon= | dateon= | turns on autodate/time at top right of process screen, font color is process window font color |
db2comb= | db2comb= | loads the default dataset spec into the default drop-down object |
db2tree= | db2tree= | loads the default dataset spec into the default data tree object |
db3file= | db3file=S1|(C)n | set default dataset file spec from text of drop-down box |
db3make= | db3make=[(C)n;] | opens afile dialogue to create a new dataset file and optionally the file spec to a drop-down box |
dbload= | dbload= | loads the default dataset |
delobj= | delobj=On;[butn| pict| list| text| tdat| comb| grid| chec| optn| slid| tree| labl| imag| webo] | deletes object from process (pictures just hidden). Example: delobj=1;webo| |
delwork= | delwork= | toggle - set TCB to delete db work files after use |
diag= | diag=S1 | this is a set of system dialog functions |
droptable= | droptable= | opens dialogue to delete the default table from the default dataset |
execqry= | execqry=Tn/F1/S1 | executes a query from data in a text box or from a file from inline text. Leaves the query results in a file named "xqlrun.txt". It is a temp file and should be used immediately. |
exqry= | exqry=(T)1;(T)2; | executes a query in text object 1 and puts the results in text object 2 |
filerun= | filerun=S1 | runs the contents of the specified file as a set of TCB commandstrings. |
fonts= | fonts= | displays a font dialogue box |
foreach= | foreach=[F1|S1|T1];commandstring|.. | takes list of values store each in mem22 and executes each value with commandstring uses delim from ",;|/\: " |
funckey= | funckey=fn;command string | sets command strings for Windows function keys |
getlist= | getlist=instance;[T1|C1|M1|S1] | puts instance of the list in text, combo or mem0-22 in mem0 delimiter in list can be CR/LF or any of ",;!^&%*$#|-+:/\". Use: getlist=2;comb1|textclr=17|textin=17;mem0| |
getsetlist= | getsetlist=(C)1 | puts a list of tables from a recordsets repository to create a process for into a drop-down object |
getspec= | getspec=On;[butn|pict|list|text|tdat| comb|grid|chec|optn|slid|tree|labl|imag] |
fills mem0 with the current specification for Object n |
grid2clip= | grid2clip=Gn | fill clipboard with data grid data |
grid2cmb= | grid2cmb=Gn;Cn| | fill combo box with data grid data |
grid2mult= | grid2mult=delim| | grid row to delimited string. Use: selgrid=1|grid2mult=$|textin=1;mem0| conversions @ -> | $ -> , |
grid2text= | grid2text=Gn;Tn; | fill text box with data grid data |
gridedit= | gridedit=Gn | toggle data grid editing |
gridfill= | gridfill=G1 | load data grid from resultsout |
gridfromfile= | gridfromfile=Gn;F1 | load data grid from file |
gridfrtable= | gridfrtable=G1 | load data grid from resultsout |
gridin= | gridin=(G)n;S1/open | load data grid from filespec in string 1 or open file dialogue |
gridmake=, gridspec= | gridmake=GS | make data grid from gridspec |
gridoff= | gridoff=(G)n; | sets the specified data grid invisible |
gridon= | gridon=(G)n; | sets the specified data grid visible |
gridpop= | gridpop=(G)n | toggles datagrid visibility |
gridprint= | gridprint=Gn | print data grid contents |
gridqry= | gridqry=(G)n;S1 | fill data grid from query string in function |
gridsel= | gridsel=Gn | set selected grid |
hashkey= | hashkey=(T)1/S1 | computes hash key from text and leaves result in Mem0 |
help= | help= | displays information about the TCB run-time executables. |
hscrolloff= | hscrolloff= | turns off horizontal scroll bar |
hscrollon= | hscrollon= | turns on horizontal scroll bar |
ifmemx= | ifmemx=l_op;comp;truestring;falsestring | chooses from two sets of command lines to execute depending on logic test. Details in the addendum at the end. |
iggall= | iggall= | Ignores backgrouns specs from tcbinit.txt. |
imgin=,picin= | imgin=(I)n;S1/open | load graphic file in image n or from filespec or open file dialogue |
imageoff= | imageoff=(I)n; | sets the specified image invisible |
imageon= | imageon=(I)n; | sets the specified image visible |
imagepop= | imagepop=(I)n; | sets the visiblity of image box |
inbox= | inbox=, inputbox=T1 | T1 is prompt text put box title in mem0 prior to running |
istcb= | istcb= | set system to TCB style |
kill= | kill=S1/(T)n | delete filespec in string 1 or filespec in text object from disk |
labelin= | labelin=S1/(C)1/Mem0/open/date/time | inserts data into label object from inline text, drop-down box, file dialogue, current date or current time |
labeloff= | labeloff=Ln; | turns the specified label off |
labelon= | labelon=Ln; | turns the specified label on |
labelpop= | labelpop=Ln; | toggles the specified label's visibility |
linkcli= | linkcli= | set process to client mode - receive commands |
linkclilink= | linkclilink= | returns client link topic |
linkcliname= | linkcliname= | returns client link name |
linkcliset= | linkcliset= | combo command sets up client ready to receive |
linkremote= | linkremote= | toggles a remote flag - used by linkcliset= and linkserset= |
linkrun= | linkrun= | client executes data from server in zComText |
linktimer= | linktimer= | toggles ID broadcast timer - used by linkcliset= and linkserset= |
linksend= | linksend= | sever sends data to client |
linkser= | linkser= | set process to server mode - send commands |
linkserset= | linkserset= | combo command sets up server ready to send |
linksetup= | linksetup= | additonal server setups - run after linkserset= |
linkserlink= | linkserlink= | returns server link topic |
linksername= | linksername= | returns server link name |
linktopic= | linktopic= | lets user change process link topic |
listUp= | listUp=LB1; | move selected item up its list |
listdel= | listdel=LB1 | delete selected item |
listdown= | listdown=LB1 | move selected item down its list |
listedit= | listedit=LBn | toggle listbox edit |
listfrproc= | listfrproc=LB1 | get process specification into listbox |
listin= | listin=LB1;[text][comb][open] | fill list from objects or file |
listout= | listout=LB1;[text][comb][save] | export list to objects or file |
listlall= | listlall=LB1;LB2 | move LB1 to LB2 |
listload= | listload=LB1;F1 | load listbox from file/FONT> |
listlone= | listlone=LB1;LB2 | move selected item in LB1 to LB2 |
listrone= | listrone=LB1;LB2 | move selected item in LB1 to LB2 |
listsave= | listsave=LB1 | dialog to save listbox to file |
logoff= | logoff= | normal system logoff |
makeprc= | makeprc= | creates a browse/edit process for the default table in the default db3 |
mem0in= | mem0in=(T)1/S1 | stuff text object or single file line in Mem0 |
mem0out= | mem0out=(T)1/F1 | copy Mem0 to text object or filespec |
menuspec= | menuspec=n | define a popup menu invoked with popscreen function see addendum for details |
moveit= | moveit= | toggles window movement off and on |
morph= | morph=On;[butn|pict|list|text|tdat| comb|grid|chec|optn|slid|tree|labl|imag] |
put object spec in mem0 first dresses object n with object specification in mem0 |
mvarin= | mvarin=S1/(C)1/Mem0/open/date/time | puts data into Mem1 through Mem9 from inline text, drop-down box, file dialogue, current date or current time: Example: mvarin=1;Some Text|msgbox=mem1| |
mvarout= | mvarout=Mn;[S1,save,clip]: Example: mvarout=1;myfile.txt | Copies mem(0-22) to a file, open a dialog to save to a file, or to the clipboard. |
msgbox= | msgbox=(T)n/F1/S1 | display msgbox from a text object, a variable, a filespec, or with inline text |
nodupes= | nodupes= | set TCB to no duplicate primary key |
open= | open= | displays open file dialogue filespec put in mem0 |
optionmake= | optionmake=OptionSpec | Makes an Option Button |
optionval= | optionval=On;Cmd | if option button value = 1 then execute Cmd |
parspec= | parspec=Fn | returns file info in system vars [path] [drive] [root] [name] [extent] |
passfoc= | passfoc= | sets focus to password object |
password= | password=S1 | sets password to string 1 retrieve with [password] |
passclr= | passclr= | clears the password object |
passoff= | passoff= | turns off the password object |
passon= | passon= | turns on the password object |
passpop= | passpop= | toggles the password object visiblity |
passmove= | passmove=Left;Top | moves the password object |
passsize= | passsize=Height;Width | resizes the password object |
pause= | pause=n/(T)n | pause process number of seconds in inline text or text object 1 |
phone= | phone=(T)n/S1 | dial phone number from text object 1 or inline text |
pic2file= | pic2file=Pn | copies picture box graphic to a file |
picback= | picback=Pn | Sets the picure box background to the windows background. |
picclr= | picclr=Pn | clears picture box |
picin= | picin=P1;[Fn|open] | loads picture box with graphic from filename or open dialog |
piclipget= | piclipget=P1 | loads pictiure box with clipboard graphic |
piclipset= | piclipset=P1 | copy picture box graphic to clipboard |
picmod= | picmod=[on|off] | toggles picture box dragging |
picmove== | picmove=Pn;L;T | move picture box to Left & Top |
picoff= | picoff=Pn | makes picture box invisible |
picon= | picon=Pn | makes picture box visible |
picplay= | picplay=P1;FN| | play video from filename in FN |
pictext= | pictext=P1;[S1/T1] | writes text to a picture box |
picsel= | picsel=P1, selpic=P1 | set selected picture box |
picsize= | picsize=Pn;H;W | resizes a picture box |
piczord= | piczord=P1;Value | sets picture box priority where 0=max |
playloop= | playloop=F1 | play sound file continueously |
plays= | plays=S1/mem0 | plays most sound files |
playstop= | playstop= | stop sound playing |
playv= | playv=P1;S1/mem0 | playv=1;myvid.avi| plays most .mpg or .avi files. If no picture box is specified then the entire process screen is the video box |
playwave= | playwave=F1 | play sound file once |
popscreen= | popscreen=[picture|screengen| image|text|label|grid|listbox|sliderh| sliderv|checkbox|option] n;PoPn |
pops up menu POPn near specified object see menuspec addendum |
poson= | poson= | overrides process window positioning and positions process window's top left corner at the current cursor position when the process is loaded |
postspec= | postspec=S1 | adds a postspec command line to the post processing library |
printers= | printers= | display printers dialogue |
promptin= | promptin=T1 | sets promptstring var in prog sets sysvar [prompt] |
protosend= | protosend=Cmd1|Cmd2|...| | sends commandstring to remote process see addendum |
query2= | query2=OBJn;F1/in line query/Tn | runs SQL query from inline file spec/inline query/file and stuffs result in OBJn |
quit= | quit= | end process |
reboot= | reboot= | reboot system |
recdat= | recdat=(T)1/S1 | stuff text object or single file line in system variable CurrentRecord - variable set used in getsetlist= above |
reclist2= | reclist2=Tn/Cn;delimiter | make a list from delimited data contained in the universal variable Mem0 and places it in a combo or text object. The "&" character used as a delimiter is replaced by the "|" character. Used with recdat= above |
refreshtree= | refreshtree= | refreshes the default data tree |
regrecspec= | regrecspec= | creates a recordset repository record for the default table in the default db3 |
remotea= | remotea= | send data from current process to target program |
remotek= | remotek= | terminates target process |
remotetitle= | remotetitle= | lets user select a program title use as a client (target) for keystrokes |
remotex= | remotex=S1; | runs a program and sets it as a client for data from the running TCB process |
ren= | ren=S1/(T)1;S2/(T)2 | rename the file named in string 2 or text object T2 to name in string 1 or text object T1 |
renametable= | renametable= | opens dialogue to rename the default table |
replace= | replace=S1;S2;S3 | replaces text S2 in S1 with the text in S3 |
replacecr= | replacecr=Tn | replaces text in text box (if no Tn then mem0) n - " \n " with carriage return/Line feed character pair |
savecorr= | savecorr= | save corresponding text to default table |
savescreen= | savescreen= | opens file save dialogue to save the current process to a file |
setloc= | setloc=Tn | sets cursor focus to text object n |
serialno= | serialno=[S1] | returns a non-unique number in mem22 from the S1 string |
scrolloff= | scrolloff= | turns off scroll bars |
scrollon= | scrollon= | turns on scroll bars |
selcomb= | selcomb=(C)1;S1/Tn/Cn | set default combo box object from inline text or text box or drop-down object |
selgrid= | selgrid=(G)1/(C)1 | set default data grid object from inline text or drop-down object |
selimg= | selimg=In | set default image box SelectedImage |
selpic= | selpic=Pn | set default picture box SelectedPic |
seltable= | seltable=S1/(C)1 | set default table name from inline text or drop-down object |
seltext= | seltext=S1; | set default text object from inline text |
seltree= | seltree=Tn;S1/Tn/Cn | set default data tree name from inline text or text box or drop-down object |
setback= | setback=S1 | changes windows wallpaper |
serialno= | serialno=[S1] | returns semi unique number base don time and date where S1 is prepended to the returned string also in mem22 |
setfoc= | setfoc=Tn | sets the focus to text box n |
shutdown= | shutdown= | shutdown system |
slideroff= | slideroff=S1 | set the slider invisible |
slideron= | slideron=S1 | set the slider visible |
slidertog= | slidertog=S | toggle the slider's visibility |
sliderval= | sliderval=S1;[val] | set slider to val if val is 0 sets mem0 to val |
smenu= | smenu=[show|close] | displays or hides system menu |
start= | start=F1 | run everything in a folder from filespec in inline text |
stayontop= | stayontop= | toggle - set screen to stay on top of others |
string= | string=S1;S2 | where S1 is shrink by S2 or padded if S2 > S1 length also in mem22 |
tablefont= | tablefont=I;L1 | puts font(I) name in label and mem22 sets label font to font(I) |
tablekey= | tablekey=S1 | set default table key name from inline text |
tablelist= | tablelist= | get pragma information for the default table |
tablergb= | tablergb=I;L1;L2 | puts RGB(I) name in label and mem22 sets label color to RGB(I) |
textalign= | textalign=Tn;[left|right|center] | aligns text object data see the Addendum for details |
textattr= | textattr=On;[name|size|bold|under| italic|back|fore];value| |
changes attributes of text object data see the Addendum for details |
textin= | textin=S1/(C)1/Mem0/open/date/time | inserts data into text object from inline text, drop-down box, file dialogue, current date or current time. mem0=full|textin=date|==Monday 01-22-2015 |
textoff= | textoff=(T)n; | sets the specified text object invisible |
texton= | texton=(T)n; | sets the specified text object visible |
textout= | textout=(T)1;F1/(C)n/Mem0/save | copies text object to filespec from inline text, to drop-down box, to Mem0, to a filespec from save dialogue |
textpop= | textpop=(T)n; | toggles text box visibility |
textqry= | textqry=(T)n;(T)n/(G)n/(C)n/(D)n | run query from text object 1 - put results in data control, text, data grid, or drop-down object n |
textrtf= | textrtf=Tn;[save|load|print|add];S1 | prints, inserts, saves file data to and from text objects text object data see the Addendum for details |
textrun= | textrun=(T)n; | run commands in text object, single or multiple multi-function command lines |
tips= | tips= | toggle tool tips ancilliary execution on and off. If the tooltip specification is followed by a command(s) line separated from the tip by a double colon, "::", the command line is executed if tips are on. Great for adding sound or visuals to help or spawning multiple helps. |
timeout= | timeout=[n];cmd1/cmd2/| | waits n minutes then executes command strings separated by "/" |
tray= | tray= | minimize screen to system tray |
treeclr= | treeclr= | clear default data tree |
treefresh= | treefresh= | refreshes data tree |
treefromdb= | treefromdb= | loads default data tree with default database schema |
treegraf= | treegraf=[1...6];grafic | sets default tree graphics from iconresource names |
treein= | treein=(H)n;data/open | load data tree from a datset filespec or from a data tree file |
treemove= | treemove=n;L;T | moves tree n left & top |
treeoff= | treeoff=(T)n; | sets the specified data tree invisible |
treeon= | treeon=(T)n; | sets the specified data tree visible |
treepic= | treepic=T1;FN|open | loads tree background from file nameor open dialog |
treepop= | treepop=(H)n | toggles datatree visibility |
treesize= | treesize=n;H;W | resizes datatree Hieght & Width |
user= | user=S1 | set user name usually set by tcblogon |
userpw= | userpw=S1 | set user password answer usually set by tcblogon |
Variables | item=[variable] [variable]=value | Returns or sets TCB system variables |
vscrolloff= | vscrolloff= | turns off vertical scroll bar |
vscrollon= | vscrollon= | turns on vertical scroll bar |
webauth= | webauth=On | "on" turns on a text/web object connection else it turns off. Must use webedit= first |
webback= | webback=W1 | sets web object background to program window background |
webedit= | webedit=T1;W1 | connects a text object and a web object to do wysiwyg editing |
webctrl= | webctrl=W1;[back|fore|goto|ref|line] | causes web object to W1 go-back, go-forward, goto-URL, refresh, online/offline |
webindex= | webindex=T1 | returns default web object number in mem0 and optionally, text 1 |
webmod= | webmod=W1 | toggles web object dragging on and off |
webon= | webon=W1 | hides Web Object W1 |
weboff= | weboff=W1 | shows Web Object W1 |
webpos= | webpos=W1;left;top | moves web object W1 to left and top |
webprint= | webprint=W1 | Dialog to print the contents of the web object W1 |
webrest= | webrest=W1 | restores web object W1 to its loaded position and size |
websel= | websel=W1 | sets web object W1 as default web object |
websize= | websize=W1;height;width | resize web object W1 to height and width |
webtext= | webtext=W1;F1 | send string to web object location bar or contents of mem0 |
weburl2= | weburl2=W1;[mem0|Tn|Ln|Cn|Mn] | copy web object URL to: text | combo | label | MEMn also mem0 |
winfresh= | winfresh= | "Refreshes" process screen by shrinking and normalizing |
winimg= | winimg=S1/null | set screen background from graphic file from inline text or open file dialogue is the default behaviour |
winmax= | winmax= | maximizes the process screen |
winmin= | winmin= | minimizes the process screen |
winmove= | winmove=[left];[top] | sets screen to location specified. wimmove=2000;4000 |
winnorm= | winnorm= | restores the normal process screen |
winsize= | winsize=[height];[width] | sets screen to size specified. Resizing could affect data/time display if used: wimsize=4000;6000 |
wintrans= | wintrans=[1-255] | sets window transparency 255 is no transparency |
winvis= | winvis= | toggle - set screen to invisible |
xbat= | xbat=S1 | opens a file and trys to execute each line in the file |
xquit= | xquit=[|logoff|force|restart|shutdown| | end process if type change is present use that method |
zmsgbox= | zmsgbox=prompt/caption;style;title;timeout;left;top | timed and placed message boxes example: zmsgbox=Message;1;Box Title;4.8;2000;2000;| |
xrun= | xrun=S1 | Runs executable commands with sysytem variable references. EX: xrun=TCB.exe mem1 |
A TCB banner utility is easy. Below is the TCB program for such a utility.
stayontop= winspec=grafics\midnight2.jpg,Light Grey,gray,Tahoma, 1,False,1200,4000,800,12000,AAA prespec=borderset=| prespec=borderfix=| prexspec=moveit=| prespec=cpyrit=| lblspec=banner, ,trans,times new roman,32,0,yellow,False,False,800,0,0,11800 prespec=winmove=mem2;mem3| prespec=banon=1;mem1| butnxspec=pause=|xmenu.exe prcs\zmainmsg.mnu|pause=|quit=|,Quit,Quit,green,MS Sans Serif,10,false, lblxxxspec=5copyright,Copyright © 1989-2014 Phoenix Information Systems/TM,trans,small fonts, 7,0,smoke,False,False,200,1000,4990,8000 prespec=funckey=3;quit=| prespec=timeout=4;quit=| postshow=The banner programcan be called with: xmenu.exe prcs\banneryel.mnu ;msgdmp.txt;2000;200;|
textin/mvarin date/time
Textin and mvarin functions can accept a date or time parameter. These specs can
return the date or time in one of two formats. If mem0 contains the text full then
an expanded date or time string is returned:
Example executing function below:
mvarin=1;date|
Results in mem1 containing 2015-09-04
Example executing functions below note setting of mem0:
mem0in=full
mvarin=1;date|
Results in mem1 containing Friday September 4, 2015
Example executing function below:
mvarin=1;time|
Results in mem1 containing 591213
Example executing functions below note setting of mem0:
mem0in=full
mvarin=1;time|
Results in mem1 containing 01:42pm
Compute Function
The compute function takes an expression of any length and complexity and stuffs result in mem0 and mem22 (mem0 failure).
Decimal values such .98, .007 etc. MUST have a leading units zero as in: 0.98, 0.007 or 0mem1, 0mem2.
The compute function syntax: compute=expression;[format string].
where: format string must have at least 1 # symbol in it. where: to view trailing zeros in formatted strings, use #.#0 to display 3.80 , forces a trailing zero to show
Sample Expressions
compute=(4.50 * 1) - ((4.50 * 1) * 0.075) - ((4.50 * 1) * 0.08) compute=(sellprice * no) - (0tax * (sellprice * no)) - (0discount * (sellprice * no)) compute=(mem6 * mem1) - ((mem6 * mem1) * 0mem4) - ((mem6 * mem1) * 0mem5)
Compute= Functions
Functions | Derived | Non Math |
---|---|---|
ABS = Abs(Arg)
ATN = Atn(Arg)
COS = Cos(Arg) EXP = Exp(Arg) FIX = Fix(Arg) INT = Int(Arg) LOG = Log(Arg) RND = Rnd(Arg) SGN = Sgn(Arg) SIN = Sin(Arg) SQR = Sqr(Arg) TAN = Tan(Arg) |
SEC = 1 / Cos(Arg)
COSEC = 1 / Sin(Arg) COTAN = 1 / Tan(Arg) ARCSIN = Atn(Arg / Sqr(-Arg * Arg + 1)) ARCCOS = Atn(-Arg / Sqr(-Arg * Arg + 1)) + 2 * Atn(1) ARCSEC = Atn(Arg / Sqr(Arg * Arg - 1)) + Sgn(Arg - 1) * (2 * Atn(1)) ARCCOSEC = Atn(Arg / Sqr(Arg * Arg - 1)) + (Sgn(Arg) - 1) * (2 * Atn(1)) ARCCOTAN = Atn(Arg) + 2 * Atn(1) HSIN = (Exp(Arg) - Exp(-Arg)) / 2 HCOS = (Exp(Arg) + Exp(-Arg)) / 2 HTAN = (Exp(Arg) - Exp(-Arg)) / (Exp(Arg) + Exp(-Arg)) HSEC = 2 / (Exp(Arg) + Exp(-Arg)) HCOSEC = 2 / (Exp(Arg) - Exp(-Arg)) HCOTAN = (Exp(Arg) + Exp(-Arg)) / (Exp(Arg) - Exp(-Arg)) HARCSIN = Log(Arg + Sqr(Arg * Arg + 1)) HARCCOS = Log(Arg + Sqr(Arg * Arg - 1)) HARCTAN = Log((1 + Arg) / (1 - Arg)) / 2 HARCSEC = Log((Sqr(-Arg * Arg + 1) + 1) / Arg) HARCCOSEC = Log((Sgn(Arg) * Sqr(Arg * Arg + 1) + 1) / Arg) HARCCOTAN = Log((Arg + 1) / (Arg - 1)) / 2 |
TIMER = Timer
YEAR = Year(Now) MONTH = Month(Now) DAY = Day(Now) WEEKDAY = Weekday(Now) HOUR = Hour(Time) MINUTE = Minute(Time) SECOND = Second(Time) |
Date/Time function
The Date/Time function syntax is: datetime=Tn/Ln;date/time;format(n)
where: Tn is a text object instance
where: Ln is a label object instance
where: date/time is the text "date" or "time" respectively
where: format(n) is one of the formats from the lists below.
|
|
The ifmemx function syntax is: ifmemx=l_op;comparand;truestring;falsestring
where: l_op is a logic operator
where: comparand is the value to be compared to the system variable Mem0.Logic Operators
- = equal comparand
- < less than comparand
- > greater than comparand
- <= less or equal comparand
- >= greater or equal comparand
- != not equal comparand
- == comparand in mem0
- =! mem0 in comparand
User Variables
mem1-21 these are user addressable variables that can store data that can be used in functions and queries.
Use: mvarin=M1;text(n)|S1|open Example: mvarin=1;my data|
Universal Donor
mem0 is the universal donor/recipient meaning many functions expect default data to be found there and many function expect relevant data to be placed there before the function executes.
System Data
Use: function=[variable] Use: mvarin=1;[username]|
System data variables must be enclosed in "[ ]" to work
Environment (enclose in brackets [ ])
The TCB variable, [prompt], returns the current dialogue prompt. The TCB function, promptin=, sets the dialog prompt. If the function is a file operation then promptin= sets the file filter in the form, prompt@ambiguous filespec@prompt@ambiguous filespec2@. Example: promptin=Graphics@*.jpg;*.gif;*.ico@All Files@*.*@. Note the use of the amperstand, @, character. This is required to separate components.
The list of functions provided by TCB is below.
The sMenu lets the user have access to system menus. These are the menu bars shown beneath the title bar on almost all program Windows. TCB's sMenu lets the user decide when to show the system menu and can turn it off.
A sMenu specification is started with the keyword smenuspec= followed by the menu sequence number. Ex: smenuspec=My Menu, 1.
The smenuspec= line is followed by up to 16 sub-menu specifications. A sub-menu is started with the keyword sitemspec=, followed by a command string and a menu label. Ex: myprog.exe, My Program.
Unlike pMenus described below, this all the information needed to use system menus. a sample menu is below.
smenuspec=1,File sitemspec=stayontop=,Toggle OnTop sitemspec=winmin=,Minimize sitemspec=browser=docs\zprocctrl.htm,About Process Control sitemspec=quit=,Exit sitemspec=endmenu smenuspec=2,TCB Utilities sitemspec=progfactory.exe,Program Factory sitemspec=sqliteViewer.exe,Sqlite Viewer sitemspec=webedit.exe,Web Editor sitemspec=recset.exe,RecordSet Master sitemspec=tcb.exe prcs\dbmanager.prc,Database Manager sitemspec=associate.exe,Associate sitemspec=endmenu
TCB sMenus have a single user function, smenu=. Its syntax is: smenu=[show|close|kill]. The form, smenu=show, displays the system menu if loaded. The form, smenu=close or smenu=kill, closes an open system menu. The user can have up to 10 displayed menu items, each with up to 16 sub-items.
Items are grouped above a corresponding item header spec. Its format is below:
itemspec=comment, menu item label, itemtype=16, 2, header item sequence number begin with 1001
Example menuspec Form 1: menuspec=2 itemspec=explorer.exe, Run Explorer, 0, 1, 1 itemspec=notepad.exe, Run Notepad, 0, 1, 2 itemspec=wordpad 3, Run Wordpad, 0, 1, 3 itemspec=OpenOffice 5, Windows Utilities, 16, 2, 1001 itemspec=sep, separator, 2048, 2, 4 itemspec=dbml.exe, ** TCB Apps **, 0, 2, 1 itemspec=progfactory.exe|,Program Factory, 0, 2, 2 itemspec=sqliteViewer.exe|,Sqlite Viewer, 0, 2, 3 itemspec=webedit.exe|,Web Editor, 0, 2, 4 itemspec=recset.exe|,RecordSet Master, 0, 2, 5 itemspec=tcb.exe prcs\dbmanager.prc|,Database Manager, 0, 2, 6 itemspec=endmenu
Note: the menu above is one of two types of popup menus. It displays "Windows Utilities", a separator bar and a list of menu items from the separator bar on down. When Windows Utilities is clicked, the three menu items under menuspec are displayed.
The form below is different. It doesn't have a title item. Each menu is a straight pop-up. This form can simulate system menus described below by assigning each menu to a button at the top of the window.
Example menuspec Form 2: menuspec=2 itemspec=dummy item|,Never reference this menu item, 0, 1, 11 itemspec=dummy, dummy, 16, 2, 1001 itemspec=endmenu menuspec=3 itemspec=Backup|,Backup, 0, 1, 1 itemspec=cmd=RESTORE|,Restore, 0, 1, 2 itemspec=cmd=Export|,Export, 0, 1, 3 itemspec=endmenu menuspec=4 itemspec=New Customer,New Customer, 0, 3, 1 itemspec=Edit Customer,Edit Customer, 0, 3, 2 itemspec=endmenu
Form 2 skips the first menuspec and references the menus using their ordinal position in the program specification. The number following menuspec= is ignored. For example; the pop-up function, popscreen=image;4;2, says that the program image number 4 will pop-up menuspec=2. This actually references the second menuspec even though its specification is menuspec=3.
The first menuspec should always be a dummy with pop-up menus otherwise how the menu displays could be compromised.
How to Use
Once you have your menu in place, it can be accessed using the popscreen= function. The popscreen= function syntax is below:
popscreen=object type;object index;menu number|
where object type is one of the list: butn|pict|list|text|comb|grid|chec|optn|slid|tree|labl|imag
Example popscreen function call: popscreen=image;15;4|The above says to pop-up menu number 4 somewhere around image object number 15.
An example Data Control specification is shown below:
tdatspec=Ctrl3,data\admin.db3,journal,rsid,name,1,1,4,12,1,1,select * from journal
When a data control is specified, text boxes in a process can be filled with corresponding record item data. The text box to start filling is specified by the "textstart" attribute of a Data Control. The Data Control attributes you must get right for it to work are: datsetspec, recset and nocols
The Data Control is interacted with using the datctrl= function. Its syntax is below:
datctrl=n;[first|prior|next|last|save|add|delete|dbfind|;[index]
Example function calls are shown below:
datctrl=1;first|
datctrl=1;dbfind;21|
Note: Other functions can reference the data control query.
Message Send
Message Send is a process where TCB can execute a program and then link with it to send strings of data, messages. TCB can communicate with most any program with this method. Once the link is established, TCB can also terminate the running program at will. This method is typically used to send chunks of data to another program.
However, the client program (another TCB program) can be set up to treat incoming data as commands and attempt to execute the data. The functions for this method are the remote.. functions in the function list. The Message Send has four functions:
Message Send uses a convention called sendKeys. It is used to emulate key board input into a program. This methodology uses character sequences for special keys. For example line breaks are singnified by {ENTER} or just ~. A list of keys and the character sequence you need to send them is shown below.
BACKSPACE {BACKSPACE}, {BS}, or {BKSP} BREAK {BREAK} CAPS LOCK {CAPSLOCK} DEL or DELETE {DELETE} or {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER}or ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} or {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT} SCROLL LOCK {SCROLLLOCK} TAB {TAB} UP ARROW {UP} F1 {F1} F2 {F2} F3 {F3} F4 {F4} F5 {F5} F6 {F6} F7 {F7} F8 {F8} F9 {F9} F10 {F10} F11 {F11} F12 {F12} F13 {F13} F14 {F14} F15 {F15} F16 {F16} Key Code SHIFT + CTRL ^ ALT %
Remote Control
Remote Control is a process where TCB can establish a client/server relationship with another TCB program. In this type of relationship, one of the programs is the client. The client typically begins a relationship by broadcasting its client ID (this is all automatic). It the waits for another program to send it data. In this relationship, the client attempts to execute the data it receives.
When the server program is ready to communicate, it begins looking for a client ID being broadcast. When it gets a client ID, the server completes the link and is ready to send data to the client. The client executes the sent data as though the functions is performs comes from within. This means that the server program is in complete control of the client Window.
In this mode the server can actually create an entire TCB program and run it as long as it has a valid TCB program window, i.e., a winspec= specification and two object specifications to start with (this can be created within a process). You would also need a prespec function, prespec=linkcliset=, to start broadcasting.
For a client server relationship, each program has an ID. The IDs have the same form, the name of the form and something called the LinkTopic. When the client broadcasts its ID might look like this: rooster|zeus. Many of the Remote Control functions have to do with the IDs.
The functions for this method are the link.. functions in the function list. The Remote Control has fourteen functions and because there are many we refer you to the function list above.
The protosend function in the function list was actually created before the Remote Control was even designed. It performs the same function as the linksend= function.
Copyright © 1982-2015, Phoenix Information Systems/TM all rights reserved
Contact: Fred Pierce, makpiya@aol.com, makpiya@gmail.com, 831.240.9969