for a menu item "item,ID#,item name" eg. "item,34000,E&xit"
For items a 6th and 7th parameter can be specified:
6th is the message that appears in the status line if the mouse is
over this item - this is "" if not specified
7th is an interger flag bit 1 = checked bit 2 = disabled:
0=enabled
1=checked and enabled
2=disabled
3=checked and disabled ???
"CREATE"
PRINT 'MENU'("CREATE","CONSOLE","MYMENU")
Deletes "MYMENU" if it exists then Creates an empty menu named "MYMENU".
"DELETE"
PRINT 'MENU'("DELETE","CONSOLE","MYMENU")
Delete the menu "MYMENU" - all its sub menus and items.
If the position field is specified, only that
Item or SubMenu is deleted.
"SHOW"
PRINT 'MENU'("SHOW","CONSOLE","MYMENU")
Makes "MYMENU" the currently displayed menu in the CONSOLE view
"APPEND"
PRINT 'MENU'("APPEND","CONSOLE","MYMENU","","menu,&File")
Adds a submenu named File to MYMENU
PRINT 'MENU'("APPEND","CONSOLE","MYMENU","0","item,34000,E&xit","Exit this Program")
appends an item to the 1st sub menu
PRINT 'MENU'("APPEND","CONSOLE","MYMENU","0","separator")
appends a separator line.
"INSERT"
PRINT 'MENU'("INSERT","CONSOLE","MYMENU","0,0","item,34001,&Open","Open a File")
inserts an item before the 1st item in the first sub menu
PRINT 'MENU'("INSERT","CONSOLE","MYMENU","1,3,4","item,8002,&Save")
inserts an item before the 5th item in the sub menu that is the 4th element(it must be a sub menu) of the 2nd sub menu in MYMENU
"MODIFY"
PRINT 'MENU'("MODIFY","CONSOLE","MYMEU","0,1","item,34000,E&xit","Exit This Program",2)
changes the Exit item to disable and grayed condition
"SETFLAG"
PRINT 'MENU'("SETFLAG","CONSOLE","MYMENU","","34000","New Status Message",1)
changes the Message displayed in the status line and checks the menu item that has an id of 34000
SETFLAG is similar to MODIFY but it changes the 6th and 7th parameters based on id number
not posiotion, the position string is ignored.
If 6th parameter(the status line message) is "" it is not changed
PRINT 'MESSAGEBOX'(T$,M$,O$), - Display a Windows Message Box and wait for user input.
T$ is the message box title.
M$ is the message box message
O$ is a 3 byte option string
The Message Box mnemonic pushes a single digit (0->6) followed by CR into the input buffer
to indicate the name of the button used to terminate the Message Box.
O$(1,1)="0" - The message box contains three push buttons: Abort, Retry, and Ignore.
O$(1,1)="1" - The message box contains one push button: OK. This is the default if O$=""
O$(1,1)="2" - The message box contains two push buttons: OK and Cancel.
O$(1,1)="3" - The message box contains two push buttons: Retry and Cancel.
O$(1,1)="4" - The message box contains two push buttons: Yes and No.
O$(1,1)="5" - The message box contains three push buttons: Yes, No, and Cancel.
O$(2,1)=" " or LEN(O$) < 2 - No icon symbol appears in box.
O$(2,1)="0" - An exclamation-point icon appears in the message box.
O$(2,1)="1" - An icon consisting of a lowercase letter i in a circle appears
in the message box.
O$(2,1)="2" - A question-mark icon appears in the message box.
O$(2,1)="3" - A stop-sign icon appears in the message box.
O$(3,1)=" " or LEN(O$) < 3 - The first button is the default button.
O$(3,1)="0" - The first button is the default button.
O$(3,1)="1" - The second button is the default button.
O$(3,1)="2" - The third button is the default button.
Return Values are:
"0" - Abort button was selected.
"1" - Cancel button was selected.
"2" - Ignore button was selected.
"3" - No button was selected.
"4" - OK button was selected.
"5" - Retry button was selected.
"6" - Yes button was selected.
EXAMPLE:
1000 READ 'EE','MESSAGEBOX'("This is the Title","Yes or No Make up your mind?","420"),a$,'be',
1010 if a$="6" THEN PRINT "Yes" ELSE PRINT "no"
PRINT 'MODE'(N$) - change to font N$. N$ must be defined on property page
Fonts.
PRINT 'MOVE'(col,row) - the current window will be moved to col,row
relative to 0,0 of the Screen.
PRINT 'MOVEWINDOW'(X,Y,W,H)
will move the MainWindow to position(pixels) X,Y with a width of W and a height of H
.
PRINT 'MWT'(T$) - Sets the Main Windows Window Title to T$
If you want a single title (without the - [something]) you can:
PRINT 'MWT'(T$),'WT'("")
Once a 'PS' is sent some of the clearing function like 'CL' and 'CE' act more like
'CF' in that they only clear the foreground characters.
Uses the Windows API function PlaySound to play the wave file specified
by pathname.
EXAMPLE:
100 PRINT 'PLAYSOUND'("C:\WAVEFILES\GOODMORNING.WAV"),
NOTES:
No SETDISK directories or PREFIXES are NOT searched. The sound file must be in the
current directory of SM32.EXE or be a pathname.
PRINT 'POP', - destroys the current window and returns to the previous window.
'PRM'(P$) Loads screenedit prompt string. This is an alternative to using PRM=.
100 READ (0,PRM="YES")A$
100 READ (0)'PRM'("YES"),A$
are functionally equivalent statements.
PRINT 'PUSH', - creates a new window identical to the current window and
then make it the current window.
If the bell mode is specified it sets the mode of subsequent 'RB''s that do not
have the bell mode specified. The bell mode is a value from 0->6 which generate
the following sounds:
bell mode sound from windows api call
0 PC speaker Beep(100,100)
1 Sound Card(SystemDefault) MessageBeep(MB_OK)
2 Sound Card(SystemAsterisk) MessageBeep(MB_ICONASTERISK)
3 Sound Card(SystemExclamation) MessageBeep(MB_ICONEXCLAMATION)
4 Sound Card(SystemHand) MessageBeep(MB_ICONHAND)
5 Sound Card(SystemQuestion) MessageBeep(MB_ICONQUESTION)
6 either MessageBeep(-1);
EXAMPLE:
100 PRINT 'RB'(1),; REM SET RB TO SystemDefault sound
110 PRINT 'RB',; REM PLAY SystemDefault sound
NOTES:
The System sounds can be changed in the control panel. Also SEE
'PLAYSOUND'
Places the cursor position in the input buffer in the form of:
CHR(32+LINE)+CHR(32+COL)+$0D$
EXAMPLE:
100 READ 'EE','RC',A$,'BE',
110 PRINT "The cursor was at Line:",asc(a$(1,1))-32," and Column:",asc(a$(2,1))-32
Note:
The position is Screen relative NOT scroll area relative.
Next Character is printed in Red.
PRINT 'RGB'(R,G,B) - set the color based on the intensity of the red,blue and green.
Each of R,G and B are in the range from 0->3 allowing 64 different colors.
PRINT 'RGB'(C$) - in this form C$(1,2) is a 16 bit number with each 2 bit
field (0->3) being the color as the follow masks display:
$0003$ - foreground blue
$000C$ - forground green
$0030$ - forground red
$0300$ - background blue
$0C00$ - background green
$3000$ - background red
PRINT 'RGBX'(R,G,B) - set the color based on the intensity of the red,blue and green.
Each of R,G and B are in the range from 0->255.
print 'RGB'(1,2,3) is equiavlent to
print 'RGBX'(85,170,255)
Note: The FIN function and the read screen mnemonics only return
2 bits for each color that is : int(color/85) for an RGBX color.
Read the screen data from the start of the current line to the end of the
current line. A CR is added to the screen data.
Resets all modes to their default
Read the screen data from the the current cursor position to the end of the
scroll area. A CR is added to the screen data.
If the screen has been modified outside the PC3 driver this will restore it.
Non-destructive move right..
PRINT 'SB'(x) - where x > 0 and x < 100 sets the percentage of intensity that background
is compared to foreground. The default is 75.
PRINT 'SB'(r,g,b) where r,g,b 0->255 for each or the RGB colors. This version set the
color to be used for displaying characters that are in background.
Note 'SB'(x) and 'SB'(r,g,b) do not set background mode.
PRINT 'SB' - sets background mode. All subsequent characters will be displayed in
lower intensity (or the color selected by 'SB'(r,g,b).
PRINT 'SF' - sets foreground mode. All subsequent characters will be displayed in
high intensity also called foreground.
Background characters are protected by the
'PS' and 'CF' from being cleared.
PRINT 'SCROLL'(col,row,cols,rows) - defines a scroll area within a window.
PRINT 'SCROLL'("ON") - enables scrolling
PRINT 'SCROLL'("OFF") - disables scrolling
PRINT 'SCROLL'("RESET") - set the scroll area to the size of the window. If there
was a title box around the previous scroll area it will now be contained
in the new max size scroll area.
Switches to the font specified by SP on the Fonts property page.
NOTE:
Same as 'MODE'("SP")
PRINT 'SRPC'(x), - subsequent RCALL's
will be made to connection # x.
Connections # -1 is the windows PC.
PRINT 'STATUS'(A$)
PRINT 'SW'(X$) Where X$=
"HIDE" to hide the window
"SHOW" to display the hidden window
"RESTORE" to restore the minimized window
"MINIMIZE" to minimize a window
"MAXIMIZE" to maximize a window
EXAMPLE:
10 BEGIN
20 STRING "TESTFILE.TXT",-1
30 OPEN (1)"TESTFILE.TXT"
40 FOR I=1 TO 50
50 WRITE(1)"DATA "+STR(I)+$0D$
60 NEXT I
65 CLOSE(1)
70 PRINT 'LAUNCH'("NOTEPAD.EXE TESTFILE.TXT",DIR(-1),0,0)
75 REM TCB(8) WILL CONTAIN PROCESS ID
80 PRINT 'SW'("MINIMIZE"),REM MINIMIZE WHILE NOTEPAD IS RUNNING
85 REM WHILE EXIT CODE FOR NOTEDPAD IS STILL_ACTIVE (259)
90 WHILE 259=GEC(TCB(8))
100 PRINT "WAITING FOR NOTEPAD TO END"
110 WAIT 1
120 WEND
130 PRINT 'CS','SW'("RESTORE")
NOTE:
If you PRINT 'SW'("HIDE") while in console mode you will have to use the task manager
to terminate SM32.
Swaps to the previous window.
PRINT 'SYSMENU'("NotePad","notepad.exe","C:\",0,0) will add an entry under Propeties in
the System Menu called Notepad.
The 1st string is the name that appears in the System Menu.
The 2nd string is the executable program.
The 3rd string is the start dir for the program.
The 4th parameter is the Priority (1=high,0=normal,-1=low).
The 5th parameter is window size(1=maximize, 0=default , -1 - minimize).
If you had the Manual tree for the manual you are now reading in C:\Manual then
a more usefull example would be:
PRINT 'SYSMENU'("Manual","C:\Program Files\Internet Explorer\IExplore.exe
C:\Manual\sm32.html","",0,0)
Then you could bring up this manual from the System Menu of your sm32 screen.
NOTE:
There is no way to remove an entry. It is expected that in your startup program you
might add a couple of entries of programs you want easy access to.
Places all the characters in the scroll area into the input buffer and adds a CR.
Move the cursor to the line above. If on line 0 move to the last line of the Scroll
area.
Move the cursor to the line above. If on line 0 move to the last line of the Scroll
area.
Next Character is printed in White.
PRINT 'WINDOW'(col,row,cols,rows{,titlestr{,attribstr{,namestr}}}) -
will create a new window at
Column col and Row row of size cols*rows. If the title string is specified
and is <> "" a BOX (see 'BOX') will be drawn at
Column col and Row row of size cols*rows and the title
will appear on the top line of the box. If the attribute string (MNEMONIC) is
present and <> "" it will be applied before printing the box. If the namestr is
present the NAME (see 'GOTO' and 'DROP')
will be associated with the window. A scroll area (see 'SCROLL')
will be established either inside the Box if there was a title or the entire window.
EXAMPLE:
PRINT 'WINDOW'(10,5,40,10,"HELLO",'RED',"HELLOWINDOW")
The 'WINDOW' mnemonic can also be used to get a list of active windows.
EXAMPLE:
10 PRINT 'EE','CI',WINDOW'("LIST"),
20 READRECORD(0,SIZ=1)A$;REM GET # OF WINDOWS
30 READRECORD(0,SIZ=ASC(A$))L$
40 PRINT 'BE'
ASC of each character in L$ will be the window number of an active window. The order is
from the current window down to window 0. The same order windows would appear if you kept
'POP'ing the current window down to window 0.
PRINT 'WRAP'("ON") - characters will wrap from the end of 1 line to the next
PRINT 'WRAP'("OFF") - characters printed past the end of the line will be lost.
PRINT 'WT'(T$) - Sets the Windows Window Title to T$
Next Character is printed in Yellow.