CENVI FOR OS/2, DOS, AND WINDOWS Version 1.008 (Now executes faster and can create stand-alone, royalty-free executables.) Cmm (C minus minus) is 'C' for the rest of us. CEnvi runs Cmm programs in the DOS, Windows, and OS/2 environments (more to follow). Together, CEnvi and Cmm make the power and flexibility of the C programming language part of every computer user's environment without the hardware, time, and programmer resources needed for developing full-blown C programs. With CEnvi and Cmm, anyone can take control of their computer environment. C is not just for programming nerds anymore. CEnvi utilities, macros, batch files, and scripts can quickly be created, shared, and modified among all computer users, professional and amateur alike. CEnvi can be incorporated at a pace that is comfortable to you: you may only want to use CEnvi code set up by a more experienced user, you may want to enhance existing batch files with a line or two of CEnvi code, or you may write complete utilities using CEnvi. The following statement is a single-line CEnvi example that you can include into batch files to return ERRORLEVEL 1 only on Fridays: CEnvi "date = ctime(time()) return( strstr(date,"Fri") ? 1 : 0 )" Nombas provides over a hundred samples such as this one--many single-line and other complete program files--and more samples are added every day to provide solutions to CEnvi user's needs. Sample programs included with the CEnvi shareware demonstrate Cmm programming; looping in batch files; altering environment variables; using environment variables in mathematical equations; user input; reading time; sounds; setting ERRORLEVEL; file read/write; OS/2 WPS and PM calls; controlling OS/2, PM, and Windows tasks; interacting with DOS, OS/2, and Windows operating systems; defining windows and Windows functions; extending PATH; scheduled command execution; setting NUMLOCK; and much more. Even if you don't learn the Cmm programming language, you could still personalize these samples to suit your needs. (Do you need a program to tell if it is a Thursday? I'll bet that you could "reprogram" the above sample Cmm code to return ERRORLEVEL 1 only on Thursdays!) If you choose to learn the Cmm programming language (C programmers will find that they already know it), then step through the Cmm programming tutorial in the CEnvi Registered User's Manual. This tutorial takes you step by step through the planning, creation, and debugging of a simple text editor: CmmEdit. With the new /BIND option, you can turn your Cmm code into an executable. This executable can be freely distrbuted without paying any royalties to Nombas. CEnvi costs $38 for a license that includes the OS/2, DOS, and Windows versions. Additional site licenses (which do not include the 100+ page manual) are $15 each. The CEnvi Unregistered Shareware package is a working version of CEnvi with occasional registration reminder screens. The most recent versions of CEnvi Unregistered Shareware, including sample files, are always available via anonymous FTP from "world.std.com" in the "pub" directory: cenvi2.zip, cenvid.zip, and cenviw.zip are CEnvi for OS/2, DOS, and Windows, respectively. From CompServe: CEnvi for OS/2 is CENVI2.ZIP in OS2USER library 4, CEnvi for DOS is CENVID.ZIP in IBMSYS library 1, and CEnvi for Windows is CENVIW.ZIP in WINSHARE and WINUSER library 6. Also available for download from the Nombas BBS (suggested dial string ATDT16173916565,,,,,44444). Nombas may be reached at: Nombas Internet: bsn@world.std.com P.O. Box 875 CompuServe: 72212,1622 Medford, MA 02155 USA Phone: (617)391-6595 BBS: (617)391-6595 ext. 44 after 2nd ring (e.g., ATDT16173916595,,,,,44444) ************************* CENVI2.ZIP FILE LIST ************************* CENVI2.ZIP, the Unregistered Shareware CEnvi package for OS/2, contains the following files: *CENVI.EXE: CEnvi shareware executable for DOS, OS/2, or Windows. *CENVI2PM.EXE: Gateway program, executed trasnparently by CEnvi, for access to PM-dependent system calls *CENVI.DOC: CEnvi Shareware Manual, Chapter 1: CEnvi Unregistered Shareware *CMMTUTOR.DOC: CEnvi Shareware Manual, Chapter 2: Cmm Language Tutorial *CMM_VS_C.DOC: CEnvi Shareware Manual, Chapter 3: Cmm versus C, for C Programmers *CENVILIB.DOC: CEnvi Shareware Manual, Chapter 4: Function Library *LICENSE.DOC: CEnvi Unregistered Shareware License Agreement *README.DOC: Introductory file. Read this first for quick intallation. *REGISTER.DOC: CEnvi registration form *INSTALL.CMM: Cmm source file for installing this shareware version *AllDirs.cmd: Perform a command in this directory and all sub-directories *AllFiles.cmd: Perform a command on all files matching a given file specification *Ascii.cmd: Display the ascii character table *BatLoops.cmd: Examples of various methods CEnvi can use to allow looping within batch files *BckGrnd.cmd: Specify a new file as your desktop background image *BigFont.cmd: Chooses the largest font for a Windowed OS/2 session. Uses KeyPush.lib. *Border.cmm: Draw a simple border on the screen *Bouncy.cmd: Start a bouncy OS/2 Command Window. This demonstrates moving windows, embedding multiple Cmm executables within one file, passing keystrokes, clipboard use, and silliness. *BoxFont.cmd: Show and alter default font for DOS and OS/2 command-line windows *BoxPos.cmd: Show and alter default position for DOS and OS/2 command-line windows *BugHunt.cmd: Example for using the ClipBrd.lib routines. Constantly scan clipboard for "bug" in clipboard text *CBPrint.cmd: Send contents of the clipboard to the printer *CEnviSet.cmd: This file can be used instead of CEnvi.exe if you are using environment variables as Cmm variables and need them to be changed in the current OS/2 environment. *ClipBrd.lib: Library of routines for reading from or writing to the Windows clipboard *CmmEdit.cmm: VERY simple text editor; developed step-by-step in the tutorial chapter of the Registered CEnvi Manual. *Comm.lib: Serial communications routines *DelTree.cmd: Delete a directory tree *Devices.cmd: Show status of system devices. *DevIOCtl.lib: Function library for OS/2's DosDevIOCTL functions *DirStat.cmd: Extract specific fields from an OS/2 "DIR" listing *DiskFree.cmd: Display free space on a disk drive *DoFiles.cmd: Perform any command on a list of files selected from a file dialog box *DosCalls.lib: Example library of "wrapper" function calls to OS/2 API calls in the DosCalls library. This file is "#include"ed in many of the other example files. *DosObj.cmd: Demonstrate how to initialize any session type, program, settings, and window positions. In this case a DOS Window, but this is easily changed. *DumpIni.cmd: Display profile settings from a .INI file; uses Profile.lib *EditCmd.cmd: Use PM's file dialog (via FileDlg.lib) to select a *.cmd file to edit. *EPM.cmd: Wrapper for EPM.EXE for C programmers which will bring in related *.c, *.H and *.asm files *ErrLev.cmd: Execute a command and set the ERRLEV value as the return code, which makes ERRORLEVEL a variable *Fibonacc.cmm: Two methods for generating the Fibonacci sequence *FileDlg.lib: A simple interface to the WinFileDlg() PM function. This library file is #include'd in some of the other CEnvi sample files. *FileFind.cmd: Wildcard search for files on current drive or on all drives *FileIO.lib: Function to interface directly with OS/2's File IO *Find#.cmm: Extract a number from wordy output; used by DirStat.bat *FranTick.cmm: Animated tick who drank too much coffee *GetUKey.cmd: Display a choice prompt and then set an environment variable based on user's selection *Hello.cmm: My first Cmm program. Used to begin the Cmm tutorial. *HexDump.cmd: Display hexadecimal dump of a file *IDLE.cmd: Change process priority to run a CEnvi program only during system idle time. *IdleProg.cmd: Execute a program in the background; i.e., run only during system idle time. *Install.cmm: Install this registered version of CEnvi. *IsDay_1.cmd: One method to check if it is a specific day of the week *IsDay_2.cmd: Another method to check if it's a specific day of the week *IsItFri.cmd: Is it Friday? *KbdRate.cmd: Alter the typematic rate of the keyboard *KeyCode.cmd: Display keycode of any key pressed *KeyGhost.cmd: Sample for using KeyPush.lib to determine if CEnvi is worth the price of registration. *KeyPush.cmd: Send keystroke commands directly to a window by window title; a quick interface into KeyPush.lib *KeyPush.lib: Library of routines for sending keystrokes to PM or Windowed applications. *KeyState.cmd: Get or set the state of the NumLock, CapsLock, or Insert keys for current session or for the whole WPS *Kill.cmd: Terminate a running process by Process ID, Window title, full name, or partial name *MsgBox.lib: A wrapper library for the PM WinMessageBox() function. This file is #include'd in other CEnvi sample files. *MsgBoxes.cmd: Show various message box types using the function in MsgBox.lib. *MultiDir.cmd: OS/2's "DIR" command allowing multiple file specifications *NekoSavr.cmd: This basic screen saver program runs NEKO.EXE, OS/2's cat & mouse game, when the mouse keys and keyboard have been idle. *NumLock.cmd: Turn on NUMLOCK key once, or maintain NUMLOCK ON. A shadow of NumLock.cmd can be put in startup folder to default computer to NumLock ON. "NumLock 1000" will check every second to make sure that NUMLOCK is still set. *OneADay.cmd: Perform any command(s) no more than once per day *OS2Time.cmd: Show time according to computer's internal clock *Parents.cmd: Show hierarchical list of ancestor's process ID's and names *PathAdd.cmd: Add a directory to your PATH environment variable. *PathDel.cmd: Remove a directory from your PATH environment variable *PathStak.cmd: Multi-level save or restore of current drive and directory so that you can change drives and directories and still return to this one *PMdll.lib: Example library of "wrapper" routines to function in the PM DLL (Presentatiom Manager Dynamic Link Library). This file is "#include"ed in many of the other example files. *Primes.cmd: Demonstrate automatic array allocation for calculating prime numbers *PrmptDay.cmd: Change command-line-prompt to display today's date *ProcList.cmd: Show list of all running processes; their names and ID's *Profile.lib: Function library for accessing Profiles; i.e. .INI files *Quote.cmd: Choose a text-mode "profound" quote at random *QuotePM.cmd: Choose a PM-mode "profound" quote at random *RndBckgr.cmd: Randomly select desktop background, at specified interval, from a list of graphic file specifications *RunTime.cmd: Rudimentary scheme for executing a command at a certain time of day. *Setup.cmd: Open the OS/2 Setup folder on the desktop *ShutDown.cmd: Automated shutdown of OS/2 system *SortLen.cmd: Sort any file based on line length *Sound.cmd: Play a frequency for a given time period *Switch.cmd: Switch foreground application to another process base on process ID, full name, or partial name *Terminal.cmd: A VERY basic terminal program; demonstrates COMM.LIB *Threads.cmd: Display list of all threads in all running processes *ValidDir.cmd: Verify if a directory is valid *Wait.cmd: Pause and do not return for specified number of seconds *Windows.cmd: Start up full-screen windows session with specified Windows program. This file contains specific DOS notebook settings that should be altered to meet your computer's configuration. *WinList.cmd: Display list of all PM windows *WinSet.cmd: Set the position, size, state, etc... of a PM Window *WinTools.cmd: Demonstrate many of the capabilities of WinTools.lib *WinTools.lib: Library of routines for manipulating PM windows by name or by handle *WPFolder.cmd: Open a desktop folder for any specified directory and optionally switch to that window