home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cenvi23.zip
/
KEYGHOST.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-10-13
|
3KB
|
78 lines
EXTPROC CEnvi2
//**************************************************************************
//*** KeyGhost.cmd - Example for how to control other programs using the ***
//*** ver.2 the keyboard stuffing routines in KeyPush.Lib. ***
//**************************************************************************
#include <KeyPush.lib>
// Start e.exe running, and give it time to get going
system("Start /F /N E.EXE");
suspend(3000)
// Let's use a BIG helvetica font
//KeyStroke(VK_ALT,'o'); // options
//KeyStroke('f'); // fonts
//SpeedKeys("Helv"); // select the Helvetica font
//KeyStroke(VK_TAB),KeyStroke(VK_TAB); // Tab twice to get to size
//KeyStroke(VK_PAGEDOWN); // page down to a BIG font
//KeyStroke(VK_ENTER); // Select OK
// Enter initial CEnvi sentence
// KeyPushFocusID("E.EXE",False);
SpeedKeys("CEnvi is good.");
// Change "good" to "great"
for ( i = 0; i < 5; i++ )
KeyStroke(VK_SHIFT,VK_LEFT)
SpeedKeys("great!");
// Figure out how much it costs per day for a year
SpeedKeys("\r\rIs CEnvi worth 69 dollars?"
"\rTo use it every day for a year costs ");
//**** THIS PART OF EXAMPLE REMOVED BECAUSE ****
//**** CALCULATOR IS NO LONGER INCLUDED WITH WARP ****
//// Bring up calculator to figure $69.00 / 365 * 100
// system("start /PM /B PMDCalc.EXE");
// suspend(1000);
// system("call Switch Calculator");
//
//// Perform calculation for costs
// // KeyPushFocusID("Calculator",False);
// SpeedKeys("A69.00/365=*100=",200); // perform calculation
// suspend(500);
//
//// Kill the calculator
// suspend(3000);
// KeyStroke(VK_ALT,VK_F4);
SpeedKeys("69.00/365*100",150);
for ( i = 0; i < 13; i++ )
KeyStroke(VK_SHIFT,VK_LEFT)
// Print the results of the calculation
// system("call Switch E.EXE");
// KeyPushFocusID("E.EXE",False);
SpeedKeys("18.9",100);
SpeedKeys(" pennies a day.\rWhat a bargain!");
// now print the message to register
SpeedKeys("\r\rRegister now!");
// copy the Register message just printed and print it many more times
KeyStroke(VK_SHIFT,VK_HOME);
KeyStroke(VK_SHIFT,VK_UP);
KeyStroke(VK_CTRL,VK_INSERT);
KeyStroke(VK_DOWN), KeyStroke(VK_END);
KeyStroke(VK_RIGHT); // just in case not ALL the way at the end
// print that message another 15 times
for ( i = 0; i < 7; i++ )
KeyStroke(VK_SHIFT,VK_INSERT);
// finally, say goodbye and exit
suspend(500);
SpeedKeys("\rThank you.");
KeyStroke(VK_ALT,VK_F4);
//suspend(2000); KeyPushFocusID("Warning",False);
KeyStroke('d');