[FRAME]
[News] [Introduction] [Tools] [Magic] [GET.DLL] [Button_types] [NETGET.DLL] [NTGET.DLL] [TSEGET.DLL / MFGET.DLL [MAILGET.DLL] [PHONEGET.DLL] [RESGET.DLL] [Identifier] [MGPROC.DLL]
News
Introduction
Introduction |
Magic (http://www.magic-sw.com/) if a fantastic tool.
Usually, you don't need external tools. But it isn't perfect, it sometimes
lacks of Windows specific functions (as the engine targets several OSs and
databases). GET.DLL tries to extend Magic functionalities under Windows, and
NETGET.DLL adds network functions. |
Utilization |
This functions mostly use the
Call UDP Magic operation (or the UDF function). The
following functions are designed to be called from the Magic wrapper provided
in the Demo application. When a function returns a string, a buffer of 260
bytes is assumed. It means you must have a 260 char string, in order to ensure
memory integrity : use of the provided Magic wrappers are strongly recommended.
You'll often need a valid window handle, which is returned by the magic WINHWND function ; the Open Task Window setting must be set
to Yes. |
Compatibility |
The target platforms are Magic V7 and V8,
under Windows 95/98, Windows NT (4), but a few functions (internet functions or
GUI functions for instance) need ie3 or even ie5. Some functions may work on
Win32s or Win NT 3.51. |
License |
GET.DLL package is free. Like anything that
is free, you get no warranties. But if you find a bug, I'll try to correct it
rapidly ; and if I stop developments of this utility, I'll post the C source
code. Please link to GET.DLL page. |
Suggestions |
Suggestions (and bug reports) are welcome ;
send a mail at dominique@mggen.com. |
Name |
Why does this tool name GET.DLL ? The first
function i wrote was a wrapper for GetUserName, the
first following functions also began by GET, et voilà. |
Dependencies |
You can use NViewLib.dll (http://freeware.freeservers.com), to load
bitmaps in jpeg, pcx, ... formats. If this DLL
is present, it will be used and active in all functions that need a bitmap. Some function have been extracted from
SNIPPETS, a collection of freeware and public domain C/C++ sources. |
Function sample |
This part describe the purpose of the
function. The title is the "function name". You will use the Call UDP operation (or the UDF function). The
parameters follows this description. |
1 |
L |
This is the first parameter. Type is L, it
means that's it's a numeric (long integer) value. |
2 |
A |
This is the second parameter. Type is A, so
it's a string. If it's a return value, then a minimum size of 260 is
assumed. |
3 |
D |
This is the third parameter. Type is D, it's
a float. |
4 |
M |
This the 4th parameter. Type is M, it's a
long integer like L, but the attended parameter is a Magic Date. |
- |
L |
If it's an UDF, then
you'll find here the explanation of the return value. |
Know Bugs |
The list of know bugs is maintened on the Web
site (History Tab). |
Tools
Cross Reference Printing |
Magic Cross Reference Print is a program that
prints Magic Cross Reference result (Ctrl-X), by looking at the screen. It
requires IE explorer, as it outputs Microsoft proprietary HTML and launch IE
for printing. |
1 |
|
It has to be installed as a desktop shortcut
with and associated keyboard shortcut (I suggest Ctrl+Alt+X). Then do a Ctrl-+
has usual, and use ctrl+Alt+X to print the result. |
2 |
|
This tool is shareware and is a separate
download. |
Image button tool |
This tool lets you design the 4 states bitmap
that Magic uses for bitmap buttons. It's made in Magic, it uses GET for button
display and for save the button as a bitmap (bmp) or in the clipboard. You
should use an image tool to reduce colors, size, and converting to a better
format. |
Resource DLL creation |
This is an interface for LCC-Win32 (http://www.cs.virginia.edu/~lcc-win32),
which helps you to make a resource-only DLL which lets you use a single file
for all your resources (bitmap, icons and cursors). You can use in Magic the
@"DLL"."Resource name" format for bitmap controls. |
Phone.exe |
Phone is a command line interface to the
Windows phone dialer. Syntax is phone "phone number" "name". |
Text File to Magic Program |
Create a Magic program (Magic V7 export, so
you can import it from any upper version) that exports the specified text file.
It's usefull to embed external files (a .bat or .txt file for instance) in the
Magic CTL, so it is self-contenaid. |
Magic
I add some comments about some Magic functions, that were added by Magic for
extension DLLs use.
Magic function :UDP |
UDP stands for User Defined Procedure. This
type returns nothing, but the parameters can be modified. This is one of the 13
Magic operations (The 'UDP' option of the Call operation). The UDP operation
has been updated in Magic 8.2 to allow use of standard DLLs. In this case, the
DLL name is preceded by an @, and the second parameter is a string that
describes the function parameter types, but presented functions still use the
Magic way. |
Magic function :UDF |
UDF stands for User Defined Function. This
type returns a value, but the parameters can't be modified. UDF is a magic
function, that takes as first parameter 'DLL.Function', where DLL is the DLL
(for instance get or netget), and Function the function name. Since Magic 8.2,
the <B>calldll</B> function lets you call standard DLLs. |
Magic function :WINHWND |
This function returns a window handle. A
window handle identifies uniquely a window, and this value is needed for a lot
of Windows functions. A magic task has a window handle if the "open task
window" is set to "Yes". |
1 |
L |
A number representing a generation. 0 for
the current task, 1 for the parent task. |
Magic function :CTRLHWND |
This Magic 8 function returns the window
handle of the specified control. For V7, you can use the
get_handle function. |
1 |
A |
The control name. Edit control are not
supported |
Magic function :STRTOKEN |
This Magic 8 function deals with characters
separated lists. I have made some lists functions
to make this function work like i wanted, and to add
other functions to deal with lists. |
1 |
A |
List. |
2 |
L |
Token to extract. |
3 |
A |
Delimiters String. |
Magic function :CALLDLL |
CALLDLL is a Magic 8.2 function that lets you
call standard DLLs. |
Magic function :FLWMTR |
This Magic function appends a User Message in
the Monitor. I provide the equivalent in GET.DLL :
OutputMonitor will allow logging from the DLL. |
1 |
A |
Message. |
2 |
L |
Logical : 'TRUE'LOG to continue, 'FALSE'LOG
to wait for next operation. |
Magic function :Magic INIPUT |
Magic INIPUT puts a value in the Magic.ini.
You should not use iniput for the Magic.ini, as the
Magic.ini has a different behavior than a normal .ini (if it is resident, it is
not updated directly but only when Magic ends ; in case of long lines, the line
in the Magic.ini is breaked in several lines - with an ending +). |
1 |
A |
'[Section]Variable=Value', or if you want to
keep special signs '[Section]Variable=*Value'. |
GET.DLL
GET.DLL is a general purpose DLL. Some functions (under the "subclassing"
menu), have to be loaded only one time, then change the behavior of some Magic
controls : buttons,
sliders and tables, edit caret,
check boxes, combo boxes, status bar, the magic 8 top right
bitmap. You'll be able to get environment
variables, printers list ; print a file using
the Window spooler (print_file) (a must for
text-based printing, multi page printing, ...), ...
get.get_env_var (UDP) |
List (, separator) of environment variable.
You can use get_env to retrieve the value of a
variable. |
1 |
A |
List (Buffer of 5000 bytes). |
get.get_env (UDP) |
Get an environment variable. |
1 |
A |
Environment variable (for TEMP and windir variables, look at get_temp and get_windir. |
2 |
A |
Environment value (buffer of 260 bytes). It
return an empty string if the 260 buffer isn't enough. |
get.get_temp (UDP) |
Return the temporary path. This function has
been modified to assure the returned path is correct : the path existence is
checked, the current folder is ignored if possible. It uses : the Windows API,
then the %TMP% environment variable, the %TEMP%, the local application data
path (replacing the last path by Temp), and as last path the current dir. |
1 |
A |
Path (buffer of 260 bytes). |
get.get_dir (UDP) |
Return the current (startup) dir of the
application. You can modify this value(set_dir). |
1 |
A |
Path (buffer of 260 bytes). |
get.set_dir (UDP) |
Set the current application folder. You can
get the current folder with get_dir. |
1 |
A |
Folder. |
get.get_exe (UDP) |
Return the name of the magic executable. You
can use split_path to retrieve the Magic directory.
It determine if the MCF is launched from development or runtime. |
1 |
A |
Exe name with path. (buffer of 260
bytes). |
get.get_windir (UDP) |
Return the Windows path. This path is
different for each users if a shared windows (or Citrix) is set. |
1 |
A |
Path (buffer of 260 bytes). |
get.get_sysdir (UDP) |
Return the System path. |
1 |
A |
Path (buffer of 260 bytes). |
get.get_special_folder (UDP) |
Return the folder of specials folders. |
1 |
A |
Type : Desktop,Fonts,My
Documents,Programs,Recents,Send To,Start Menu,Startup,Templates or Values (for
the list of types). |
2 |
A |
A folder. |
get.get_username (UDP) |
Return the user name. |
1 |
A |
User name (buffer of 260 bytes). |
get.get_computername (UDP) |
Return the computer name, as set in the
"identification" tab of the network control panel. |
1 |
A |
Computer name (buffer of 260 bytes). |
get.get_separator (UDP) |
Get the Windows international settings. Can
be used to change Magic settings. |
1 |
A |
Decimal separator (Alpha 1). |
2 |
A |
Thousand separator (Alpha 1). |
3 |
A |
Date separator (Alpha 1). |
4 |
A |
Time separator (Alpha 1). |
get.set_separator (UDP) |
Set the Windows international settings,
according to Magic settings for instance. |
1 |
A |
Decimal separator (Alpha 1). |
2 |
A |
Thousand separator (Alpha 1). |
3 |
A |
Date separator (Alpha 1). |
4 |
A |
Time separator (Alpha 1). |
get.get_os (UDP) |
Return OS version. |
1 |
A |
Windows 95 or Windows NT |
2 |
D |
Version number (4.10 for Windows 98) |
3 |
A |
Supplementary information : a, b, c for
Windows 95 ; service pack for Windows NT. |
get.get_colors (UDP) |
Return the color depth. |
1 |
L |
Number of bits per pixel. |
get.get_resolution (UDP) |
Return resolution. |
1 |
A |
A letter to specify the wanted value : S
(screen resolution),A (maximum client zone),B (Menu bar),M (Menu height),E
(border size),. (Maximum Window size) |
2 |
L |
Width. |
3 |
L |
Height. |
get.get_font_size (UDP) |
Return the font setting (in DPI) |
1 |
L |
Font DPI. 96 stands for "small font", 120
for "large font". |
get.is_remote_session (UDP) |
Check if the current session is a remote TSE
session. |
1 |
A |
Return 'Yes' or 'No' |
2 |
A |
Option, unused (use '') |
get.get_printers (UDP) |
Return a list (that can be used in a combo
box picture expression) of all local printers defined in Windows, and the
default printer. On NT, it will also return the network printers in the
\\PrintProvider\Printer format. |
1 |
A |
Default printer (buffer of 260 char
required). The default printer is the value from the "device" variable of the
"windows" section, before the first ','. wininiget can
get this value. |
2 |
A |
List of printers (buffer of 5000 required).
Send "NULL" if you only want the default printer. The buffer size can be
changed with the _set_prn_buffsize
function. |
get._set_prn_buffsize (UDP) |
Set the size of the return buffer of the get_printers function, because the default 5000 size
may be insuffisant, especially on NT Terminal Server or Metaframe. |
1 |
L |
The size of the Magic virtual that stores
the result of get_printers. |
get.get_printer_margin (UDP) |
Get the printer left and top margins. |
1 |
A |
Printer name. |
2 |
A |
Unit : 'Centimeter' or 'Inch'. Default is
'Inch'. |
3 |
D |
Left margin. |
4 |
D |
Top margin. |
get.get_printable_size (UDP) |
Get the printer printable aera. |
1 |
A |
Printer name. |
2 |
A |
Unit : 'Centimeter' or 'Inch'. Default is
'Inch'. |
3 |
D |
Width. |
4 |
D |
Height. |
get.get_printer_info (udf) |
Get information from a printer
identifier. |
1 |
A |
Printer. |
2 |
A |
Which information to retrieve : ServerName,
PrinterName, ShareName, PortName, DriverName, Comment, Location, SepFile,
PrintProcessor, Datatype, Parameters, Jobs, PPM, Copies, Colors, Orientation,
Duplex, PrintQuality, Bin (Number of current bin), BinName (name of current
bin), Bins (Magic list), BinNames (names of bins), Error (List of error :
Error,Paper Jam,Paper Out,Paper Problem ,Output Bin Full ,Not available ,No
Toner ,Out of Memory ,Offline,Door Open ,Page Punt), Status : same items than
in Error and items from this list (Paused,Pending Deletion,Busy,Initializing,IO
Active,Manual Feed,Printing,Processing,Toner Low,User
Intervention,Waiting,Warming Up,Power Save,Status Server Unknown),
FirstStartingTime : YYYYMMDDHHMMSS date (The starting date/time of the current
job in the spooler). |
- |
A |
Information. |
get.set_printer_info (udf) |
Modify Windows default setting of the
specified printer. For orientation, use
set_prn_orient, to put the printer online, use
set_prn_online. Note that the setting is not always immediatly taken by
Magic. I recommend to use duplicate_printer
then this function if you want to use several paper bins for instance. |
1 |
A |
Printer. |
2 |
A |
Option. See bellow for the list. |
3 |
A |
Value to set depending on option : 'Duplex'
: 'S'implex, 'V'ertical or 'H'orizontal ; 'Copies' : number of copies to print
; 'Bin' : number of paper bin to set ; 'BinName' : paper bin name ;
'PrintQuality' : 'D'raft, 'L'ow, 'M'edium or 'H'ight ; 'Resolution' : number of
dots per inch ; 'Collate' : 'Y'es or 'N'o. |
- |
L |
0 for error, a non-zero value for
success. |
get.print_file (UDP) |
Print a binary (or ascii) file using a
Windows printer queue, but bypassing the driver. It's some kind of copy /b
"file" prn, but you can use a network printer, and don't need to call a DOS box
(that's not really stable, and performance costly). Principal utilization is to
send PCL or Postscript code to a printer. I've done this to send an etiquette
code to a network thermal printer. Another utilization can be to delay a
printing, to print several copies : if you print via Magic to a file, you can
send this file to the printer later or several times. |
1 |
A |
File name. It's used as the print job name.
The file name must have a format that the printer understand (it must be PCL
for a PCL printer, ...) |
2 |
A |
Printer name, as found in the Windows
printers folder. If this value is not set, then the default printer is
used. |
3 |
L |
Return value. 1 means the spooler has
accepted the job. 0 stands for an error (file does not exist, printer does not
exist...) |
get.print (UDP) |
Print a file according to his extension. It
does the same thing than the print context menu in explorer, ie it uses the
associated application with the correct switch (/p for instance) to print to
default printer. Use the set_default_printer
function to choose the printer. |
1 |
A |
File name. If extension is .rtf, it will use
wordpad or your word processor ; if extension is .txt, it will use notepad ; if
extension is .html, your browser will print it. |
get.printto (UDP) |
Similar to print but you
can choose the printer. This protocol must be supported for the specified file
(and fewer extensions supports this protocol, .html and .pdf should however
work, althought .html shows a dialog box). Behaviour depends of the
application. |
1 |
A |
File name. |
2 |
A |
Printer name, as found in the printer
folder. |
get.set_prn_orient (UDP) |
Change orientation for a printer. It changes
the Windows settings. It's not mean to replace the Magic functionality (from
V7.10e) ; it's rather a companion for the print
function. |
1 |
A |
Printer name, as found in the Windows
printers folder. |
2 |
A |
Orientation (P)ortrait or (L)andscape. Alpha
1. |
get.set_prn_online (UDP) |
Set back to online a network printer that is
in "work offline" mode. This mode is only supported on W9#. |
1 |
A |
Printer name. |
get.set_default_printer (UDP)
|
Set the Windows default printer. Useful with
the print function. See http://www.mggen.com//ds/print.htm on
how to change the printer queue by code for Magic printing. |
1 |
A |
Printer name. |
get.duplicate_printer (UDP) |
Duplicate an existing printer, with the same
parameters, that you can alter with
set_printer_info for instance. |
1 |
A |
Printer to duplicate. |
2 |
A |
New printer name. |
get.set_jobs (udf) |
Apply an action to items in the printer
spooler. |
1 |
A |
Printer. |
2 |
A |
Action : 'Delete', 'Resume', 'Paused', or
Restart. |
- |
L |
Number of jobs modified, -1 for error. |
get.max_win (UDP) |
Maximize the specified window. Note that if
another window (child = no) gains focus, the window is restored. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.fill_win (UDP) |
Resize the specified window in order to fill
the parent client zone, or the desktop if it's a top level window. In case of
window with no border, it resizes a little less to deal with eventual
sliders. |
1 |
L |
Window handle, usually returned by WINHWND magic function or the
get_top_window function. |
get.min_win (UDP) |
Minimize the specified window. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.rest_win (UDP) |
Restore the specified window. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.center_win (UDP) |
Put the specified window on the center of his
parent window, or on the center of the desktop if it's a top level window. |
1 |
L |
Window handle, usually returned by WINHWND magic function or the
get_top_window function. |
get.close_win (UDP) |
Close the specified window. It acts like if
you push the close button X (even if there is no X button). It's sometimes
difficult (impossible ?) to know how much kbput('CLOSE'ACT) you must send to
close the wanted window. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.small_title (UDP) |
Set the specified window as a tool window
(the title bar is smaller, and has only a close button). |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.activate_win (udf) |
Activate the specified (by his title) window.
You can send keyboard macro to this window using kbput. A
similar function with as parameter a window handle exists : show_win. |
1 |
A |
Window title. If it's blank, then the Magic
window is used, otherwise the get_top_window
function is used to retrieve a window handle. |
- |
L |
The return value is 0 for error, and the
window handle if success. |
get.get_size (UDP) |
Return size of a window. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
Width. |
3 |
L |
Height. |
get.get_client_size (UDP) |
Return size of a window client zone. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
Width. |
3 |
L |
Height. |
get.Menus |
Some function to deal with context and
pulldown menus. Note that Magic refresh completly the menu when a MNUSHOW is
issued, so you may have to call the GET.DLL function another time. |
get.show_context (UDP) |
Show context menu. |
1 |
L |
Handle of the windows you want to display
the context menu. It's WINHWND(0) for the current task,
or use get_mdi to display the default context menu. |
get.select_menu (UDP) |
Select a pulldown menu item. The select_context_menu deals with context menu, but
sadly doesn't accept a good menu specification. |
1 |
L |
A valid window handle. |
2 |
A |
The menu specification, as returned by the
Magic MENU function : ';' separated list of menu items. Note that the MENU
function returns a string in the development language, and that i need the
string translated in the current Magic language. |
get.select_context_menu (UDP)
|
Select a pulldown menu item : this function
calls the show_context function and send 'Down' and
'Rght' keys as specified. The select_menu function
deals with the Magic menu and has a far better interface. |
1 |
L |
Handle of the window, like in show_context. |
2 |
A |
List of keys to simulate : (Number of 'Down'
keys);(Number of 'Rght' keys);... For instance, 2;3;2 will issue 2 'Down', 3
'Rght' and 2 'Down'. |
get.set_bmp_menu (UDP) |
Add a bitmap to a pulldown menu item. This
function is an evolution of
set_bitmap_menu. |
1 |
L |
A valid window handle, usually returned by
WINHWND magic function. |
2 |
A |
The menu specification, as returned by the
Magic MENU function : ';' separated list of menu items. Note that the MENU
function returns a string in the development language, and that i need the
string translated in the current Magic language. |
get.set_bitmap_menu (UDP) |
Add a bitmap to a menu item. set_bmp_menu provide a better interface. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
Menu number (from 0). |
3 |
L |
Sub menu number (from 0). |
4 |
A |
A bitmap
identifier. |
get.menu_separator (UDP) |
Remove unuseful separators left after rights
has removed : first and last separators, duplicate separators. Note that the
MNUSHOW function redraws the menu. |
1 |
L |
A valid window handle, usually returned by
WINHWND magic function. |
get.change_menu (UDP) |
Replace a menu title by another one. Note
that the MNUSHOW function redraws the menu. |
1 |
L |
A valid window handle, usually returned by
WINHWND magic function. |
2 |
A |
The menu specification, as returned by the
Magic MENU function : ';' separated list of menu items. Note that the MENU
function returns a string in the development language, and that i need the
string translated in the current Magic language. |
3 |
A |
New menu title. |
get.init_getmenu (UDP) |
Init menu function. Call
this function from your sartup program. |
1 |
L |
Valid window handle. |
get.menu (udf) |
Similar to Magic MENU() function, it also
works with system menu (when a menu item calls a user action for instance). You
must launch once init_getmenu. |
- |
A |
Menu path, ';' separated. |
get.set_wallpaper (UDP) |
Set the Windows wall paper. The Magic wrapper
offers more (undocumented in API) options. |
1 |
A |
.bmp file name. |
get.launch_screen_saver (UDP)
|
Launch the screen saver. |
get.set_scrsvr (UDP) |
Activate/Desactivate the Windows screen
saver. It often is a good idea to desactivate an OpenGL screen saver on an NT
server box. |
1 |
A |
ON or OFF |
get.screen_saver (udf) |
Screen saver operation. |
1 |
A |
Operation : 'ReadDefault', 'WriteDefault',
'Run', 'Configure', 'Install'. |
2 |
A |
Screen saver fully qualified file name,
except for 'ReadDefault' where it's blank. |
- |
A |
Screen saver fully qualified file name for
'ReadDefault', for other it's blank. |
get.screen_resolution (udf) |
Set the screen resolution. It may need a
reboot. The best possible frequency is choosen. |
1 |
L |
Width. |
2 |
L |
Height. |
3 |
L |
Depth. Optionnal, if 0 the best color depth
available will be taken. |
- |
A |
Return value. If this value is blank, it
indicates there is no error, it may be "Reboot", it means the PC must be
rebooted. Other strings are errors : Invalid parameters, Error display driver,
Unsupported graphic mode, No rights, or Error. |
get.help (UDP) |
Display help. Magic help is pretty good, but
I wanted to have different help according to a selected item in a list
box. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Help filename. |
3 |
A |
Command
(Context,Contents,Setcontents,Context Popup,Key,Command,Force file,Finder,Help
on Help or Quit). |
4 |
A |
Key. |
get.drop_combo (UDP) |
Simulate a key press to open a combo box. Can
be used to use the standard Magic zoom action : make a program that just call
this function, and use it as the selection program for all combo boxes. |
get.set_autodrop (UDP) |
Automatically drop down all combo boxes on
focus. |
1 |
L |
A combo box control
handle. |
get.unset_autodrop (UDP) |
Remove the auto drop of combo boxes. |
get.kbput (UDP) |
The function aims to behave like an extended
KBPUT, and has been developed for GET.DLL internal needs. You should use this
function (with 'Alt+D' as parameter) in replacement of alt
function (with 'D' as parameter). It works on context menus, or even on another
application (activated by activate_win) ; Magic
KBPUT works only in Magic. Note that previously added delais have been
removed. |
1 |
A |
Look at Magic keyboard shortcuts for the
syntax. This chain is case sensitive. All Magic shortcuts are supported, plus
the Alt+Letter shortcut, and the lWin and rWin (left and right Window key). You
can now precisse several keys, use '<Key1><Key2>'. Note that you
can use KBD constants, such as 'Down'KBD as it is interpreted as
'<Down>'. |
get.alt (UDP) |
Send a ALT+"LETTER" keystroke. Look for press_key for a more general function. |
1 |
A |
Letter. |
get.press_key (UDP) |
This function sends a keystroke. kbput can send several keystrokes. |
1 |
A |
A keystroke. |
get.wait_window_idle (UDP) |
Wait for the specified Windows so that it
doesn't use CPU. This function is NT/2000/XP specific, under previous vesion it
just wait the specified time |
1 |
L |
Valid Windows Handle |
2 |
L |
Maximum CPU before the function return |
3 |
L |
Timeout in seconds |
4 |
L |
Return the delay waited. |
get.ins_mode (UDP) |
Set the insertion mode to INS (insert) or OVR
(overwrite). |
1 |
A |
INS or OVR. |
get.set_task_keys (UDP) |
This function enable or disable CTR-ALT-DEL
and ALT+TAB, althought compatibility with all Windows platforms should be
verified. |
1 |
A |
ON (enable) of OFF (disable CTR-ALT-DEL and
ALT+TAB). |
get.print_screen (UDP) |
Send screen capture to clipboard. |
1 |
L |
0 (Focus windows) or 1 (Full screen). |
get.stop_input (UDP) |
Disable input key/mouse, except the esc key.
The esc key can be trapped from the magic task action list, so you can ignore
it, or ask for a confirmation. You can also allow mouse input on a button with
set_input_option. |
get.allow_input (UDP) |
Stop ignoring inputs. (see stop_input function). |
get.stop_mouse (UDP) |
Disable mouse input. |
get.allow_mouse (UDP) |
Enable back mouse input after a stop_mouse. |
get.set_input_option (UDP) |
Set an option for
stop_input funtion. |
1 |
A |
'InputWindow' |
2 |
A |
Windows handle (as string) of the button
where you want to mouse action to be allowed (a 'Stop' button for
instance). |
get.set_enter_tab (UDP) |
Use the keyboard ENTER key as TAB key. This
function can also activate the context menu key, and convert the DOT key to
COMMA key. Parameters are is bit confuse, it's for backward compatibility
reasons. |
1 |
A |
A 3 letters parameter : the first letter can
be 'Y' (transform the numeric keypad ENTER to TAB) 'N' (transform ENTER keys to
TAB) or 'X' (don't transform ENTER key to TAB), the second is 'Y' (if you want
to use the CONTEXT MENU key) or 'N', and the last is 'K' (use keypad DOT key as
COMMA key), 'B' (use all DOT keys - it doesn't convert a combined key, such
<Shift+;> - as COMMA), or 'N' (don't transform DOT key). |
get.unset_enter_tab (UDP) |
Unset the keyboard translation set by set_enter_tab. |
get.Dialog boxes |
GET.DLL provides just about all the standard
Windows dialog boxes. |
get.message_box (UDP) |
Display Windows standard dialog box. It's a
modal window, ie it gets all inputs. To send such a message box at another
user, you can try message_box1 and send_message. |
1 |
A |
A string that specify buttons :
ABORTRETRYIGNORE, OKCANCEL, RETRYCANCEL, YESNO, YESNOCANCEL or OK |
2 |
A |
A string that specifies the icon :
EXCLAMATION, WARNING, INFORMATION, ASTERISK, QUESTION, STOP, ERROR, HAND or
nothing. |
3 |
L |
Default button (the first button is 1). |
4 |
L |
Window handle, usually returned by WINHWND magic function. |
5 |
A |
Message. |
6 |
A |
Title. |
7 |
A |
Return value : the text of the button that
was pressed. |
get.message_beep (UDP) |
Play a sound, according the Windows
setting. |
1 |
A |
A string that specify the system sound to
play : ICONASTERISK,ICONEXCLAMATION,ICONHAND,ICONQUESTION,OK or SPEAKER. |
get.flash_magic (UDP) |
Flash the Magic window, until it gains
focus. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.fld_browse (UDP) |
Display a dialog box to choose a folder, by
default, it is positionned on the specified folder. Under recent Windows
versions, a "Create Folder" button is added. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Return value (260 bytes buffer). This is
also the default selected folder. |
get.computer_browse (UDP) |
Display a dialog box to choose a computer
name. You can get the local computer name by
get_computername. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Return value. |
get.net_printer_browse (UDP) |
Display a dialog box to choose a printer in
the domain. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Printer name. |
get.file_open (UDP) |
Display the Windows standard file open
dialog. This function is more complete than the Magic one, as you can specify
the default folder. The dialog doesn't have any icon anymore, but it does show
the left icons when available. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Default path. |
4 |
A |
Filter. The format is
'Title|*.ex1;*.ex2|Title 2|*.*'. |
5 |
A |
Return. If the cancel button is pressed, it
returns blank. This behavior has been changed in the Magic wrapper. |
get.avi_open (UDP) |
This function is similar to file_open, but you can preview the .AVI files in this dialog
box. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Default path. |
4 |
A |
Filter. The format is for instance 'Avi
files|*.avi|All|*.*'. |
5 |
A |
Return. If the cancel button is pressed, it
returns blank. This behavior has been changed in the Magic wrapper. |
get.file_save (UDP) |
Display the Windows standard file save
dialog. The dialog doesn't have any icon anymore, but it does show the left
icons when available. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Title. |
3 |
A |
Default path. |
4 |
A |
Filter Filter. The format is
'Title|*.ex1;*.ex2|Title 2|*.*'. |
5 |
A |
Return. If the cancel button is pressed, it
returns blank. This behavior has been changed in the Magic wrapper. |
get.choose_color (UDP) |
Display the standard choose color dialog.
Useful to generate magic color settings, or as a tool for a few GET functions.
You can choose personnalized colors, they will remain the same during the
session. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Return a color_identifier in 00BBGGRR
format. |
get.choose_font (UDP) |
Display the standard choose font dialog. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Face name. |
3 |
L |
Font Size. |
4 |
A |
String with : (B)old, (I)talic, (U)nderline,
(S)trikeout. |
get.get_ico (UDP) |
Icon choose dialog box. |
1 |
L |
Parent windows handle. |
2 |
A |
Icon, in the "file","index" format (see icon identifier). |
get.disk_copy (UDP) |
Display the standard disk copy dialog |
get.disk_format (UDP) |
Display the standard disk format dialog. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Disk, usually 'A:\'. |
get.set_cursor (UDP) |
Change the Magic cursor. Use it within the
provided Magic wrapper, which list all control types you want to change the
cursor. Magic 8.2 now offer a similar function, but here you can choose the
cursor. |
1 |
L |
A window handle. |
2 |
A |
A cursor_identifier. |
get.stcrsr (UDP) |
Change the Magic cursor. I think the set_cursor function is better. |
1 |
A |
A cursor_identifier. |
get.set_class_cursor (UDP) |
Change cursor of a certain type of control. A
few Magic wrapper are provided to change the edit, button or check box
controls. |
1 |
L |
A window handle of the chosen control
type. |
2 |
A |
A cursor_identifier. |
get.move_cursor (UDP) |
Move the mouse pointer to the specified
position in the specified window. A Magic wrapper shows an example of putting
the cursor on the center of a button. |
1 |
L |
Window handle. |
2 |
L |
X. |
3 |
L |
Y. |
get.get_cursor_pos (UDP) |
Return cursor position in pixel in specified
window. To convert to Magic , you can calculate the size of the Magic unit
(that depends on the font), by using
get_client_size to retrieve window size in pixel, and compare to the size
set up in the screen properties. |
1 |
L |
Window handle. |
2 |
L |
X. |
3 |
L |
Y. |
get.hwnd_magic (UDP) |
Return the Magic window handle. |
1 |
L |
A valid window
handle. If this value is 0, it uses a different approach that is not
guarantied to work with future Magic version. |
2 |
L |
Magic handle. |
get.get_handle (UDP) |
Return a control handle. The Magic 8 CTRLHWND function is a good alternative. This function is used
in several Magic wrappers. |
1 |
A |
Class name. |
2 |
A |
Window Title. |
3 |
L |
Index of controls having the same
properties. |
4 |
L |
Parent control handle. |
5 |
L |
Control handle. |
get.get_child_window (udf) |
Get a child window handle based on his title
: useful to get a window handle of a button for instance. The Magic 8 CTRLHWND function is a good alternative, you can also use the
get_handle function. |
1 |
A |
Window title, or partial window title
(*string* to look for string in the title, *string to look for title ending by
string, or string* to look for a window title begining by string). The title
can't be blank. |
2 |
L |
Magic form handle (by
WINHWND). |
- |
L |
The handle. |
get.get_status (UDP) |
Return the handle of the status bar. |
1 |
L |
Valid window handle. |
2 |
L |
Status bar handle. |
get.get_bitmap (UDP) |
Return the handle of the Magic 8 right
bitmap. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
Bitmap handle. |
get.get_mdi (UDP) |
Return the client zone handle. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
The client zone handle. |
get.get_tb (UDP) |
Return the button bar handle. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
L |
The button bar handle. |
get.get_tips (UDP) |
Return the handle of the Magic tooltips
process. This value can be stored in the magic.ini, so you don't need to call
this function each time you want to add a tool tip (by
set_tips). |
1 |
L |
The tooltips handle. |
get.get_preview (UDP) |
Return print preview window handle. |
1 |
L |
Print preview window handle. |
get.get_top_window (udf) |
Return a top window handle, according to the
window title. This handle can be used with the following GET.DLL functions : dim_magic, center_win, fill_win, max_win,
min_win, rest_win,
close_win, get_size,
get_client_size, set_title to name a few. |
1 |
A |
Window title, or partial window title
(*string* to look for string in the title, *string to look for title ending by
string, or string* to look for a window title begining by string). The title
can't be blank. |
- |
L |
Return a window handle. |
get.get_class_window (udf) |
Return a top window handle, according to the
window class name. This handle can be used with the following GET.DLL functions
: dim_magic, center_win, fill_win, max_win, min_win, rest_win,
close_win, get_size,
get_client_size, set_title to name a few. |
1 |
A |
Window class name, or partial class name
(*string* to look for string in the name, *string to look for class ending by
string, or string* to look for a class begining by string). The class can't be
blank. |
- |
L |
Return a window handle. |
get.get_cursor_hwnd (udf) |
Return the window handle of the control
(button) under the cursor. |
1 |
L |
Window handle. |
- |
L |
Window handle of the control. |
get.Sliders and Tables |
You can transform the horizontals sliders in
progress bars, and the Magic table can have a new behavior (instead of a false
scrolling bar, it puts buttons : begin table/page up/record up, ...). |
get.use_progress (UDP) |
Replace all horizontal sliders by progress
control. If the slider height is more than is width, a vertical progress bar is
used. It may also replace vertical sliders (tables are verticals slider) by a
different look. |
1 |
L |
Window handle from a slider control. |
get.set_scroll_bar (UDP) |
Option for
use_progress function. |
1 |
L |
Vertical slider style : 0 (original), 1
(another one) or 2 (same height for the up and page up buttons). |
2 |
A |
Are tables subclassed into custom ones ? 'Y'
or 'N'. |
3 |
A |
Are horizontal sliders transformed into
progress bars ? 'Y' or 'N'. |
get.set_scroll_keys (UDP) |
Adjust the keys that GET.DLL sends when a
button is pressed on a custom scroll bar (see
set_scroll_bar). This keys must be associated with the correct Magic
Actions. |
1 |
A |
'Begin Table'ACT ; (default : 'Ctrl-Home').
This should be changed as list box controls (for instance) also use this
key. |
2 |
A |
'Previous Screen'ACT ; (default :
'PgUp'). |
3 |
A |
'Previous Row'ACT (default : 'Up'). This
should be changed as list box controls (for instance) also use this key. |
4 |
A |
'Next Row'ACT (default : 'Down'). This
should be changed as list box controls (for instance) also use this key. |
5 |
A |
'Next Screen'ACT ; (default :
'PgDown'). |
6 |
A |
'End Table'ACT ; (default : 'Ctrl-End').This
should be changed as list box controls (for instance) also use this key. |
get.set_progress (UDP) |
Replace the specified horizontal slider by
progress control. use_progress replace in one call
all horizontal sliders by progress bars; |
1 |
L |
Slider control handle. |
get._set_progress_color (UDP)
|
Adjust the GET (use_progress) progress bar color. |
1 |
A |
A color_identifier. |
get.unset_scroll_bar (UDP) |
Set the specified scroll bar as a normal
scroll bar (no special design and no progress bar). |
1 |
L |
Specify the Slider handle. Use the V8 CTRLHWND function to retrieve this value, or look at the
sample for the get_handle solution. |
get._set_slider (UDP) |
The slider use small icons to draw buttons.
This procedure allow you to alter default settings. It now also let you change
the way the button are drawed. |
1 |
A |
Icon to change : BEGIN, CENTER, END, NEXT,
PAGE_DOWN, PAGE_UP, PREVIOUS. If you specify 'GB' without second parameter, a
Windows XP like button will be designed. |
2 |
A |
An icon
identifier or a bitmap identifier of a
five-state button if 'GB' is specified. |
get.Edit field |
You can change (size, color) the edit caret,
and have a different caret for a query mode field. |
get.use_edit (UDP) |
Subclass the edit control to change the
caret. Use _set_caret to use a bitmap as the caret,
and _set_query_caret to specify a different
caret when the field is read only. |
1 |
L |
An edit handle. Use the Magic task in the
demo program, as it is quite complicated to get an edit handle : an edit become
a window only when it get focus, so the Magic task is an online program that
closes immediatly ! |
2 |
L |
Blink rate. 0 stand for normal rate. |
3 |
L |
Caret width. |
4 |
L |
Caret height. |
get._set_query_caret (UDP) |
A use_edit extension
: it can use the specified bitmap (and specified width or height) for the caret
when the edit field is read only. |
1 |
A |
Bitmap. You can use the "CARET" name for a
Magic like triangular bitmap (with size at zero). |
2 |
L |
Width. |
3 |
L |
Height. |
get._show_password (UDP) |
Show passwords in "password" edit
controls.Caret subclassing (use_edit) must be
active. |
1 |
A |
'Y' (yes) or 'N' (no). |
get.edit_color (UDP) |
Change the background color of focus edit
controls. You can retrieve Magic V6 behaviour for instance, or highlight the
focus edit. |
1 |
L |
A window handle (Use the Magic
Wrapper). |
2 |
A |
Edit in modify mode color : Blank (no
change) or a Color identifier. |
3 |
A |
Edit in query mode color : Blank (no change)
or a Color identifier. |
get.Status bar |
You can add icons, change colors and fonts,
and put some messages (including Magic internal messages) in message
boxes. |
get.set_status_proc (UDP) |
This function displays the status bar
messages in a dialog box or add a related status icon. So you have time to read
it, you read it (as you must show it), and size is more important (so you can
read which file is broken, for instance). |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
A .ini file which contains the messages to
be displayed. The section is "Include". It can be only the beginning of
messages, so you'll see all messages that also display a file name for
instance. Other parameters are documented in the sample file. |
3 |
A |
Dialog box title. Warning, Error and
Asterisk message title can be set in the ini file. |
get.adjust_status (UDP) |
Set a multi line status bar ; choose font and
colors. The set_status_proc must be loaded. |
1 |
L |
Valid Window handle. Font from this window
is used, if a font is not set in the status.eng file. |
2 |
L |
Status bar height. Minimum is the normal
height (Magic V8 only). |
get.get_status_error (UDP) |
Get last error message intercepted in the
status bar. To use this function, you should set the [Settings]HotKey in the
status.eng file, and associate to this hotkey a Ctl event that call your custom
Magic program, this program can retrieve the last error with this function. For
non interractive Magic CTLs, use the HotKey 'exit' so Magic appends the error
in the [Settings]FileName file and exit. In order for the hotkey to taken by
Magic, Magic is activated. |
1 |
A |
Error Message (Char of 1000). |
get.Check boxes |
You can add a thin (or 2D) border when check
boxes get focus. |
get.use_chk (UDP) |
Add a border to all check boxes when they
have the focus. It's more "visual".
_set_chk_style can be used to adjust border size. |
1 |
L |
A check box handle. |
get._set_chk_style (UDP) |
A use_chk
setting. |
1 |
A |
'N'o border, 'T'hin border or T'h'ick
border. |
get.Combo boxes |
You can add icons to combo boxes. You can
also control combo box drop down, look at the Keyboard and Mouse inputs section. |
get.set_combos (UDP) |
Activate the possibility (set_combo) of making icon combo boxes. |
1 |
L |
A combo box handle, in a task with a Magic
child window. |
get.set_combo (UDP) |
Tell GET.DLL that this combo is custom. |
1 |
L |
Combo box handle. This can be retrieved in
Magic V8.2 with the CTRLHWND function, and by the get_handle function. |
2 |
L |
Number of items. If it's -1, then the combo
is the printer list combo. |
get.add_combo (UDP) |
Associate the the icon to the current item.
You must call this function one for each item in the combo box. |
1 |
L |
It's the same handle that you used with set_combo function. |
2 |
A |
Icon identifier. |
get.change_button (UDP) |
Activate the global subclassing of buttons.
It changes the look of button according to its title : an (.avi animation) ai
(.ani animated icon/cursor) ic (icon) bi
(icon button) bb (bitmap button) ht, hl, HT or HL (hyperlink) bh or
ba (flat button) bo (Taligent-like) bl
(Visual look) bf (Focus) bm (Custom style)
bu bd bn (Title table
buttons) cl (Clock) bk (blinking text) cr
(color button) zl zr (zoom buttons) ml s_ (alignment of text) pl
pr (position buttons). Normal buttons are a little changed (a
black border is added when focus is on the button, to reproduce the behavior a
Dialog Box windows). And it also activates the Magic reindex dialog subclassing
(where you can close this annoying OK button). |
1 |
L |
A valid button handle. |
get.set_option (UDP) |
Set a global option |
1 |
A |
Option. |
2 |
A |
Value. |
- |
|
(no return) |
4 |
|
'hotfudge_compatibility' can be set to 'yes'
to remove GET.DLL support for styles that are also used by Hotfudge (AV: , AN:, CL:,
TV and MQ). Use the uppercase version of this
styles. |
5 |
|
'calendar_focus' can be set to 'yes'
(default 'no') to support focus on click on calendar
control. |
6 |
|
'treeview_focus' can be set to 'yes'
(default 'no') to support focus on click on Tree View control. |
7 |
|
'calendar_keyboard' can be set to 'no'
(default 'yes') to not support keyboard actions on calendar
control. |
8 |
|
'treeview_keyboard' can be set to 'no'
(default 'yes') to not support keyboard action on Tree View control. |
get.get_tree_view (udf) |
This function retrieve the last selected
value in a Tree View.
tree_view_action let you add keyboard support. |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND). |
2 |
A |
The same hotkey as the one specified in the
TV style. |
3 |
A |
Value to return : specify 'key' to return
the key, 'value' to return the displayed value, or 'list' to return a Magic
list (',' separated) of displayed value (with parents). Use 'Explorer' if you
are using TV Explorer. |
- |
A |
Return value. This value cannot exceed 2000
bytes unless you are using Magic 8.30SP7 (or upper), then it cannot exceed 5000
bytes. |
get.tree_view_action (udf) |
Add some kind of keyboard support to the
treeview control. Look at the demo for how to use it (you'll also need a pr: button). THIS FUNCTION IS OBSOLETE, there is now a keyboard
support in GET.DLL. |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND]). |
2 |
A |
The same hotkey as the one specified in the
TV style. |
3 |
A |
Keyboard action : 'Down', 'Up', 'Home',
'End', 'Rght', 'Left', 'PgDn', 'PgUp', 'Ctrl+End', 'Ctrl+Home', 'Ctrl+PgDn',
'Ctrl+PgUp', 'Back', '+' and '-'. Spelling is Magic Hot Key spelling. |
- |
L |
Return a non zero value for success. |
get.set_tree_view (udf) |
Show and select the specified item in a Tree View. The first parameters are the same than in get_tree_view. This function now also works with TV Explorer. |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND). |
2 |
A |
The same hotkey as the one specified in the
TV style. |
3 |
A |
Which index is used to find the item :
specify 'key' to return the key, 'value' to return the displayed value, 'list'
to return a Magic list (',' separated) of displayed value (with parents), or
'explorer' for the tv Explorer. |
4 |
A |
Item to select. |
- |
L |
Non zero value if the item was found. |
get.save_tree_view (UDP) |
Save Tree View state into a
file : show what node is open/close and what item is visible/invisible. |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND). |
2 |
A |
The same hotkey as the one specified in the
TV style. |
3 |
A |
Which index is used to find the item :
specify 'key' to return the key, 'value' to return the displayed value, 'list'
to return a Magic list (',' separated) of displayed value (with parents), or
'explorer' for the tv Explorer. |
4 |
A |
File destination, return format is :
<+/-><Level><Tab><Index><Tab><Visible>.
<+/-> indicates if the node is opened or closed. <Level> is the
number of parent items + 1. <Index> identifies the item, in the way
precised by the previous parameter. <Visible> is set at 1 if the item is
visible, 0 otherwyse. |
get.get_calendar_date (udf) |
This function retrieve date from a calendar control ('mc:' button style). |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND). |
2 |
A |
The same hotkey as the one specified in the
mc style. |
- |
A |
It returns 'SELECT : YYYYMMDD' if the user
has explicitly selected a date, 'DOUBLE_CLICK : YYYYMMDD' if the use has double
clicked on a day, 'DATE : YYYYMMDD' if the user has changed of view (new month
or new year), or nothing if there was nothing more to return. If MC is used, it
returns 'SELECT_RANGE YYYYMMDD-YYYYMMDD' or 'DATE_RANGE
YYYYMMDD-YYYYMMDD'. |
get.set_day_state (udf) |
Set the specified day as bold or normal
font. |
1 |
L |
Window handle of the form where is the
button (returned by (WINHWND). |
2 |
A |
The same hotkey as the one specified in the
mc style. |
3 |
M |
Date (Magic sense) to set. |
4 |
A |
State : 'On' for bold, 'Off' for
normal. |
5 |
A |
Option. Set to '' as it isn't currently
used. |
get.set__confirm (UDP) |
The
change_button function also suppress the "OK" button during reindexing.
This function set the dialog title, which may be different for each
language. |
1 |
A |
Title of the reindex dialog box. |
get.set__ok (UDP) |
The
change_button function also suppress the "OK" button during reindexing.
This function set the button title, which may be different for each
language. |
1 |
A |
Title of the button (" OK "). |
get.set__titre (UDP) |
The
change_button function also suppress the "OK" button during reindexing.
This function set the new title for the button. |
1 |
A |
Title to set the button ('NULL' close the
button, or use a style from change_button). |
get._set_text_color (UDP) |
Specify the text color of custom buttons. You
can set and use _set_button with 'N' parameter to
have normal buttons, except color text. |
1 |
A |
A color_identifier. |
get._set_hand (UDP) |
Adjust the cursor of hyperlink buttons
(hl,ht, HL, HT), as set by the change_button
function. |
1 |
A |
A cursor_identifier. |
get._set_button (UDP) |
Change all buttons to a new style. The change_button function must have been called once.
The LOCATE parameter change the behavior so that the button titles can't be set
to blank (so the title is not empry in range or locate mode).
wb and zz style are usefull with this function. |
1 |
A |
Style : C1, C2, MULTI, FLAT, NFLAT, MFLAT,
TEXTF, MOUSE, N (Windows imitation, which lets you set the color), FOCUS (Small
arrow when the button has the focus), MAGIC (V6 Demo like), BOLD (bold font on
focus), UNDERLINE (underline on focus/mouse over), LOCATE (don't change the
button title if Magic set it to blank). 'Windows' style lets Windows draw
himself the button and 'NOFOCUS' don't add a black border on focus. You can add
any button prefix or prefix combination (HL;, ...) as well as option (like
bitmap file or color indication). Beware that usual prefix combination may
append and lead to an unexpected style. |
get._set_dotdotdot (UDP) |
Activate zooming buttons if "...." is at the
end of the title (zl), or if the title is "..." (zr). The zoom cursors are also activated. |
1 |
A |
'Y'es or 'No'. |
get._set_icon_button (UDP) |
Add an icon to custom buttons (_set_button), based on their title. It can also be used as a
Magic Button Image creation tool (see Fixed_style). Advantages to the Magic way
: color is based to Windows settings, easy design, optional usage, flat style,
size may vary, and usage of keyboard shortcut (when using the "&" in the
title). The disadvantage is you have only 1 icon for the 4 states (and it's the
Magic way). You can use this for 1 icon if you use the I_
style. |
1 |
A |
.ini file. This file contain an "Left"
section, that associates title to icon (see icon
identifier). For instance "&Ok = ico\ok.ico" (so all "&OK" buttons
will have the ok.ico left displayed. The "Top" section is used to put the icon
on top of the text, the 'Right' section to put the icon right displayed. The
"Icon" section lists titles you only need a centered icon instead of the title.
You can now also use bitmap files (.bmp), by prefixing the path by ! (OK =
!c:\ok.bmp). The bitmap is a a two states bitmap : the first part is the
enabled bitmap and the second part is the disabled bitmap. |
get._set_sound (UDP) |
Play a sound when the mouse goes over a speed
button. |
1 |
A |
Wav file. |
get._set_button_bitmap (UDP) |
Replace the default Magic V6 (see bM style)
template by your own bitmap. |
1 |
A |
A 5 states
bitmap identifier. |
get._set_clock_bitmap (UDP) |
Change the default bitmap used with DIGITAL
clock (cl). |
1 |
A |
13 states bitmap (0, ... 9, AM, PM, :,
blank). ':' is a two state part (is ':' is active or not). |
get._set_zoom_key (UDP) |
Alter zr: and zl: behavior : if left blank, it double click to zoom (the drawback
is thet it then close if the task as the selection option), otherwyse it issues
the specified keyboard events. |
1 |
A |
Key, usually '<F5>', but you can use
the kbput syntax. |
get.load_colors (UDP) |
Load a Magic color table, so you can use
Magic colors (look at color identifiers). |
1 |
A |
Color table (clr_std.eng). Logical names are
not recognized by DLLs. |
get.Toolbar bitmap |
You can change the Magic 8 top right bitmap
by an icon, a clock or an animation. |
get.set_bitmap (UDP) |
Change the Magic 8 toolbar bitmap. |
1 |
A |
.avi, .ani, or .ico file, or a clock style
(cl;H:mm for instance). |
2 |
L |
A window handle. The window font is used by
the clock control. |
get.Magic Functions |
This functions deals with the Magic
window. |
get.set_title (UDP) |
Change the Magic title. Use oem_to_ansi if you don't see in the title bar what you
thought. |
1 |
A |
Title. |
2 |
L |
Window handle, usually returned by WINHWND magic function. |
get.title_clock (UDP) |
Add a clock to the title bar after the window
title. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
2 |
A |
Windows picture of a time. If the prefix dt:
is added, the date picture is searched between []. Look for GetDateFormat and
GetTimeFormat on the web for available pictures. |
get.get_title (udf) |
Return the window title of the specified
window. |
1 |
L |
Window handle. |
- |
A |
Window title. |
get.set_status (UDP) |
Display a message in the status bar. A sort
of "verify" but without the warning ; or a contextual help. oem_to_ansi can be useful. |
1 |
A |
The message. |
2 |
L |
Window handle, usually returned by WINHWND magic function. |
get.set_icon (UDP) |
Change icon of specified window type : Magic
window, or clients windows (see Magic wrappers). |
1 |
A |
An icon
identifier. |
2 |
L |
Handle of windows you want to change the
icon. |
get.set_status_icon (UDP) |
Add an icon in the status bar. You can also
use an animation (.avi). Magic V8 is needed. |
1 |
A |
An icon
identifier. The "file,number" format is not supported. It can also be a
.avi file. |
2 |
L |
Window handle, usually returned by WINHWND magic function. |
3 |
L |
0 for the first text. |
get.set_tips (UDP) |
Add a tool tips to the specified control.
Magic V8 now supports Tooltips. You can also use the tt
button style. |
1 |
L |
Handle of Magic tooltips process. It can be
obtained by the get_tips function. |
2 |
L |
Handle of the control. An get_handle can obtain this handle. |
3 |
A |
The tool tip. |
get.set_tips_option (UDP) |
Change options for all tooltips. Now works on
all Magic versions. |
1 |
L |
Handle returned by
get_tips. |
2 |
A |
'balloon' or 'multiline'. |
3 |
A |
for 'balloon', '' ; for 'multiline', maximum
width of tooltips (as an alpha char such '200'). |
get.dim_magic (UDP) |
Place the Magic screen on the screen. If the
window handle is the preview window, it will place the preview window on the
screen, if the window is not from the current process (see get_top_window), the specified window will be
placed. |
1 |
L |
Window handle, usually returned by the WINHWND magic function, the
get_preview function or the get_top_window
function. |
2 |
L |
X. |
3 |
L |
Y. |
4 |
L |
Width. |
5 |
L |
Height. |
get.set_topmost (UDP) |
Place the specified window at the top of all
other non top most windows, so this windiw is alsways visible. |
1 |
L |
Window handle, usually returned by the WINHWND magic function, the
get_preview function or the get_top_window
function. |
2 |
A |
'ON' to set the window always visible, 'OFF'
to have a normal window. |
get.big_magic (UDP) |
Make the Magic window full screen (no title
bar). Very useful for touch screens or other mono application stations. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.input_attributes (UDP) |
This function gives the same level of control
to Magic title bar than you have on Magic task title bars. |
1 |
L |
A valid window handle |
2 |
A |
Title bar ? (Y/N) |
3 |
A |
System menu ? (Y/N) |
4 |
A |
Maximize button ? (Y/N) |
5 |
A |
minimize button ? (Y/N) |
6 |
A |
(T)hin, T(h)ick or (N)o border. (Alpha
1) |
get.disable_close (UDP) |
Disable the Magic close button. |
1 |
L |
A valid handle. |
get.disable_all_close (UDP) |
Disable the close button on all windows. |
1 |
L |
A valid task window handle. |
get.enable_close (UDP) |
Inverse of
enable_all_close. |
1 |
L |
A valid task window handle. |
get.enable_all_close (UDP) |
Inverse of
disable_all_close. |
1 |
L |
A valid task window handle. |
get.get_process_id (udf) |
Return Magic process identifier. |
- |
L |
Process identifier. |
get.Print Preview |
This functions let you adjust the print
preview window : size, position, zoom factor. You should also look at the get_preview function that retrieve a preview handle, so
you can change the icon for instance. |
get.set_default_preview (UDP)
|
Set the default preview zoom factor. Call
this function only once, or each time you want to alter the zoom factor to
another one. This function use the
set_preview_zoom function, but should be used instead of it. |
1 |
L |
Default zoom factor (default is 100). |
2 |
L |
A valid window
handle. |
get.rm_print_preview (UDP) |
This function disable the print menus and the
print toolbar button, so the user can't print from the print preview window.
This let you better control to know if the printing as actually been sent for
impression to the printer driver. |
1 |
L |
A valid window
handle. |
2 |
A |
'on' to activate and 'off to
desactivate. |
get.set_preview_zoom (UDP) |
Set the print preview zoom factor. It's done
using something similar to "kpbut". This function is obsolete, please use set_default_preview. |
1 |
L |
1 to 999. |
get.show_preview (UDP) |
Try to show the print preview window, without
activating it. |
1 |
L |
Window handle, usually returned by WINHWND magic function. |
get.min_preview (UDP) |
Don't activate print preview window. Print
must have begin, before the first "output form" (ie printer must be open). |
get.Registry and Ini |
Magic is interfaced with .ini files and the
registry. As Magic uses a propriatary interface (for better performance and to
ensure portability), you shouldn't use this functions to modify or read the
Magic.ini. |
get.iniget (UDP) |
INIGET extended to all .ini files. Use INIGET
for Magic.ini. You can also use the function (udf) version
finiget. |
1 |
A |
Ini file. If the file is "win.ini", then the
wininiget function will be automatically called. |
2 |
A |
Section. if the section is blank, it returns
the section list. |
3 |
A |
Variable. If the var name is blank, it
returns the var list. |
4 |
A |
Return value (260 bytes buffer for normal
behavior, 5000 bytes for list behavior). |
get.finiget (udf) |
Udf version of
iniget. |
1 |
A |
Ini file. If the file is "win.ini", then the
wininiget function will be automatically called. |
2 |
A |
Section. if the section is blank, it returns
the section list. |
3 |
A |
Variable. If the var name is blank, it
returns the var list. |
- |
A |
Return value (260 bytes buffer for normal
behavior, 5000 bytes for list behavior). |
get.iniput (UDP) |
INIPUT extended to all .ini files. Use the Magic INIPUT for Magic.ini. For win.ini, use wininiput. |
1 |
A |
Ini file. |
2 |
A |
Section. |
3 |
A |
Variable. |
4 |
A |
Value. If this value is blank, then the
variable is deleted. |
get.wininiget (UDP) |
Read a value in the win.ini. You can also
call iniget with "win.ini" as parameter, then this
function will be called. |
1 |
A |
Section. If the section is blank, then the
section list will be returned. |
2 |
A |
Variable. If the variable is blank, then the
variable list will be returned. |
3 |
A |
Return value (260 bytes buffer, 5000 bytes
for list behavior). |
get.wininiput (UDP) |
Set a value in the win.ini. You can also call
iniput with "win.ini" as parameter, then this function
will be called. |
1 |
A |
Section. |
2 |
A |
Variable. |
3 |
A |
Value (260 bytes buffer). If this value is
blank, then the variable is deleted. |
get.regget (UDP) |
Get a value from the registry. The value can
be stored as String or a Number. |
1 |
A |
'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER',
'HKEY_LOCAL_MACHINE' 'HKEY_USERS', 'HKEY_PERFORMANCE_DATA' or
'HKEY_CURRENT_CONFIG' |
2 |
A |
Path. |
3 |
A |
Variable. |
4 |
A |
Return value (buffer of 260 is
required). |
get.regput (UDP) |
Set a value from the registry. If the string
is a number (21 fro instance), it will be stored as a number. To force a
string, use "21". If the key already exist, type is not changed. |
1 |
A |
'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER',
'HKEY_LOCAL_MACHINE' 'HKEY_USERS', 'HKEY_PERFORMANCE_DATA' or
'HKEY_CURRENT_CONFIG' |
2 |
A |
Path. |
3 |
A |
Variable. |
4 |
A |
Value. |
get.get_magic_ini (udf) |
Return magic.ini full path for the instance.
This function deals /INI= command line argument. |
- |
A |
Magic.ini full path. |
get.Folders |
This functions replace DOS commands that deal
with folder. |
get.rm_dir (UDP) |
Remove a folder. The folder must be empty. del_tree remove the folder, files and subfolders. |
1 |
A |
Folder. |
get.del_tree (UDP) |
A dos "deltree" equivalent. Remove a folder,
and all files and folders it contains. |
1 |
A |
Folder name. |
2 |
A |
Option ("US" : send file to trash, "S" :
remove file). |
get.mk_dir (UDP) |
Create a folder. If the upper folders don't
exist, they are created. |
1 |
A |
Folder. |
get.split_path (UDP) |
Split a path. |
1 |
A |
Path to split. |
2 |
A |
Disk or network name. |
3 |
A |
Folders. |
4 |
A |
File without extension. |
5 |
A |
File extension. |
get.cat (UDP) |
Concatenate files. If a file in the list
doesn't open, then it is ignored, and the concatenation continues. |
1 |
A |
Files list, the separator is |. You can put
the destination file in this list. |
2 |
A |
Files to create (it will be overwritten if
it already exists). |
3 |
L |
Return code : 0 for error, 1 for
success. |
get.shortcut_create (UDP) |
Create a shortcut (.lnk file). |
1 |
A |
Shortcut file, with complete path (you can
retrieve some useful folders with
get_special_folder such at desktop). |
2 |
A |
Shortcut description. |
3 |
A |
File to link to. |
4 |
A |
Arguments. |
5 |
A |
Working folder. |
6 |
A |
MAXIMIZE, NORMAL. ou MINIMIZE. |
7 |
A |
Icon file. |
8 |
L |
Icon index. |
9 |
A |
Hot key. |
get.modify_pif (udf) |
Set the "Close On Exit" flag of a .pif file.
The .pif file must exit, you can create a .pif with
shortcut_create. |
1 |
A |
.pif file. |
2 |
A |
Flag "CloseOnExit" or
"DontCloseOnExit". |
- |
L |
0 for error, non zero value for success (1
if the flag was already set). |
get.modify_file (udf) |
This function is designed to deal with SAP
iDoc files, in order to modify lines that have Seek1 and Seek2 strings (at
offsets and specified lengths) by the Write1, Write2, Write3 (at offsets and
specified lengths in the founds lines, if the line is wide enough). This
function returns 1 for success (one or several lines have been modified) and 0
for error (no line found, or other error). |
1 |
A |
File. |
2 |
A |
Seek1. |
3 |
L |
Offset. |
4 |
L |
Length. |
5 |
A |
Seek2. |
6 |
L |
Offset. |
7 |
L |
Length. |
8 |
A |
Write1. |
9 |
L |
Offset. |
10 |
L |
Length. If the lenght is inferior to the
lenght of Write1, then this parameter is ignored. |
11 |
A |
Write2. |
12 |
L |
Offset. |
13 |
L |
Length. If the length is inferior to the
lenght of Write2, then this parameter is ignored. |
14 |
A |
Write3. |
15 |
L |
Offset. |
16 |
L |
Length. If the length is inferior to the
lenght of Write3, then this parameter is ignored. |
- |
L |
1 for success (one or several lines have
been modified) and 0 for error (no line found, or other error). |
get.file_convert (udf) |
Convert a file. Supported operations are
conversion to and from OEM, ANSI, UNICODE. It uses
oem_to_ansi or ansi_to_oem ansi, so you can also
alter this function by using load_convert. The
conversion to unicode also add 2 bytes (the BOM) at the beginning of the file
(FFFE). |
1 |
A |
File to convert. |
2 |
A |
Destination file. If no destination file is
specified, the origin file is modified. |
3 |
A |
Operation : 'OEM_TO_ANSI', 'ANSI_TO_OEM',
'OEM_TO_UNICODE', 'ANSI_TO_UNICODE'. |
- |
L |
Return new file size if success. |
get.file_compare (udf) |
Compare 2 files. |
1 |
A |
First file. |
2 |
A |
Second file. |
- |
L |
-1 for error, 0 if files aren't identic, 1
if files are identic. |
get.replace_file (udf) |
Replace a string by another string in a file.
If you have blanks at the end of one string, then use the string identifier " :
leading " are ignored, it's mean that """ is interpreted as the "
character. |
1 |
A |
File. |
2 |
A |
String to look for. |
3 |
A |
New replacement string. |
4 |
A |
Option : 'Stop first' (to replace the first
string) or 'Replace All'. |
- |
L |
0 if error, non zero for success (-1 no
replacement item was found). |
get.rm_blank (UDP) |
Remove blank lines from a file. A blank line
is a line with nothing, or with only spaces and tabulations. Useful to clean a
file generated via an output merge (for EDI). |
1 |
A |
File. |
get.count_lines (udf) |
Count lines in a file. this function returns
-1 if there is an error. This function is usefull to display a progress
information while importing a file. The get_line
function retrieve a line by index. |
1 |
A |
File name. |
- |
L |
Count of lines, -1 if error. |
get.get_line (UDP) |
Retrieve a line from the specified file. |
1 |
A |
File name. |
2 |
L |
Line number. It must be between 1 and count_lines result. |
3 |
L |
Line maximum size. |
4 |
A |
Line from the file. |
get.get_version (udf) |
Return version information for a win32 exe or
dll. |
1 |
A |
Complete file name. If the file name is
blank, it will return informations about GET.DLL. |
2 |
A |
Information to retrieve : blank for file
version, or a string. Guidelines defines several informations : CompanyName,
FileDescription, FileVersion, InternalName, LegalCopyright, OriginalFilename,
ProductName, and ProductVersion. GET.DLL also has Comments, Email, Magic,
Web,... |
3 |
L |
You can specify here the charset to use.
Left 0 if you want to use the first one in the file. |
- |
A |
A string with the information. A blank value
is returned in case of error. |
get.get_compile_date (UDP) |
Return the date and time set be the linker
when building an executable (or DLL). You can use it to check version if a
proper version number is not set. This function uses a redistribuable DLL that
may not be present on older versions of Windows : DbHelp.dll (search on
microsoft.com). |
1 |
A |
File name. Either the complete path or only
the file if it's in the PATH environment. It will be quicker for already loaded
file, like the Magic executable or Database Gateways. |
2 |
A |
Date (string 8) in YYYYMMDD format |
3 |
A |
Time (string 6) in HHMMSS |
get.sha1 (udf) |
Return the check code from NIST's Secure Hash
Algorithm of the specified file. |
1 |
A |
File to compute. |
- |
A |
Result, in the form of '34aa973c d4c4daa4
f61eeb2b dbad2731 6534016f'. |
get.is_file_open (UDP) |
Test is a file is currently opened by a
process. Note that a file that is locked but not open will not be detected
(case of a DLL for instance). |
1 |
A |
File name |
2 |
L |
Return 0 is file is not used, 1 if file is
used. |
get.dir_init (UDP) |
Initialize a directory listing. You can do
only 1 listing once. dir_read return the next value. dir_close close the search. |
1 |
A |
Filter (260 bytes maximum). |
2 |
A |
Return file (260 bytes buffer). |
get.dir_read (UDP) |
Return next value after a dir_init. |
1 |
A |
Return file (260 bytes buffer). |
get.dir_close (UDP) |
Close the directory listing. |
get.dir2file (UDP) |
In one GET.DLL call and 2 Magic calls (one to
put the file in a blob - File2Blb - and one the load the blob into a memory
table :- MTblSet), this function list a folder like the MS-DOS DIR function,
and save the result into a file that can be loaded by Magic 9.40+ into a memory
table. In GET.DLL demo, you'll find the memory table definition (table
#14). |
1 |
A |
Filter. |
2 |
A |
Filename of the Magic 9.40+ blob memory file
result. |
3 |
A |
Option (reserved for future use). |
get.iodel (udf) |
Delete specified file(s). It extends Magic
IODEL : you can use wildcard characters. Note that this function can be
implemented throught dir_init,
dir_read and dir_close functions (and Magic
IODEL), so you can choose exactly your selection. |
1 |
A |
File(s), wildcard characters accepted.
Wildcard will match both long and short files names, so something like
'aa??????.tst' will aslo mach 'aa12345678901234.tst' as this file is also
'aa1234~1.tst'. |
2 |
A |
Options : 'before:YYYYMMDDHHMMSS',
'after:YYYYMMDDHHMMSS' to delete files last modified before or after the
specified date/time, 'recycle' to send files to the recycle bin, 'recurse' to
delete in subfolder (use with CAUTION this option !). The list of options are
',' separated. |
- |
L |
Return the number of deleted files. |
get.get_io_date (UDP) |
Get date/time information of a file. Return
value is an UTC date, so you may want to translate it to local_date_time. |
1 |
A |
File name. |
2 |
A |
Date : (C)reation, Last (W)rite, Last
(A)ccess. |
3 |
A |
Return string date (YYYYMMDD picture) |
4 |
A |
Return string time (HHMMSS picture). It
seems that the time is not relevant for the last access date. |
get.set_io_date (UDP) |
Set date/time information of a file. The
date/time is an UTC time, so you may want to translate first to universal_date_time. |
1 |
A |
File name. |
2 |
A |
Date : (C)reation, Last (W)rite. Last access
date is modified to current date. |
3 |
A |
String date (YYYYMMDD picture) |
4 |
A |
String time (HHMMSS picture). |
get.get_short_pathname (UDP) |
Return the short path name of a file. The
file must exist, as you may have a different short name depending on the
system. |
1 |
A |
Long. |
2 |
A |
Short. |
get.get_long_pathname (UDP) |
Return the short path name of a file. The
file must exist, as you may have a different short name depending on the
system. |
1 |
A |
Short. |
2 |
A |
Long. |
get.get_file_attributes (UDP)
|
Return file attributes. |
1 |
A |
File name. |
2 |
A |
A return string with attributes : a archive,
c compressed, d directory, h hidden, n normal, o offline, r readonly, s system,
t temporary. For instance, "dhs" stands for hidden system folder. |
get.set_file_attributes (UDP)
|
Set file attributes. |
1 |
A |
File name. |
2 |
A |
String with attributes : a archive, c
compressed, d directory, h hidden, n normal, o offline, r readonly, s system, t
temporary. For instance, "dhs" stands for hidden system folder. |
get.temp_file (UDP) |
This function create an empty temporary file
(you will overwritte it), that goes in the temporary folder, prefixed by ~gt
and with .tmp extension. This file will NOT be deleted at the next reboot. This
is useful when you need to make a temporary file, so you are sure that the file
name will be unique, and that in case of problem will be soon deleted. |
1 |
A |
File name (260 Char). |
get.Disks |
Function to retrieve disks and disk
informations. |
get.get_freespace (UDP) |
Return free space. Look at get_totalspace to see total space. |
1 |
A |
Disk identifier (C:\). |
2 |
D |
Free MB. |
get.get_totalspace (UDP) |
Return disk size. Look at get_freespace to see remaining space. |
1 |
A |
Disk identifier (C:\). |
2 |
D |
Total MB. |
get.get_disks (UDP) |
Return the list of disks, that can be used in
a combo box. |
1 |
A |
List of the disks. |
get.get_disk_type (UDP) |
Return the type of the disk |
1 |
A |
Disk (A:\, C:\, ...). The list of disk can
be get by get_disks. |
2 |
A |
Type (FIXED, CDROM, NETWORK,...) |
get.get_disk_name (UDP) |
Return the volume name. |
1 |
A |
Disk. |
2 |
A |
Volume name (string of 260 bytes). |
get.get_disk_serial (UDP) |
Return the disk serial number. |
1 |
A |
Disk. |
2 |
A |
Return value (9 chars). |
get.eject_disk (UDP) |
Eject a disk (CD-ROM, Zip disk, ...). |
1 |
A |
Disk. |
2 |
A |
Return value (buffer 260). Blank string if
no error, otherwyse the error in english. |
get.Date |
Some functions to retrieve the UTC date, the dow, ... NETGET.DLL
provide a function to get a date usable in web pages : to_internet_time. |
get.local_date_time (UDP) |
Convert universal date to local date. |
1 |
A |
Universal Date (YYYYMMDD). |
2 |
A |
Universal Time (HHMMSS) |
3 |
A |
Local Date (YYYYMMDD). |
4 |
A |
Local Time (HHMMSS) |
get.universal_date_time (UDP)
|
Convert local date to universal date . |
1 |
A |
Local Date (YYYYMMDD). |
2 |
A |
Local Time (HHMMSS) |
3 |
A |
Universal Date (YYYYMMDD). |
4 |
A |
Universal Time (HHMMSS) |
get.get_easter_day (UDP) |
Return the easter sunday, from a Gauss
algorithm. You can use addate to get various holidays (+1, Easter day, +39
Ascension, +50 Whitmonday) . For more explanations and date functions, look at
MGDATUTL dll from Andreas Sedlmeier, first published on the Magic User List
shared folder. Extracted from SNIPPETS. |
1 |
L |
Year. |
2 |
A |
Easter day in YYYYMMDD format. |
get.dow (udf) |
This function returns the Day Of Week, like
the Magic DOW function, but it returns the ISO-8601 day of week (monday). |
1 |
M |
Magic date. |
- |
L |
The day of week : 1 (monday) to 7
(sunday). |
get.week (udf) |
Return week number as defined in ISO-8601
(the Week 1 of any year is the week that contains 4 January). |
1 |
M |
Magic date. |
- |
A |
ISO week number from 1 to 52 or 53 and
corresponding year (YYYYWW format). |
get.date_to_bmp (udf) |
Create a 20*20 bitmap with day and month,
that can be used in the toolbar. You should set the menu as 'visible : No',
then create the bitmap, then show the menu (with Magic function MNUSHOW). For
Magic 9, you can also create a 16*15 bitmap by using 'sm_' in the file
name. |
1 |
M |
Magic date. |
2 |
A |
Bitmap file name. |
- |
L |
Dummy return value. |
get.get_timezone (udf) |
Get time zone information. |
1 |
A |
Requested value : StandardDate (format is :
'Month:MM,MDow:D,Week#:W,Time:HHMMSS', where MM is the month, D the day of week
from 0 (sunday) to 6 (saturday), W the week number from 1 to 5 (last) of the
month.), DaylightDate, StandardName, DaylightName, StandardBias (in minutes),
DaylightBias, Bias. |
- |
A |
Return value. |
get.get_date (udf) |
This function is quite unuseful, it what just
for me a test function to convert a Magic date (which is the number of days
since 01/01/0000), to something that i can use (a string date) in other
functions (dow for instance). |
1 |
M |
Magic Date (upper than 1601/01/01). Note
that a Magic date can only be used in an UDF, not in an UDP. |
- |
A |
The date, in YYYYMMDD format. |
get.magic_date (udf) |
This function is quite unuseful, it what just
for me a test function to convert from a string date to a Magic date (which is
the number of days since 01/01/0000). |
1 |
A |
String date in YYYYMMDD format. The year
must be upper than 16010101. |
- |
M |
A Magic date. |
get.wdate (udf) |
DSTR Windows function : transform a Magic
date to a string, using Windows setting. |
1 |
M |
Magic Date. |
2 |
A |
'L'ong or 'S'hort, or a Windows picture :
for instance 'dd/MM/yyyy'. |
- |
A |
Date as string. |
get.get_tick (UDP) |
Return the number of milliseconds since
Windows startup. It may be a good idea to ask user to reboot time to time (once
a day). |
1 |
L |
Milliseconds. |
get.play_wav (UDP) |
Play asynchronously a wav sound. |
1 |
A |
Sound ("file".wav or a system sound (Look
subkeys from HKEY_CURRENT_USER\AppEvents\EventLabels). |
get.sound_volume (UDP) |
Set or get wave sound volume. Volume values
range from 0 (minimum volume) to 65535 (maximum volume). |
1 |
A |
'Get' or 'Set' |
2 |
L |
Left speaker volume |
3 |
L |
Right speaker volume |
get.beep (UDP) |
Play a beep to the PC speaker. This function
emit a simple beep on Windows 9# if GET.DLL is compiled with Borland C++. |
1 |
L |
Time (millisecond). |
2 |
L |
Frequency. |
get.id3 (UDP) |
Modify or get the ID3v1 flag in MP3
files. |
1 |
A |
Action : 'Read' or 'Write'. |
2 |
A |
MP3 File. |
3 |
A |
Song (30 Characters). |
4 |
A |
Artist (30 Characters). |
5 |
A |
Album (30 Characters). |
6 |
L |
Year (size 4). |
7 |
A |
Comment (30 Characters). |
8 |
L |
Genre, from a list given
%GET%mp3_genre.dat. |
9 |
L |
Return value : 0 for error, non zero value
for success. |
get.Mathematical Functions |
A function to evaluate
mathematical formulas, as well as some binary and hexadecimal
functions. |
get.eval_exp (UDP) |
Evaluate a mathematical string. It can
receive '+', '-', '*', '/', '^', '+', '-', 'sin', 'cos', 'tan', 'abs', 'log',
'ln', 'exp', 'pi', '(', ')', and real numbers. The
num_separators function let you set the numeric separators. Spaces are
ignored. You may also want to look at
str_token_extracts and str_replace functions,
that may help you to put values in variables. |
1 |
A |
String to evaluate. |
2 |
D |
Result. |
3 |
L |
0 (error) or 1 (success). The eval_option function set the divide by zero behavior. |
get.eval_option (UDP) |
Set an option to modify
eval_exp behavior. The 'DivideByZeroError' (set to 'Y' or 'N') tell if
divide by zero is an error (math behavior) or no (Magic behavor). |
1 |
A |
Option to set. |
2 |
A |
Value. |
get.num_separators (UDP) |
Set the decimal separator ('.' is default)
and thousand separator (',' is default) for the
eval_exp function. |
1 |
A |
Decimal separator. It takes only the first
character. |
2 |
A |
Thousand separator. It takes only the first
character. |
get.num_to_hex (UDP) |
Return a string in hexadecimal format. |
1 |
L |
A number. |
2 |
A |
A string (size 8). |
get.fnum_to_hex (udf) |
Return a string in hexadecimal format (UDF version of num_to_hex). |
1 |
L |
A number. |
- |
A |
A string (size 8). |
get.num_to_bin (UDP) |
Return a string in binary format. |
1 |
L |
Number to translate. |
2 |
A |
String (size 32). |
get.fnum_to_bin (udf) |
Return a string in binary format (UDF version of num_to_bin). |
1 |
L |
Number to translate. |
- |
A |
String (size 32). |
get.hex_to_num (UDP) |
Return a number from an hexadecimal
string. |
1 |
A |
String. |
2 |
L |
Number. |
get.fhex_to_num (udf) |
Return a number from an hexadecimal string
(UDF version of hex_to_num). |
1 |
A |
String. |
- |
L |
Number. |
get.hex_to_bin (UDP) |
Transform an hexadecimal string in a string
in binary format. |
1 |
A |
Hexadecimal string. |
2 |
A |
Binary string. |
get.fhex_to_bin (udf) |
Transform an hexadecimal string in a string
in binary format (UDF version of
hex_to_bin). |
1 |
A |
Hexadecimal string. |
- |
A |
Binary string. |
get.bin_to_num (UDP) |
Return a number from an binary string. |
1 |
A |
String. |
2 |
L |
Number. |
get.fbin_to_num (udf) |
Return a number from an binary string (UDF version of bin_to_num). |
1 |
A |
String. |
- |
L |
Number. |
get.bit_and (UDP) |
Do a binary and. |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
3 |
L |
Result. |
get.fbit_and (udf) |
Do a binary and (UDF
version of bit_and). |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
- |
L |
Result |
get.bit_or (UDP) |
Do a binary or. |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
3 |
L |
Result. |
get.fbit_or (udf) |
Do a binary or (UDF
version of bit_or). |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
- |
L |
Result. |
get.bit_xor (UDP) |
Do a binary xor. |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
3 |
L |
Result. |
get.fbit_xor (udf) |
Do a binary xor (UDF
version of bit_xor). |
1 |
L |
Entry 1. |
2 |
L |
Entry 2. |
- |
L |
Result. |
get.bit_not (UDP) |
Do a binary not. |
1 |
L |
Entry. |
2 |
L |
Result. |
get.fbit_not (udf) |
Do a binary not (UDF
version of bit_not). |
1 |
L |
Entry. |
- |
L |
Result. |
get.String handling |
Altought this functions can be made in Magic,
I have added them because they are quicker and easier to use (as they are
functions, they can be used in expressions). You can remove (str_remove), replace (str_replace,
or count (str_count) a substring in a string, and
replace chars by others chars (str_translate).
There is also functions to convert between OEM and
ANSI character set. |
get.str_remove (udf) |
This UDF remove all occurrences of a string
in the first string. Return value must not exceed 5000 bytes. This function can
be done in Magic, but this one is far more quick. |
1 |
A |
String. If you have blanks at the end of the
string, then use the string identifier ". |
2 |
A |
String to remove from the previous string
(each occurrence). |
- |
A |
String (5000 bytes maxi). |
get.str_replace (udf) |
This function (UDF)
replace all occurrences of a string by another string. Result must not exceed
5000 bytes. This function can be done in Magic, but this one is far more quick.
A similar function that works on file exists :
replace_file. |
1 |
A |
String. |
2 |
A |
String to be replaced. If you have blanks at
the end of the string, then use the string identifier " : leading " are
ignored, it's mean that """ is interpreted as the " character. |
3 |
A |
String that replace the previous string. If
you have blanks at the end of the string, then use the string identifier
". |
- |
A |
String (5000 bytes maxi). |
get.str_count (udf) |
Count the appearance of a string in another
string. |
1 |
A |
String to search in. |
2 |
A |
String to count. |
get.str_translate (udf) |
This function (UDF)
translate a string in another string, using as conversion table the 2 specified
strings. |
1 |
A |
String to translate. |
2 |
A |
From string. |
3 |
A |
To string |
- |
A |
For instance, str_translate('azerty', 'az',
'ZA') will return 'ZAerty', and str_translate('azerty', 'aze', '1') will return
'1rty'. |
get.str_alpha (udf) |
Get the string that would be rendered by
Magic if the user had type the specified string with the specified format. It
is a similar function to STR, DSTR, TSTR but for strings. |
1 |
A |
String. |
2 |
A |
Format, look at Magic documentation for
detail : U for upper, L for lower, # for digit (0 to 9 only), X identical
character. It should be alsmot compatible with Magic. |
- |
A |
Result. |
get.str_to_format (udf) |
Convert a string to a format with escaped
directed characters (A, F, H, L, U, #, X and digits). It's usefull to use on a
button based on a select virtual (alpha 1, with no value) if you prefer (to
actually see button title in development) to use the format text and expression
rather than modify the virtual value. |
1 |
A |
String. |
- |
A |
Result, for instance
ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890# will return
\ABCDE\FG\HIJK\LMNOPQRST\UVW\XYZ\0\1\2\3\4\5\6\7\8\9\0\#. |
get.wordwrap (UDP) |
Transform a Magic memo into a list of items
(fixed to a maximum width). This function handles CRLF. The result is a Magic
list that can be handled with list_extract function
and similar functions. This is useful to print memos in Magic V7. |
1 |
A |
Memo field |
2 |
L |
Maximum width |
3 |
A |
Result Magic list (, separated). |
4 |
L |
Number of lines. |
get.fsoundex (udf) |
French version of SOUNDX. The soundex is an
algorithm that aims to make a phonetic representation of a name. For instance,
it will return the same 4 bytes string for 'maire', 'mer', 'mère'. The
return string is always 4 bytes, and can be used as an index when you want to
look at a name. Magic implements soundex for english only. i do it for french
only ! |
1 |
A |
Name to translate. |
- |
A |
A 4 bytes string. |
get.load_convert (UDP) |
Initialization function for the ansi_to_oem and oem_to_ansi
function. |
1 |
A |
File name. |
2 |
L |
Type of the file name : 0 stands for
standard API (file name is ignored), 1 for the GUI translation file, 2 for
Native translation file. |
get.ansi_to_oem (UDP) |
Convert from ANSI (Windows format) to OEM
(Magic uses that). The load_convert function
initialize this function. The file_convert can
convert a file using this function. |
1 |
A |
String to convert. |
2 |
A |
Return value. |
get.oem_to_ansi (UDP) |
Convert from OEM (Magic uses that) to ANSI
(Windows format) . The load_convert function
initialize this function. The file_convert can
convert a file using this function. |
1 |
A |
String to convert. |
2 |
A |
Return value. |
get.get_md5 (UDP) |
Calculate the MD5 checksum ("RSA Data
Security, Inc. MD5 Message-Digest Algorithm) as described in RFC 1321. This
function can be used as a digital siganture, it produces a 128 bit result. |
1 |
A |
String. |
2 |
A |
MD5 fingerprint in hexadecimal, a string a
32 characters. |
3 |
A |
Option (not used now). |
get.List handling |
This family of functions
deals with lists, for instance CSV lines (where texts
field are identified by a ", and separator is ,), or
Magic lists (get_disks or
get_printers return such lists) : i made wrappers for this 2 types, as they
are the main target of this functions. |
get.str_token_extract (udf) |
This function is similar to STRTOKEN, but you can also use it on Magic V7, and you can
specify a special character. Return must not exceed 5000 bytes. |
1 |
A |
String List. |
2 |
L |
Token number to find. |
3 |
A |
List separator. For
Magic lists, usual values are ',' (when you use a dynamic combo box), or
CHR(9) (to parse CSV data for instance). |
4 |
A |
Text identifier. For csv lines, it's ". It
means that a separator character between two text identifiers will be treated
as a normal character. |
5 |
A |
Special character. This character ('\' in
this case) is needed to correctly parse a combo box dynamic value : it returns
only the following character instead of the two characters. So for string like
1,2\-3,4\,5\,7,6, the tokens are 1, 2-3, 5,7 and 6. This parameter is a big
advantage to the Magic STRTOKEN function. |
- |
A |
Return list (5000 bytes maxi). |
get.str_token_count (udf) |
This function counts the number of token in a
list. For a complete description of parameters, look at the str_token_extract function. |
1 |
A |
String List. |
2 |
A |
List separator. |
3 |
A |
Text identifier |
4 |
A |
Special character. |
- |
L |
Count token. |
get.str_token_locate (udf) |
This function return the position of an item
in a list. |
1 |
A |
List. |
2 |
A |
Item. |
3 |
A |
Separator. |
4 |
A |
Text identifier. |
5 |
A |
Special character. |
- |
L |
Position of the token. |
get.str_token_insert (udf) |
This function inserts a new item into a list,
at the position following Position. |
1 |
A |
List. |
2 |
A |
Item. |
3 |
L |
Position. |
4 |
A |
Separator |
5 |
A |
Text identifier |
6 |
A |
Special character. |
7 |
A |
Table (string) of characters that must be
preceded by the special character. |
- |
A |
List with the inserted token. |
get.str_token_remove (udf) |
This function returns the list, minus the
specified (by his position) item. |
1 |
A |
String. |
2 |
L |
Position. |
3 |
A |
Separator. |
4 |
A |
Text identifier. |
5 |
A |
Special character. |
- |
A |
List without the token. |
get.str_to_token (udf) |
"Tokenize" an item, ie adds the special
character before the characters that may otherwise be interpreted. |
1 |
A |
Item. |
2 |
A |
Special character. |
3 |
A |
Table (string) of characters that must be
preceded by the special character. |
- |
A |
Token. You may want to also add a text
identifier such as ". |
get.str_token_sort (udf) |
This function returns the list in alphabetic
order. The sort algorithm is bubble sort, so it's simple and quick for small
list, and awfully slow for big lists. |
1 |
A |
List. |
2 |
A |
Sort order : 'ASC'endant or
'DES'cendant. |
3 |
A |
Separator. |
4 |
A |
Text identifier. |
5 |
A |
Special character. |
- |
A |
The sorted list. |
get.str_token_uniq (udf) |
This function removes duplicate following
items. |
1 |
A |
List. |
2 |
A |
Separator. |
3 |
A |
Text identifier. |
4 |
A |
Table (string) of characters that must be
preceded by the special character. |
5 |
A |
Special character. |
- |
A |
Return the list. |
get.str_token_extracts (udf) |
Extract all the tokens in a string. Tokens
are identified by a first character and a last character. For instance, in the
(a) + (bc) * (d) list, where the identifiers are ( and ), the tokens are a, bc
and d. It is useful to parse mathematical formulas or
path with logical names. |
1 |
A |
String to parse. |
2 |
A |
Begin character that marks a token. |
3 |
A |
End character that marks a token. |
4 |
A |
List separator. |
5 |
A |
Text identifier. |
6 |
A |
Special character. |
7 |
A |
Table (string) of characters that must be
preceded by the special character. |
- |
A |
Return the list (in found order) of token
found in the parsed string. |
get.list_extract (udf) |
This is a wrapper for str_token_extract, designed for Magic list you can use
as expression in a combo or list box. The separator is ,, the text identifier
is NULL and the special character is \. |
1 |
A |
List. |
2 |
L |
Number. |
- |
A |
Token. |
get.list_count (udf) |
This is a wrapper for str_token_count, designed for Magic list you can use as
expression in a combo or list box. The separator is ,, the text identifier is
NULL and the special character is \. |
1 |
A |
List. |
- |
L |
The count. |
get.list_locate (udf) |
This function returns the position of an item
in a Magic list (it's a a wrapper for
str_token_locate). |
1 |
A |
List. |
2 |
A |
Item. |
3 |
L |
Token position. |
get.list_insert (udf) |
This function insert an item into a Magic
list after the specified position. (it's a a wrapper for str_token_insert, where the characters table contain ,,
\ and -). |
1 |
A |
List. |
2 |
A |
Item. |
3 |
L |
Position. |
- |
A |
List with the added token. |
get.list_remove (udf) |
Remove an item from a list. This is a wrapper
of str_token_remove. |
1 |
A |
List. |
2 |
L |
Position of the item to remove. |
- |
A |
List minus the specified token. |
get.list_to_token (udf) |
It's a wrapper of
str_to_token designed for Magic list. |
1 |
A |
Item. |
- |
A |
Token. |
get.list_sort (udf) |
It's a wrapper of
str_token_sort designed for Magic list. |
1 |
A |
List. |
2 |
A |
Sort order : ASC or DES. |
- |
A |
Sorted list. |
get.list_uniq (udf) |
It's a wrapper of
str_token_uniq designed for Magic list. |
1 |
A |
List. |
- |
A |
Result list. |
get.list_extracts (udf) |
It's a wrapper of str_token_extracts designed for Magic list. |
1 |
A |
String. |
2 |
A |
Begin character. |
3 |
A |
End character. |
- |
A |
List in found order. |
get._set_csv (UDP) |
This function set the configuration
parameters used by the csv wrappers. The CSV format is a common exchange
format, but the separator may vary (',', ';' and 'tabulations' are the most
used). The csv wrappers are (links to the Magic list equivalents wrappers) :
csv_extract (list_extract), csv_count (list_count), csv_locate (list_locate), csv_insert (list_insert), csv_remove (list_remove), csv_to_token (list_to_token), csv_sort (list_sort), csv_uniq (list_uniq),
csv_extracts (list_extracts). You can also use
this wrappers for other lists than CSV, just set the appropriate settings here
instead of using them for each function. |
1 |
A |
Separator (default is tabulation). |
2 |
A |
Text identifier (default is "). |
3 |
A |
Special character (default is \). You should
use blank and set quote (") using
_set_csv_dbl. |
4 |
A |
Table (string) of characters that must be
preceded by the special character (default are " and \). |
get._set_csv_dbl (UDP) |
To ignore a quote into a csv line, the quote
is repeated. This flag is a _set_csv extension. |
1 |
A |
The character that has no more special
meaning if repeated. Default is blank, you should set it to " for CSV
lines. |
get.set_com (udf) |
Set default settings for the specified serial
port. |
1 |
A |
Serial port : COM1 to COM9. |
2 |
L |
Bauds (usual values are 9600, 19200 and
115200). |
3 |
L |
Bits : 4 to 8 (usually 8). |
4 |
A |
Parity : Even,Mark,Odd,Space,No. 'No' is the
habitual value. |
5 |
D |
Stop bit : 1, 1.5 or 2. |
6 |
A |
Flow control : Xon/Xoff, Hardware or
No. |
- |
L |
Return value : 0 for error. |
get.about (UDP) |
Display an "about' message box. |
get.set_clipboard (UDP) |
Put a string in the clipboard (copy). |
1 |
A |
The string to be copied. |
get.screen_capture (UDP) |
Capture the screen or a window to a bitmap
file (.bmp), or to the clipboard. |
1 |
L |
0 for screen, or a valid window handle |
2 |
A |
File name. If it's prefixed by a ':', then
all the window is captured, otherwise only the client zone is captured. If file
name is empty, then the bitmap is send to the clipboard. |
get.get_img_size (UDP) |
Return width and height of a bitmap.
Supported format and extensions are : Windows bitmap (.bmp), gif (.gif), jpeg
(.jpg, .jpeg, .jfif), pcx (.pcx) and tga (.tga or .tpic). Only minimal headers
are read to maximize performance. These function are usefull to set the WIDTH
and HEIGHT option of the HTML IMG tag. In case of error (bad file name, bad
Magic number, ...) (0,0) is returned. |
1 |
A |
File name. |
2 |
L |
Width. |
3 |
L |
Height. |
get.get_img_type (UDP) |
Return bitmap file type according to its
structure. |
1 |
A |
Filename |
2 |
A |
File type : gif, jpg, png, bmp or pcx. |
3 |
A |
Option (unused, skip or '') |
get.save_clipboard_bmp (UDP) |
Save the clipboard in a .bmp file (if there
is a bitmap in the clipboard). |
1 |
A |
Bmp file. |
get.get_dll (UDP) |
The function obtains information about a
Magic specific DLL. You can stop enumeration when function name is empty. |
1 |
A |
DLL name. |
2 |
L |
Function index. |
3 |
A |
Function name. |
4 |
L |
Parameter number. |
5 |
A |
Parameter type (A/L/D). |
get.OutputMonitor (UDP) |
This function duplicate the behavior of FLWMTR('String', 'TRUE'LOG), it can append a User Message in
the Monitor/Debugger of Magic V8. This function will allow monitoring from the
DLL. |
1 |
A |
Message to print in the Monitor, or on the
standard debug output if the Monitor is not present. |
get.valid_ccard (UDP) |
"Validate" a credit card number (the only way
to accept a payment by card, should be to call the bank). Extracted from SNIPPETS. |
1 |
A |
Card number. |
2 |
A |
Type ( "Mastercard", "Visa", "American
Express", "Diners Club/Carte Blanche", "Discover", "enRoute", "Japanese Credit
Bureau", "Australian Bankcard" or "unknow"). |
3 |
A |
Error. If no error, then it's blank,
otherwise the error is explained in english. |
get.valid_isbn (udf) |
Validate an ISBN (International Standard Book
Numbers) code. Extracted from SNIPPETS. |
1 |
A |
ISBN number. |
- |
L |
0 : error, 1 : success. |
get.limit_instance (UDP) |
This function let you limit the number of
instance of an application.The function can be called only once in a Magic
session. This function works even if you rapidly launchs Magic sessions. |
1 |
A |
Unique name, for instance application name
(only alphabetic and _ characters), to limit by application. |
2 |
L |
Number of instance to limit, usually (and at
least) 1. |
3 |
A |
Terminal server gestion. Put 'Global' for no
TSE gestion (n instances accros all the server) or 'Local' (by default) for TSE
comptatibility (n instances by TSE session). |
4 |
A |
Result : OK if the session is allowed, Error
in no more session is left. In case of Error, quit the application. See
functions activate_win the other instance (rename
the Window title of the current session with set_title
to avoid collision). |
Button_types
This part describes the button prefix and the buttons behavior when button subclassing is active.
Button type :AN |
Display an animation on a Magic screen.
Syntax is "AN:avi identifier" (or "AV:"). The background color (color of the first point) remains the
original one if you use "AN;", default is to use the gray color., The AI style let you use a .ani file, no support is planned for GIF, as
the format is copyrighted (see my homepage for link to a free gif to AVI
converter). The set_bitmap function lets you replace
the Magic 8 right toolbar icon by an animation. The demo shows Windows
animations which are stored in shell32.dll. Note that .avi animations consume a
little CPU, so it doesn't slow down the process. |
- |
|
For better compatibility with hotfudge, use
'AN' instead of 'an'. |
Button type :AV |
Same as AN. |
- |
|
For better compatibility with hotfudge, use
'AV' instead of 'av'. |
Button type :AI |
It let you play a .ani animation in a Magic
form. See AN to display .avi files. It also displays normal
icons, so ic is a little redundant (but ic
center the icon). |
- |
|
For better compatibility with hotfudge, use
'AI' instead of 'ai'. |
Button type :ic |
Display an icon. If you use ';' instead of
':', it displays a small icon (only the .ico format and the dll!resources is
supported for small icons). Use ai for displaying .ani animations, as well as
icon. |
Button type :bi |
Use an icon as a button title. It's a Windows
functionality since Windows 95. If you use ';' instead of ':', a small icon is
displayed. If ':' is used, it used the size of the icon (ie the size of the
first icon in a multi-resolution icon). |
Button type :bb |
Use a bitmap as a button title. It's a
Windows functionality since Windows 95. If it' bB, Apply a shadow to the icon
(see _set_icon_button. |
Button type :hl |
Hyperlink button. Use an underlined font as
the button font. Background is gray (Window Button Face color). The cursor is
different if you use ';'. The _set_hand function lets
you choose another cursor (or one of the provided). For HL, Active hyperlink
button : the text is underlined when button has focus or mouse cursor is over.
Background is white. |
Button type :ht |
Hyperlink button. Use an underlined font as
the button font. Background is white. For HT, Active hyperlink button : the
text is underlined when button has focus or mouse cursor is over. Background is
gray (Window Button Face color). |
Button type :bh |
Flat button style. Use _set_button with FLAT param to change all Magic buttons to
this style. If it's bH, Another flat button style. Use
_set_button with MFLAT param to change all Magic buttons to this
style. |
Button type :ba |
Another flat button style. Use _set_button with NFLAT param to change all Magic buttons to
this style. You can also use 'bA' style, the text color is blue if focus (OFLAT
style). |
Button type :bo |
Taligent button style. Use _set_button with C2 param to change all Magic buttons to
this style. |
Button type :bl |
Visual button style : it's become dark gray
when the button gains focus. Use _set_button with C2
param to change all Magic buttons to this style. |
Button type :bf |
Focus button style : an "enter sign" is added
when button has focus. Use _set_button with FOCUS
param to change all Magic buttons to this style. If it' bF, Add a focus
rectangle around button title when the button has the focus. Use _set_button with TEXTF param to change all Magic buttons to
this style. |
Button type :gf |
Bold face on focus. Use _set_button with BOLD param to change all Magic buttons to
this style. If you precise gf; it will also bold on over. |
Button type :ul |
Underline on mouse over. The cursor is also
changed to hand cursors. Use _set_button with
UNDERLINE param to change all Magic buttons to this style. |
Button type :bm |
Multi button style : a small sub-button
enforces the state look. Use _set_button with MULTI
param to change all Magic buttons to this style. If it's bM : Magic V6 demo
button style : a small . Use _set_button with MAGIC
param to change all Magic buttons to this style. If it's BM : Use a five states
bitmap as the title (same as Magic Image
button, but add a 5th state when mouse is over the button). See
gb if you want to specify the title dynamically. |
Button type :bu |
Up button : a small arrow is added. It's
designed to make table title, and implement sorting. See bd
and bn for down and normal buttons. |
Button type :bd |
Down button : a small arrow is added. . See
also bu and bn for down and normal
buttons. |
Button type :bn |
Up button : the place for a small arrow is
taken. It's designed to make table title, and implement sorting. See bd and bu for down and up buttons. |
Button type :cr |
Color button. If ';' is used, the color zone
has a black border. The syntax is 'cr:00RRGGBB'. If you use CR, then you can
set the title as well as the color title, syntax is 'CR:{text color}(background
color)Title'. |
Button type :tc |
This function let you choose the color of the
button title. The syntax is 'tc:{color
identifier}Title'. See CR to also set the background. |
Button type :CL |
Clock control. The syntax is CL:"time".
"time" is a picture, that you can found in the Windows control panel (or
DIGITAL for a bitmap clock, with 'hh:mmt' as picture ; or ANALOG for an
analogic clock). ';' is used to blink the separator every 1/2 second. |
Button type :bk |
Blinking text. Syntax is bk:[millisecond]{text color}(background
color)test. If syntax is bk:text, the blink time will be the cursor blink
time, the text color will be black, and the background color will be gray. |
Button type :MQ |
Marquee text. Syntax is MQ:[millisecond]{text color}(background
color)test. If syntax is MQ:text, the timer time will be 15 ms, the text
color will be black, and the background color will be gray. if you use 'MQ;',
the text go from right to left. |
- |
|
For better compatibility with hotfudge, use
'MQ' instead of 'mq'. |
Button type :pr |
Position button. When its state changes from
disabled to enabled, it issues a mouse click at its left (ie you can place it
at the left of the edit control). It's a gray rectangle, but you can hide it.
See also pl. It's very useful if you want to place the caret
on a specific place, the Magic equivalent was issuing several kbput('Next
Field'ACT). |
Button type :pl |
Position button. When its state changes from
disabled to enabled, it issues a mouse click at its right (ie you can place it
at the left of the edit control). It's a gray rectangle, but you can hide it.
See also pr. |
Button type :zr |
Right zoom button (or rz:). Place this
control to the right of an edit control. When user clicks on this button, it
issues mouse double click on this control (see
_set_zoom_key to issue 'F5'). The behavior is better than with Magic
solutions : if the button is without virtual, you must use an User Action (they
are rare, and it requires to have the same call in 2 different places), and
when the user clicks, it doesn't reposition the caret (it can be dangerous, as
tests may place between the zoom and the curent caret) ; or if you use a
virtual (a virtual for each zoom), you must repeat the processing twice in the
record main, and the caret is positioned on the button when you use tab (it's
not what you usually want). 4 constants are defined (use it as button title) :
OPEN, STORE, ZOOM, SEARCH, CAL. If you don't put title (ie just 'zr:'), the
Windows combo button is used). If you use ';', then "Zoom" cursors are used.
I've taken this idea from Hotfudge (so I knew it was possible !). |
Button type :rz |
Same as zr. |
Button type :zl |
Left zoom button (or zl:). Place this control
to the left of an edit control. When user click on this button, it issues mouse
double click on this control (see _set_zoom_key to
issue 'F5'). See also zr for more details. |
Button type :lz |
Same as zl. |
Button type :ml |
Multi line button. Same as sm (s_). |
Button type :s_ |
Set alignment of button text : st: (Top), sb:
(Bottom), sr: (Right), sl: (Left), sm: (Multine), sc: (Center), sv: (Vertical
center), sn: (Normal). This attributes can be cumulated, so st:sr: means
top/right text. |
Button type :Fixed style |
Set a fixed style : "!N:" set the button as
normal state, "!P:" as pushed state, and "!F:" as focus style. For disabled
style, just use the Magic way ('FALSE'LOG expression). This style lets you use
other dynamic styles to help in designing the Magic Image Button (put on a
magic form the 4 buttons, then do a screen capture). It's also useful to show
button enfoncement to respond to a keystroke. The "!0:" style reset the button
to normal behavior. |
Button type :P_ |
Draw a Windows constant button : 'PC:' (combo
box), 'PD:', 'PU:', 'PL:', 'PR:' (Down, Up, Left and Right button), 'PX:',
'Pm:', 'PM:', 'PR:', 'Ph:' (title bar buttons). |
Button type :hf |
Obsolete and no more implemented. See wb for replacement. |
Button type :pb |
Progress bar. Set title between 0 and 100. set_progress and
use_progress also show progress bar, but from a slider instead of a
button. |
Button type :2d |
2D Look. So a button can look like simple
text. |
Button type :fc |
'fc:' draw the button the same way than when
it has the focus, the 'fc;' style send it back to normal. Useful to show an
"active" button or default button. |
Button type :TV |
'TV:' draws the specified treeview and
associate to selection a hotkey (so you can retrieve the seleted item). syntax
is 'TV:<hotkey>treeview_file', where treeview is the description file :
'number displayed item=key' where number is the depth (1 : root, 2 : one
parent, 3 : 2 parents, ...), displayed item is the string to be displayed, and
=key is an optionnal value that identifies the string. If you precise ':', the
treeview is collapsed, if it's ';' the treeview is expended. You can retrieve
the last selected value with get_tree_view. You
can add comments in this file, use ':' as the first sign of a line. You can
also precise some options : ': hot tracking' to underline item under mouse
cursor, ': 3D sunken' or ': 3D raised' to add a border. |
- |
|
You can now have bitmap support. You need to
build a file (imglist.txt), each line is a bitmap
identifier. Then you can add at the end of each line of the treeview.txt
file one or 2 numbers (tab separated) : the first is the normal bitmap, the
second is the selected or the open stat bitmap. The imglist.txt is specified in
the treeview.txt, in a line of the form : ': bitmap : imglist.txt' (if the
second state is 'selected') or ': bitmap ; imglist.txt' (if the second state is
'open'). 'imglist.txt' must be in the current startup
folder or you need to specify the full path. There are predefined styles,
just use as 'imglist.txt' the keyword : 'Book', 'Explorer' or 'Help'. |
2 |
|
You can select a value with set_tree_view. |
3 |
|
For better compatibility with hotfudge, use
'TV' instead of 'tv'. |
Button type :TV Explorer |
This part describes how to make Tree View that looks like the left part of Explorer. |
- |
|
Options are the same than
TV, except the ': folder : <path>' path option that replaces usual
items in the 'treeview.txt' file. <path> is the path, whithout the
trailing backslash (for instance C: or C:\Windows or C:\My application folder).
': bitmap' option is always 'Explorer'. |
2 |
|
get_tree_view
with 'Explorer' type. |
3 |
|
You can now select a value with set_tree_view. |
Button type :mc |
'mc:<HotKey>YYYYMMDD' draw a calendar
(one month). If you use 'mc;', week numbers are displayed. The hot key let you
call get_calendar_date, use several hot keys
for several month controls on the same form. It is positionned by default on
the date specified by 'YYYYMMDD'. You need Internet Explorer 4 or upper
installed. Locale settings are taken from Windows and apparence can change
uppon Windows version. Keyboard input is not supported, you must use mouse. You
can set size by choosing the button font. If there is enough space, several
calendars will be displayed (so you can have a 2 month view for instance). |
- |
|
If you use MC style, you can select a range
of dates, and get_calendar_date returns this
range instead of a uniq date. |
2 |
|
The
set_day_state function let you set the specified date in a bold font. |
Button type :I_ |
'IT:[icon
identifier]title' add the specified icon in
top ('IT:') , left ('IL:') or right ('IR:'). You can also use a bitmap file
(two part bmp, first image normal and second disabled) if it is prefixed by
!. |
Button type :tt |
'tt:[ToolTips]Button Title' associates the
specified ToolTips to the button (usefull for Magic V7), by using the set_tips function. |
Button type :ma |
'ma:[Hotkey]Button Title' send the HotKey
(for instance <F7> or <Ctrl+M>) when the cursor move over the
button. See 'mx:' when the cursor leave the button. You can retrieve button
title by using get_cursor_hwnd and get_title, if you have too much buttons on the screen to put a
different hotkey to each button. |
Button type :mx |
'mx:[Hotkey]Button Title' send the HotKey
(for instance <F7> or <Ctrl+M>) when the cursor leave the button.
See 'ma:' when the cursor move over the button. |
Button type :wb |
This style show a normal Windows button if a
general default style was applied by _set_button.
See also zz style. |
Button type :zz |
Remove previously applied styles by _set_button for instance or if you need to change a button
style. |
Button type :gb |
'GB:[bitmap
identifier]Title' and 'gb:[bitmap
identifier]' let you define a five state bitmap as in BM mode, but here you
can specify the button tile. If you use 'gb;' or 'GB;', a border is designed
when the button get focus. The difference between the lowercase and uppercase
versions are in the scaling technique : for 'gb', the bitmap is resized, but
for 'GB', the image is cut in 9 bitmaps : a 1*1 background color, 4 borders and
4 corners (a similar technique is used in Windows XP). |
Button type :xp |
This is a shortcut for 'GB:[XP_BLUE]'. |
NETGET.DLL
NETGET.DLL is a network extension. It includes an FTP
client, function to save an URL in a file (get_url),
a Winpopup client, a phone dialer, ...
You'll need Internet Explorer 3 (or upper) installed (but you don't need to use
it).
netget.FTP client |
This FTP client uses the Microsoft wininet
API, that comes with Internet Explorer 3 or upper. You'll get all basic FTP
commands : open (ftp_open), bye (ftp_bye), binary/ascii (ftp_binary),
get (ftp_get or
ftp_get_visual, look at dir_init, dir_read and dir_close functions to
make a mput), put (ftp_put or
ftp_put_visual), delete (ftp_delete), rename (ftp_rename), ls/dir (ftp_dir_init, ftp_dir_read and
ftp_dir_close, that also lets you make a mget), cd
(ftp_cd), mkdir (ftp_mkdir) and
rmdir (ftp_rmdir). With IE5 installed, you can use ftp_append, as well as functions that send server
commands : ftp_quote,
ftp_cmd_write and ftp_cmd_read ; this function
are still beta. |
netget.ftp_option |
Set various options for FTP. This function
must be called before FTP calls. |
1 |
A |
Option ('Passive' or 'Port'). |
2 |
A |
Value. Set 'Yes' or 'No' for 'Passive'
option (default 'No') ; and a number converted to string for the FTP port
(default '21'). |
3 |
A |
Spare parameter (unused). |
netget.ftp_open (UDP) |
Initialize an ftp connexion. Don't forget to
do an ftp_bye to close the connection. |
1 |
A |
Server name or IP address. |
2 |
A |
User name. Use "anonymous" for anonymous
login. |
3 |
A |
Password. |
4 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_bye (UDP) |
Close the current ftp connexion. |
netget.ftp_binary (UDP) |
Set the binary/ascii flag for file
transfer. |
1 |
L |
1 (True) or 0 (False). |
netget.ftp_get (UDP) |
Get a file on the server open by ftp_open. Use dir functions (ftp_dir_init, ftp_dir_read and
ftp_dir_close) for an mget equivalent. |
1 |
A |
Remote file |
2 |
A |
Local file |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_get_visual (UDP) |
Add a visual dimension to ftp_get : the
function sets the window title (from the 4th parameter) from 0 to 100. Useful
with a pb button or a scroll bar. |
1 |
A |
Remote file. |
2 |
A |
Local file. |
3 |
L |
Return value. 1 for success, 0 for
error. |
4 |
L |
Window handle. |
netget.ftp_put (UDP) |
Put a file on the server open by ftp_open. Use dir functions (dir_init,
dir_read and dir_close) for an
mput equivalent. |
1 |
A |
Local file. |
2 |
A |
Remote file. |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_put_visual (UDP) |
Add a visual dimension to ftp_put : the
function sets the window title (from the 4th parameter) from 0 to 100. Useful
with a pb button or a scroll bar. |
1 |
A |
Local file. |
2 |
A |
Remote file. |
3 |
L |
Return value. 1 for success, 0 for
error. |
4 |
L |
Window handle. |
netget.ftp_append (UDP) |
Append a file on the server open by ftp_open. It's a wrapper for
ftp_cmd_write with 'APPE destination' as the command. |
1 |
A |
Local file. |
2 |
A |
Remote file. |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_delete (UDP) |
Delete a file on an FTP server. |
1 |
A |
Remote file to delete. |
2 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_rename (UDP) |
Rename a file on an FTP server. |
1 |
A |
Remote file name. |
2 |
A |
New file name. |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_pwd (UDP) |
Return the current remote directory. |
1 |
A |
Remote directory. |
2 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_cd (UDP) |
Change remote current directory. I did'nt
make a lcd (local directory change), just use the full path. |
1 |
A |
New remote directory. |
2 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_mkdir (UDP) |
Create a directory on the FTP server. |
1 |
A |
Directory. |
2 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_rmdir (UDP) |
Remove a directory on a remote FTP
server. |
1 |
A |
Directory. |
2 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_dir_init (UDP) |
Begin listing a directory. |
1 |
A |
Filter, such as *.txt. |
2 |
A |
First returned file name. If it's blank, so
there is no file in this directory. |
netget.ftp_dir_read (UDP) |
Read the next file for the listing initiated
by ftp_dir_init. |
1 |
A |
File name. |
netget.ftp_dir_close (UDP) |
Stop listing of the directory. |
netget.ftp_quote (UDP) |
Send an arbitrary command to the ftp server.
The list of server commands is given by the REMOTEHELP command. You need IE5 in
order to this function to work. For functions that sends or retrieves a file,
use the ftp_cmd_read or
ftp_cmd_write commands. |
1 |
A |
A server command, that doesn't require that
a file is send nor retrieven (for instance a CHMOD). |
2 |
L |
Return value. 1 for success (the command has
been send, it does not mean the command has worked), 0 for error (IE5 is not
installed, or the command was not send). |
netget.ftp_cmd_write (UDP) |
Send an arbritray ftp server command, and
send a file to the FTP server. Typical use is the command APPE (server version
of the APPEND command), such as in the ftp_append
wrapper to this function. |
1 |
A |
Server command. |
2 |
A |
File to send. |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_cmd_read (UDP) |
Send an arbitrary command to the ftp server.
The list of server commands is given by the REMOTEHELP command. You need IE5 in
order to this function to work. You can send an NLST or LIST command (server
versions of the LS or DIR command) for instance if you want to parse the output
(if you use an OpenVMS ftp server for instance). |
1 |
A |
Server command. |
2 |
A |
File for return from ftp server. |
3 |
L |
Return value. 1 for success, 0 for
error. |
netget.ftp_iosize (UDP) |
If the FTP server has the option, return the
size of the specified remote file |
1 |
A |
Remote file |
2 |
L |
Returned size (in Bytes) |
3 |
A |
Option (unused, skip it or '') |
netget.Web |
You can retrieve any Web page, with his URL.
This allows you to get informations from portals that provide computer-enabled
informations. |
netget.get_url (UDP) |
Get a file via URL. You can use _set_option to set the user and password of the eventual
proxy, and a dialog box is displayed if they doesn't work. |
1 |
A |
URL (For special characters, use convert_url). |
2 |
A |
Local file name. |
3 |
L |
Return value. 1 for success, 0 for error
(for instance 404 not found). |
netget._set_option (UDP) |
Set option for
get_url. |
1 |
A |
Option to set : 'User' or 'Password' for the
proxy server defined in the Internet Explorer control panel. |
2 |
A |
Value. |
netget.convert_url (UDP) |
Encode or Decode an URL. It will convert for
instance space values by %20. Sadly, it doesn't convert after the ?. |
1 |
A |
URL or partial URL. |
2 |
A |
Destination URL. |
3 |
L |
Size if destination URL. |
4 |
A |
'D'ecode or 'E'ncode. |
netget.to_internet_time (UDP)
|
Convert a date/time to a the format used in
Web pages (RFC 1123). |
1 |
A |
Date in YYYYMMDD format. |
2 |
A |
Time in HHMMSS format |
3 |
A |
Return value. |
netget.Identification |
This functions use Netbios (get_mac), or TCP/IP. |
netget.get_mac (UDP) |
Get the Mac address (using NetBios) of the
first controller of the system, which is usually the ethernet controller. I
can't determine which adapter is ethernet, and which adapter is the modem, so i
guess it's the first. |
1 |
A |
Mac address. |
netget.get_local_host (UDP) |
Return the IP computer name. The get_computername function returns the Windows (NetBios)
name, which often is the same. |
1 |
A |
Computer name. |
netget.get_ip (UDP) |
Return dotted IP address from a computer
name. |
1 |
A |
Computer name. |
2 |
A |
Dotted name. |
netget.get_ips (UDP) |
Return list of dotted IP address from a
computer name. |
1 |
A |
Computer name. |
2 |
A |
List of IP addresses. |
netget.get_host (UDP) |
Resolve host name from IP address. |
1 |
A |
IP address. |
2 |
A |
Name. |
netget.ping (UDP) |
Ping using ICMP.DLL, which is undocumented
(it means you may not have it in future releases of Windows). |
1 |
A |
Destination, name or dotted name. |
2 |
A |
Return 'Pong' if success, or an error
message. |
netget.popup (UDP) |
Send a message to Winpopup users. Also look
at send_message and
message_box1. |
1 |
A |
Computer name, Domain name or . for local
computer. |
2 |
A |
From. |
3 |
A |
To. |
4 |
A |
Message. Message+From+To len must not exceed
400 bytes. |
netget.dial (UDP) |
Use the Windows phone dialer. So it works if
Windows phone dialer works ! dial_play can play the
required sounds using your sound card. |
1 |
A |
Phone number. |
2 |
A |
Comment, such as the name. |
3 |
A |
Name to place in call log (sender). |
netget.get_unc (UDP) |
Get UNC path of the specified disk. |
1 |
A |
Disk identifier. |
2 |
A |
UNC Path in \\ServeurName\ShareName
format. |
netget.RAS |
Somes functions to deal with Dial UP
Networking. |
netget.ras_enum (UDP) |
Return the Magic list of RAS entries. |
1 |
A |
List of RAS entries. |
netget.ras_connect (UDP) |
Connect (Dial Up) using the specified RAS
connexion. |
1 |
A |
A RAS entry, as returned by ras_enum for instance. |
2 |
A |
Phone number (optionnal). |
3 |
A |
User login (optionnal). |
4 |
A |
Password (optionnal). |
5 |
A |
Domain (optionnal). |
6 |
A |
Callback phone number (optionnal). |
7 |
A |
Return status, blank for no error. |
netget.ras_disconnect (UDP) |
Disconnect (Hang Up) the specified
connection. |
1 |
A |
RAS entry. |
2 |
A |
Return, blank or error. |
NTGET.DLL
NTGET.DLL is a Windows NT extension. It provides functions that does not
exist on Windows 95 or 98.
ntget.get_fullname (UDP) |
Return the full name of an user. |
1 |
A |
User name. |
2 |
A |
Domain name (use blank for local
domain). |
3 |
A |
Full name (260 bytes buffer). |
ntget.get_user_groups (UDP) |
Get user groups. |
1 |
A |
User. Each user can retrieve his own
groups. |
2 |
A |
Domain name (use blank for local
domain). |
3 |
A |
Magic List. (buffer 5000). |
ntget.get_groups (UDP) |
Retrieve groups of current user. It retrieve
more groups than the get_user_groups functions
with local user name and
domain parameters. |
1 |
A |
Return value (buffer of 5000). |
ntget.send_message (UDP) |
This function lets you send a message to
another NT user. You may also want to look at popup and message_box1 functions. |
1 |
A |
User name. |
2 |
A |
Domain name. Use blank for local
domain. |
3 |
A |
Message. |
ntget.get_domain (UDP) |
Return the domain name. (This function is
also in MFGET.DLL). For Windows 95, you can read in the
registry ('HKEY_LOCAL_MACHINE',
'System\CurrentControlSet\Services\VxD\VNETSUP', 'Workgroup'). |
1 |
A |
Domain name (260 bytes buffer). |
ntget.set_numlock (UDP) |
Set the numlock state. |
1 |
A |
ON or OFF. |
ntget.event_source (UDP) |
Create the event source in the registry. To
be called once by source. |
1 |
A |
Event name, your application name for
instance. |
ntget.event_write (UDP) |
Write a message to the event log. The message
id is , and the user name is set. |
1 |
A |
Source (previously created by event_source). |
2 |
A |
Type of message : 'I', 'W' or 'E' for
Information, Warning and Error. |
3 |
A |
Message to write in the event log. |
ntget.add_user (UDP) |
Add an user. |
1 |
A |
User. |
2 |
A |
Domain. Blank for local computer. |
3 |
A |
Password. |
4 |
A |
Home path. |
5 |
A |
Comment. |
6 |
A |
Login Script. |
7 |
A |
Return, blank for no error. |
ntget.change_password (UDP) |
Change user password. |
1 |
A |
User. |
2 |
A |
Domain. Blank for local computer. |
3 |
A |
Old password. |
4 |
A |
New password. |
5 |
A |
Return value, blank for no error. |
ntget.set_user_info (UDP) |
Change specified user setting. |
1 |
A |
User. |
2 |
A |
Domain. Blank for local computer. |
3 |
A |
Information to set : 'CallBackNumber',
'AddGroup', 'AddLocalGroup', 'FullName', 'Password', 'Account'. |
4 |
A |
Value to set. For 'Password' :
'NeverExpire', 'ExpireNow', 'Expire', 'CanTChange', 'CanChange'. For 'Account'
: 'Disabled' or 'Enabled'. |
5 |
A |
Return value, blank for no error. |
TSEGET.DLL / MFGET.DLL
TSEGET.DLL is a Terminal Service extension. A previous version MFGET.DLL for
older Metaframe server is still available
tseget.get_client_name (UDP) |
This function returns the client name. |
1 |
A |
Name (260 bytes buffer). |
tseget.get_client_address (UDP)
|
Return the client address. |
1 |
A |
Type : INET (IP address) or IPX (Novell
address). |
2 |
A |
Address. |
tseget.get_client_display (UDP)
|
Return client display resolution. See also get_resolution and
get_colors. |
1 |
L |
Witdh. |
2 |
L |
Height. |
3 |
L |
Color depth. |
tseget.get_session (udf) |
Return a session identifier, depending of the
client name, user name or winstation name. It return the first session
identifier. |
1 |
A |
Server name. Use blank for local server, and
ALL for all server in the domain. |
2 |
A |
Type of value tested : STATION (winstation
name), USER (user name) or NAME (client name). |
3 |
A |
Which value to test. |
- |
L |
The session identifier. 0 if no session was
found. |
tseget.message_box1 (UDP) |
Send a message box
(with an OK button) to another winstation. A more complete message box is message_box2. This call doesn't wait for the other
user to answer. Also look at send_message and popup. |
1 |
L |
Session handle. Use
get_session to retrieve this handle. |
2 |
A |
Message. |
3 |
A |
Box title. |
tseget.message_box2 (UDP) |
Like message_box,
but on another session. The message_box1 is a
limited version of this function. |
1 |
L |
Session handle. Use
get_session to retrieve this handle. |
2 |
A |
A string that specify buttons :
ABORTRETRYIGNORE, OKCANCEL, RETRYCANCEL, YESNO, YESNOCANCEL or OK. (same as in
message_box function). |
3 |
A |
A string that specifies the icon :
EXCLAMATION, WARNING, INFORMATION, ASTERISK, QUESTION, STOP, ERROR, HAND or
nothing. (same as in message_box function). |
4 |
L |
Default button (the first button is 1).
(same as in message_box function). |
5 |
A |
Message. |
6 |
A |
Title. |
7 |
L |
Timeout : how long to wait for the message
(in seconds). The remore message box close when the timout expires. |
8 |
A |
Return value : the text of the button that
was pressed, or TIMEOUT if timeout has expired, or blank is no answer was
expected. If NULL is set at the call, then the function will return immediatly,
it will not wait for remote answer (see
message_box1). |
MAILGET.DLL
MAILGET.DLL is an email extension. It works with the installed mail client,
that must support simple MAPI (most mail packages do, but you sometimes have a
set an option). The mail software is named MAPI provider. Note that Outlook/OE
have made restrictions (such as ask for a confirmation message) on MAPI,
althought most of them are optional. Magic 9 implements email function that
does not rely on an existing email client, as MAILGET.DLL does when it uses
blat.dll.
mailget.mailto (UDP) |
This function implements the mailto: protocol
: it uses internet safe characters. The send command let
you send e-mail with (prefix subject by ui:) or without user intervention (it
uses MAPI). Full implementation of mailto: protocol is not garanted by all
email packages : one 'to' address and the subject are commonly implemented, the
attachment functionality is often not implemented. The full size of the mailto:
command is limited by Windows command line maximum size, and the message body
is included in the command ! You can get similar behaviour with 'mailget.send' with 'ui:' prefix in the subject line. |
1 |
A |
"TO" list. List is '|' separated for
compatibility reasons with mailget.send. mailto protocol
(at least for Netscape Messenger) use ',' as separator, so I replace the '|' by
','. |
2 |
A |
"CC" list. |
3 |
A |
"BCC" list. |
4 |
A |
Subject. |
5 |
A |
Body (memo field). |
6 |
A |
Attachement (only one). |
7 |
A |
Option. Not used now. |
mailget.is_mapi_installed (UDP)
|
This function verify that MAPI is
installed. |
1 |
L |
Return 0 (MAPI is not correctly installed)
or 1 (MAPI looks like it's correctly installed). |
mailget.logon (UDP) |
Logon into the mail system. You should logoff once you have terminated (for massive email posting,
logon only once at startup and not for each email). |
1 |
L |
A valid window handle. |
2 |
A |
User or profile name (Empty string is often
enought). |
3 |
A |
Password. |
4 |
L |
Return value, 0 for error and 1 for
success. |
mailget.logoff (UDP) |
Logoff from MAPI provider. This is required
to unload the email client. |
mailget.send (UDP) |
Send a message, silently (default) or with
interface (ui: prefix of subject line). You must logon
first, and logoff once you have terminated (logoff is automatically called when Magic ends). List of addresses are | separated. Recent Outlook have security
settings that may reject attachements. Look at blat
interface for a solution that doesn't rely on the email client. Outlook changes
the current folder, this problem is now corrected by changing it back before
returning from the function. |
1 |
A |
"TO" list (| separated). |
2 |
A |
"CC" list (| separated). |
3 |
A |
"BCC" list (| separated). |
4 |
A |
Subject. Prefix the subject by 'ui:' if you
want to display the message, so the user can modify it. |
5 |
A |
Body (memo field). Always use a virtual, an
expression is limited by Magic to 2000 characters only, but you can have a much
bigger body (I didn't put size limitation in this function) if you use a select
virtual. |
6 |
A |
Attachement list. Beware that recent Outlook
may reject attachements, you need to lower security settings. |
7 |
A |
Return. If return is blank, then the message
has been correctly taken by the MAPI provider (it does not mean that it has
been correctly send !). |
mailget.address (UDP) |
Look in the address book for an address. |
1 |
A |
Name. |
2 |
A |
Address. |
mailget.Mail address |
You can use the following format : Display
Name<address> or simply address, or user if he is in te address book. You
may need to prefix the address by his type : SMTP: (internet mail), FAX: (for
faxing, followed by a fax number), other prefix are available, contact me, I
can send you the documentation for X400, X500, Telex, or propriatary formats
(support depends on your mail package). |
1 |
|
Some samples : Dominique Stephan
<dominique@mggen.com>, dominique@mggen.com. |
mailget.blat (UDP) |
Interface similar to send
simple MAPI function that uses BLAT, the well known SMTP mailer in his DLL
version (blat.dll). Look at
http://www.blat.net/ for details and to download the last blat.dll. |
1 |
A |
Mail server, usually smtp.domain.com
computer (required). |
2 |
A |
From email address (required). |
3 |
A |
"TO" list (| separated). |
4 |
A |
"CC" list (| separated). |
5 |
A |
"BCC" list (| separated). |
6 |
A |
Subject line. |
7 |
A |
Body (memo field). |
8 |
A |
Attachement list (| separated). |
9 |
A |
Option. Look at BLAT documentation for a
list of avalaible options. |
10 |
A |
Error. Durring debug phase, I recommend you
rather use the command line version (best error messages). |
PHONEGET.DLL
PHONEGET.DLL is a phone dialer that uses the sound card to play .
phoneget.dial_play (UDP) |
Dial the phone (approach it of your sound
card speaker :-). If you have a modem, you can use the dial
function. |
1 |
A |
Number to play. It recognizes 0 to 9, # and
*, as well as letters equivalent of numbers. |
RESGET.DLL
RESGET.DLL prime objective was to find all avi
resources on a disk.
resget.enum_types (UDP) |
Get the list of resource types in a file :
AVI, GROUP_ICON, GROUP_CURSOR, and BITMAP are the most useful. |
1 |
A |
File name. |
2 |
A |
List (, separated) of resource types. |
resget.enum_names (UDP) |
Get the list of resource names. |
1 |
A |
File name. |
2 |
A |
Resource type |
3 |
A |
List (, separated) of resource names. |
resget.save (UDP) |
Save (binary) a resource. Icon, cursor or
bitmap will not save as .ico, .cur or .bmp files :-(. |
1 |
A |
File name. |
2 |
A |
Resource type. |
3 |
A |
Resource name. |
4 |
A |
Destination file name. |
Identifier
You can use several formats for resources (avi, bitmap, icon, cursor, color), including resources from DLLs.
Identifier :cursor identifier
|
A cursor identifier can be : a cursor file
("file".cur or "file".ani) or a resource "dll or exe"!"resource name or
resource number". If the identifier isn't a cursor, it will use the ARROW
cursor or a hand cursor (if it begin by LINK). |
Identifier :icon identifier |
An icon identifier can be an icon file
"file".ico, a resource "dll or exe"!"resource name or resource number", a
resource indexed by number ("dll or exe or ico or icl","index"), or a shell
object identifier (for instance, "C:\" will return the hard disk icon) . If the
icon doesn't load, an "unknown" icon is displayed. |
Identifier :bitmap identifier
|
A bitmap identifier can be : a bitmap file
"file".bmp or a resource "dll or exe"!"resource name or resource number". The
bitmaps are mapped to current Windows color settings : Colors are Dark Gray
RGB(128,128,128), Gray RGB(192,192,192) and Light Gray RGB(223,223,223). If the
bitmap doesn't load, an "unknown" bitmap is displayed. If NViewLib is installed, then you can also use JPEG, PCX,
TGA, ...(but no color mapping). Logical names are not supported, as they can
change in memory only so I have to way to have the good value (well, unless you
tell the DLL each time you call INIPUT). |
Identifier :color identifier |
A color identifier is a 00BBGGRR value. Use
the choose_color function or a third party tool to
get such values. You can now use the Magic color constants that begin by FF
(button face, window color,...). If you have loaded a Magic color table (by load_colors), you can also use #~idx (for text color)
and #_idx (for background color), where idx is the magic color number. |
Identifier :avi identifier |
An avi identifier can be : an avi file
"file".avi or a resource "dll or exe"!"resource name or resource number". There
are predifined keywords for the Windows (shell32.dll) animations : FindFolder,
FindFile, FindComputer, MoveFile, CopyFile, DeleteFile, SendtoTrash,
EmptyTrash. |
Identifier :Copyright |
© Copyright Dominique Stéphan
1997-2004. |
MGPROC.DLL
This DLL contains only one function :
GetMagicProcAddress, a GetProcAddress like function for Magic specific
DLLs.
mgproc.GetMagicProcAddress (udf)
|
This is the equivalent of Windows API
GetProcAddress that works with Magic specific DLLs (exported throught the
MAGIC_BIND structure). It does not work from Magic, it works as an interface
from other languages to access Magic DLLs. |
1 |
L |
HINSTANCE : It's the address of the handle
to the DLL. |
2 |
A |
LPCSTR : Function name. |
- |
L |
FARPROC : Return the address of the
function. |