REXX GUI examples

editor.rex

A very simple text editor example for REXX GUI.

twain.rex

An example of scanner/camera support for REXX GUI.

tab.rex

Demonstrates one approach for using a TAB control.

winsize.rex

Shows how to limit the dimensions (ie, width and height) to which a user can size a REXX GUI window.

mouse.rex

Shows how to change the mouse pointer shape (image) in a REXX GUI window.

colors.rex

Shows how to change the color for TEXT controls in a REXX GUI window.

colors2.rex

Shows how to change the color for ENTRY controls in a REXX GUI window.

drop.rex

Shows how to get the names of any files whose icons are dragged and dropped upon a REXX GUI window, or the controls inside it.

dismiss.rex

Shows how to automatically dismiss a window (without user intervention) after a certain time-out.

seccount.rex

Counts off the elapsed hours/minutes/seconds since a window was opened.

abort.rex

Shows how to implement user abort in a loop that takes a long time to complete some operation. Also download the childabort.rex script.

html.rex

Presents a directory browser dialog to pick out a directory. Then it searches that directory and all sub-directories inside of it for any filenames that end in .HTM or .HTML and presents those filenames in a window with a scrollable list box. The user may select any or all of the names in the list, using the mouse, and then click on an Ok button to perform some operation upon only the selected files.

You can use this example as a skeleton script to show how to recursively search a directory tree for specific filenames that match some criteria, display those filenames in a list for selection by the user, and process his selections.

menu.rex

Shows how to enable/disable and check/uncheck menu items on-the-fly.

popupmenu.rex

Shows how to present popup menus for a window and/or its controls.

menuadd.rex

Shows how to add headings/items to a menu on-the-fly.

tree.rex

Shows how to add items to a Tree control on-the-fly.

NEW!!! view.rex

Shows how to use a VIEW control to display a table.

NEW!!! help.zip

Shows how to add popup help to your script. Also, help2.zip demonstrates how to present help in docking windows like REXX Programmer Center does.

NEW!!! showpic.rex

Shows how to use REXX GUI's GuiPicture() to load and display jpg, gif, and other image file formats.

NEW!!! console.rex

Shows how to use an entry control to mimic a console output window.

browser.rex

An example of using the HTML control, and also the TAB control, to create a tabbed browser.

lasso.rex

Shows how to do a lasso selection of controls in a REXX GUI window. A lasso selection is where you click and hold the left mouse button, and then move the mouse to draw a selection box around the desired controls.


Reginald's FUNCDEF feature

These are scripts that utilize Reginald's special FUNCDEF() function, which allows you to register and then directly call any function in any DLL, even if that DLL was not designed with REXX support built in. This includes being able to call any Windows operating system function directly from your REXX script.

getwebp.rex

Shows how to download a web page (or any file) from the internet.

ftpdirlist.rex

Shows how to list the contents of an internet FTP site.

getftp.rex

Shows how to download a file from an internet FTP site.

sendmail.rex

Shows how to send an email (with attachments).

clip.rex

Shows how to exchange text with the Windows clipboard (and any other program that can do likewise).

zip.rex

Shows how to create a ZIP archive from several disk files. Also requires the zip32.dll

unzip.rex

Shows how to unzip a ZIP archive. Also requires the unzip32.dll

zipexams.zip

Scripts that show how to create a ZIP archive using the RxZip add-on, and how to extract files from an archive using the RxUnzip add-on. This is easier to use then the above examples zip.rex and unzip.rex, and also supports encryption and memory-based archives.

NEW!!! hyperlink.rex

Demonstrates the Hyperlink style for a PUSH control, to launch a browser displaying a web page.

sqllite.rex

Shows how to use the SQL Lite DLL to read/write SQL database files on a local hard drive.

playavi.rex

Shows how to play a video (AVI) file.

playcd.rex

Shows how to play tracks of an audio CD (in your CDROM drive).

trayicon.rex

Shows how to place an icon in the system tray, and respond to clicks upon it with a REXX GUI window. Also download the myicon.ico test icon to try out this example.

cards32.zip

Shows how to use Microsoft's CARDS32.DLL (with REXX GUI) to create a graphical playing cards game. This ZIP file also includes that DLL if you don't already have it installed on your system.

info.rex

Shows how to read information about a particular file such as what type of file it is (ie, a DLL, an application, a driver, a font, etc), its version and product numbers, its copyright, the company that made the file, what operating system it designed for, its description, its original file name (in case it has been renamed), etc.

registry.rex

Shows how to access the Windows registry. (Note: Reginald's VALUE() function offers easier access, but direct access can handle troublesome key names, such as ones that contain embedded backslashes. Also, VALUE() is limited to reading/writing string values -- not binary ones).

fontdlg.rex

Shows how to present the standard Font dialog to pick a font and fill in a LOGFONT.

colordlg.rex

Shows how to present the standard Color dialog to pick a color and return an RGB value.

parent.rex

Shows how to launch a "detached" child REXX script (from a main REXX script) so that the child runs in a separate process. The two scripts then run simultaneously and independently of each other. You should also download the child.rex script to test this.

mousesim.rex

Shows how to move the mouse, and simulate mouse clicks.

netuser.rex

Shows how to retrieve information about an account on a Windows system.

usb.rex

Shows how to query whether a drive is a USB device.


MIDI

rxmidi_examples.zip

A zip file containing some example scripts for RxMIDI, including a script that disassembles a MIDI file into a text file, and a script that assembles the text file back to a MIDI file.

playmid.rex

Shows how to play a MIDI file. It uses the high level MCI API, so you can use this as a takeoff point to play WAVE files on the waveaudio device or AVI files on the digitalvideo device, etc.


Miscellaneous

repository.zip

A collection of scripts that demonstrate Reginald's COM/ActiveX support.

args.rex

A script that displays the arguments passed to it (from whatever program was used to launch the script).

open_script.rex

A macro for REXX Programmer Center. Lets you highlight the name of some call to a script, and will load that script into an editor window.

odbcexam.zip

An example of using RxOdbc.


Utilities

ConvertCalls.rex

A REXX GUI utility to append a .REX extension on all calls to external scripts. This can be useful when converting scripts to a macro DLL, because then script names must be called with the extension.

checksum.rex

Shows how to calculate a CRC-32 checksum for a disk file. Also checksumstr.rex does the same for a string in memory.

timeout.rex

Gets a time from the user at which he would like this script to do something. The script then waits until that time before it does that action. Note: If using REXX GUI for your user interface, then instead use the timeout script examples below.

backup.rex

Backups files whose names are listed in a text file upon each drive.

join.rex

Reads all the lines of a text file and joins lines that end with a comma.

You can use this example as a skeleton script to show how to parse each line of a text file, searching for some special characters on each line to break apart or join pieces of lines.