PANORAMIC: USER's GUIDE

FOR THE VERSION 0.9.27

PART 7 - SYSTEM (DISKS, EXCEL, MOUSE, MESSAGES, MIDI, DLL, ...)

MAIN PAGE / DOCUMENTATION


1 - DISK MANAGEMENT

2 - EXCEL MANAGEMENT

3 - MOUSE POSITION AND MOUSE EVENTS

4 - MESSAGE WINDOW

5 - EXECUTE AN EXTERNAL PROGRAM

6 - RECEPTION OF PASSED PARAMETERS

7 - INDIVIDUAL NOTES IN MIDI

8 - CALL A FUNCTION OF DLL

9 - USING THE PARALLEL PORT FOR INPUT-OUTPUT

10 - CHAIN A SOURCE PROGRAM

11 - ERROR MANAGEMENT

12 - CLIPBOARD MANAGEMENT

13 - ARCHIVE

14 - MAIL

15 - SYSTEM INFORMATION

16 - CREATE STAND-ALONE EXECUTABLE FILES


1 - DISK MANAGEMENT

Some information can be get about disks.

DISK_EXISTS(D)

Returns 1 if the disk D exists, 0 otherwise.

DISK_KILO_FREE(D)

Returns the free space on the disk D.

DISK_KILO_SIZE(D)

Returns the size of disk D

to the top


2 - EXCEL MANAGEMENT

Excel can be launched, stopped. (Excel is a Microsoft copyrighted software).
A new sheet (file) can be created.
It is possible to read or write in any cell of a file.
It is possible to open several sheets (file) by the command
EXCEL_FILE_NEW.

EXCEL_START Starts Microsoft Excel (if installed on the system).
EXCEL_STOP Stops Microsoft Excel.
EXCEL_FILE_NEW N Creates a new Excel file number N (create a new sheet).
EXCEL_FILE_OPEN N, "Name" Opens the Excel file Name and allocate it the number N.
EXCEL_FILE_CLOSE N Closes the Excel file number N.
EXCEL_WRITE Cell, T Writes T in an Excel cell.
EXCEL_READ$(Cell) Returns content of an Excel cell.

to the top


3 - MOUSE POSITION AND MOUSE EVENTS

To know in real time the position of mouse cursor on a system object and the state of the keys.
The origin position (X=0, Y=0) is the position of the upper left corner of the object.
The used object must be a SCENE3D or a PICTURE (no command on an OBJECT of another type).

These keywords are designed to develop a lot of 2D and 3D games !

MOUSE_X_POSITION(N) Returns current X-position of mouse on object number N.
MOUSE_Y_POSITION(N) Returns current Y-position of mouse on object number N.
MOUSE_RIGHT_DOWN(N) Returns 1 if right button is pressed on object number N, 0 otherwise, then is reset to 0.
MOUSE_LEFT_DOWN(N) Returns 1 if left button is pressed on object number N, 0 otherwise, then is reset to 0.
MOUSE_RIGHT_UP(N) Returns 1 if right button is released on object number N, 0 otherwise, then is reset to 0.
MOUSE_LEFT_UP(N) Returns 1 if left button is released on object number N, 0 otherwise, then is reset to 0.
MOUSE_X_RIGHT_DOWN(N) Returns X-position of mouse when right button is pressed on object number N. Meaningless if MOUSE_RIGHT_DOWN(N) is 0.
MOUSE_Y_RIGHT_DOWN(N) Returns Y-position of mouse when right button is pressed on object number N. Meaningless if MOUSE_RIGHT_DOWN(N) is 0.
MOUSE_X_LEFT_DOWN(N) Returns X-position of mouse when left button is pressed on object number N. Meaningless if MOUSE_LEFT_DOWN(N) is 0.
MOUSE_Y_LEFT_DOWN(N) Returns Y-position of mouse when right button is pressed on object number N. Meaningless if MOUSE_LEFT_DOWN(N) is 0.
MOUSE_X_RIGHT_UP(N) Returns X-position of mouse when right button is released on object number N. Meaningless if MOUSE_RIGHT_UP(N) is 0.
MOUSE_Y_RIGHT_UP(N) Returns Y-position of mouse when right button is released on object number N. Meaningless if MOUSE_RIGHT_UP(N) is 0.
MOUSE_X_LEFT_UP(N) Returns X-position of mouse when left button is released on object number N. Meaningless if MOUSE_LEFT_UP(N) is 0.
MOUSE_Y_LEFT_UP(N) Returns Y-position of mouse when right button is released on object number N. Meaningless if MOUSE_LEFT_UP(N) is 0.

to the top


4 - MESSAGE WINDOW

To display a text in a window to be acknowledged.

Remark: the program is stopped when the window is displayed (it waits for the answer) and resumes as soon as user acknowledges the message.

4.1 - Single text

MESSAGE T Displays the line of text T in a window.

to the top

4.2 - Message to be acknowledged

Functions displaying a window with 1 button and which return:
0 when user closes the window by clicking on the closing icon (red cross),
1 when user closes the window by clicking on the button OK.

MESSAGE_CONFIRMATION_OK() Displays a confirmation message to be acknowledged (window with a text, an interrogation mark and a button)
MESSAGE_ERROR_OK() Displays an error message to be acknowledged (window with a text, a red error sign and a button)
MESSAGE_INFORMATION_OK() Displays an information message to be acknowledged (window with a text, a big "I" and a button)
MESSAGE_WARNING_OK() Displays a warning message to be acknowledged (window with a text, an exclamation point symbol and a button)

to the top

4.3 - Message to be answered by yes or by no

Functions displaying a window with 2 button and which return:
0 when user closes the window by clicking on the closing icon (red cross),
1 when user closes the window by clicking on the button YES,
2 when user closes the window by clicking on the button NO.

MESSAGE_CONFIRMATION_YES_NO() Displays a confirmation message to be answered by yes or no (window with a text, an interrogation mark and two buttons)
MESSAGE_ERROR_YES_NO() Displays an error message to be answered by yes or no (window with a text, a red error sign and two buttons)
MESSAGE_INFORMATION_YES_NO() Displays an information message to be answered by yes or no (window with a text, a big "I" and two buttons)
MESSAGE_WARNING_YES_NO() Displays a warning message to be answered by yes or no (window with a text, an exclamation point symbol and two buttons)

to the top

4.4 - Input message

MESSAGE_INPUT() Displays an input message with a caption, an ALPHA, an EDIT and two buttons. The answer can be read in MESSAGE_TEXT$().
MESSAGE_INPUT$() Displays an input message with a caption, an ALPHA, an EDIT and two buttons. The answer is returned by the function.

7.5 - Title

APPLICATION_TITLE T

Set a title to the application and to the MESSAGE windows.

to the top


5 - EXECUTE AN EXTERNAL PROGRAM

It is possible to execute an external program and to pass it parameters.
The calling program can wait or not the end of called program.

EXECUTE "c:\MyPrg.exe" Executes the program "MyPrg.exe".
EXECUTE "c:\MyPrg.exe 30 5" Executes the program "MyPrg.exe" and passes it the parameters 30 and 5.
EXECUTE_WAIT "c:\MyPrg.exe" Executes the program "MyPrg.exe" and waits for the end.
EXECUTE_WAIT "c:\MyPrg.exe 30 5" Executes the program "MyPrg.exe", passes it the parameters 30 and 5, and waits for the end.

to the top


6 - RECEPTION OF PASSED PARAMETERS

To use the passed parameters when the executable file (EXE) is called:

PARAM_NUMBER System variable which returns the number of passed parameters when executable is called.
PARAM_VALUE$(N) Returns the value of the N-th parameter passed when executable is called.

to the top


7 - INDIVIDUAL NOTES IN MIDI

To play notes individually to the sound card, it is necessary at first to allocate resources by MIDI_ON.
The notes are played by MIDI_PLAY. The volume can be changed by MIDI_VOLUME.
When notes have been played, resources are released by MIDI_OFF:

MIDI_ON Start using individual notes to the MIDI output.
MIDI_PLAY N, T Plays the note N of type T to the MIDI output.
MIDI_VOLUME V Changes the volume of notes played to the MIDI output.
MIDI_OFF Stops using individual notes to the MIDI output.

In the command MIDI_PLAY N, T
N is the note following the MIDI convention (60 = C octave #4, 62 = D octave #4, ...)
and T is its duration between 0 and 11, defined as follows:

T
Note
Duration in milliseconds
0
whole note (semibreve)
4000
1
dotted whole note (dotted semibreve)
6000
2
half note (minim)
2000
3
dotted half note (dotted minim)
3000
4
quarter note (crotchet)
1000
5
dotted quarter note (dotted crotchet)
1500
6
eighth note (quaver)
500
7
dotted eighth note (dotted quaver)
750
8
sixteenth note (semiquaver)
250
9
dotted sixteenth note (dotted semiquaver)
375
10
thirty-second note (demisemiquaver)
125
11
dotted thirty-second note (dotted demisemiquaver)
188

to the top


8 - CALL A FUNCTION IN DLL

To call a function belonging to a DLL (Dynamic Link Library), it is necessary to load first the DLL to the memory by DLL_ON.
The function calls are performed by commands
DLL_CALLn, n being the number of parameters.
When DLL is not useful, the memory can be freed by
DLL_OFF.

DLL_ON D Loads the DLL D to the memory.
DLL_CALL0(F) Returns the value given by the function F, called without any parameter.
DLL_CALL1(F, P1) Returns the value given by the function F, called with 1 parameter.
DLL_CALL2(F, P1, P2) Returns the value given by the function F, called with 2 parameters.
DLL_CALL3(F, P1, P2, P3) Returns the value given by the function F, called with 3 parameters.
DLL_CALL4(F, P1, P2, P3, P4) Returns the value given by the function F, called with 4 parameters.
DLL_CALL5(F, P1, P2, P3, P4, P5) Returns the value given by the function F, called with 5 parameters.
DLL_CALL6(F, P1, P2, P3, P4, P5, P6) Returns the value given by the function F, called with 6 parameters.
DLL_OFF Release the memory.

For certain functions it can be useful to pass the address of a variable or the handle of a system object:

ADR(V) Returns the address of the variable V.
HANDLE(N) Returns the handle of the system object number N.
HANDLE_CANVAS(N) Returns the handle of the graphic area of the system object number N.
HANDLE_FORM(T$)

Returns the handle of the FORM having T$ as title.

HANDLE_APPLICATION Returns the handle of the current application.

to the top


9 - USING THE PARALLEL PORT FOR INPUT-OUTPUT

To use the printer port as a mean of input-output.
Each time the parallel port is used, begin the sequence by the command PARALLEL_ON and end it by PARALLEL_OFF.
The DLL inpout.dll is necessary.

Generally, the parallel port has its output in 888 and its input in 890.

PARALLEL_ON Begins a sequence of using a parallel port.
PARALLEL_OUT N, V Sends the value V on the parallel port N.
PARALLEL_INP(N) Returns the value read on the parallel port N.
PARALLEL_OFF Ends the sequence of using a parallel port.

to the top


10 - CHAIN A SOURCE PROGRAM

It is possible to load then run a source program.

All the variables and all system, 3D and SPRITE objects are destroyed.

CHAIN F

Chains the source from file F.

to the top


11 - ERRORS MANAGEMENT

Mode TRACE: examine the execution in a trace file.

TRACE_ON F

Starts the mode trace and creates the text file F.

TRACE_OFF

Stops the mode trace and closes the text file F.

Jumps if an error happens.

ON_ERROR_GOTO L

If error, jumps to the part of program which begins by "L:"

OFF_ERROR_GOTO

Cancels the command ON_ERROR_GOTO.

Error description.

ERROR_FRENCH

Chooses French as error description language.

ERROR_ENGLISH

Chooses English as error description language.

ERROR_LINE

Returns the error line number.

ERROR_NUMBER

Returns the error number.

ERROR_TYPE$

Returns the error type.

to the top


12 - CLIPBOARD MANAGEMENT

CLIPBOARD_STRING_COPY S Copy to the clipboard the string expression S.
V$=CLIPBOARD_STRING_PASTE Paste the text of the clipboard to the string variable V$.

to the top


13 - ARCHIVE

ARCHIVER_ON

Starts archiver

ARCHIVER_OFF

Stops archiver

ARCHIVER_ADD D, F

Archives the files of directory D to file F

ARCHIVER_EXTRACT F, D

Extracts the archive file F to directory D

to the top


14 - MAIL

MAIL_SEND A,S,B

Sends an e-mail of subject S and body B to the address A

to the top


15 -SYSTEM INFORMATION

VERSION$

Returns the version of Panoramic.

SYSTEM$

Returns the current used system (Windows, Android, MACOS).

ENVIRONMENT$ Returns the used environment utilisé (Classic, Multiplf).
NUMBER_TICKS Returns the number of milliseconds elapsed since the system is started.

to the top


16 - CREATE STAND-ALONE EXECUTABLE FILES

File / Executable (exe): To create a stand-alone executable file (.EXE)
File / Application (exe): To create a stand-alone executable file (.EXE) with your files TXT and BMP

To use such files, it is not necessary to own PANORAMIC.

You can distribute freely your own standalone executable files without any royalty.

to the top


Last update: January 21, 2017