Go??.EXE v1.3.4 =============== Freeware Win32 only ©Robert J. Holmgren 14 September 2005 «XyWWWeb» Utilities: http:\\www.serve.com\xywwweb No code modification without permission Switch "focus" by "Window Title" to any Windows process (make it the foreground application), in either a Fullscreen session *or* a Desktop window Go.ZIP consists of four executables: GoMW.EXE -- Go Microsoft Word GoNB.EXE -- Go Nota Bene GoWP.EXE -- Go WordPerfect GoXy.EXE -- Go XyWrite This document, while tailored for WordPerfect, is intended for all four executables. Substitute the name of your executable wherever it mentions "WP" or "WordPerfect". Purpose: ------- The primary function of GoWP is to restore WordPerfect as the "Foreground" application -- the window that currently has "focus". But Go does much more; it is also a "keystroke macro" interpreter that stands entirely apart from, but also works with, any application that runs under Windows. Go has its own compact command language. Run from a DOS command line, a BATch file, an applications Shell command, or integrated into application macros, Go can manipulate, by "remote control", any application -- even the Windows Desktop -- by emulating the keystrokes that you would issue if you were manually operating your computer and application(s). Go can perform simple or immensely complex tasks, and can optionally be controlled by a file-based script which Go reads at runtime. Usage: ----- GoWP.EXE ["Title"|w{hWnd_handle}] [waittime in milliseconds] [b] [f] [q] [r] [/text] [d] | [h] or GoWP.EXE d:\path\filename ["Title"|w{hWnd_handle}] [waittime in ms] [q] [r] [d] | [h] where: h "H"elp screen (also ? /? -? ?h /h -h) filename Fully-qualified d:\path\filename (8.3 format) of an external text script that replaces the command line "/text" argument, and pokes data into the target application using Go commands [see "Text Commands", below, for full description] "Title" Case-INsensitive Window Title [default="WORDPERFECT"] w Supply, *instead* of Window Title, the unambiguous hWnd handle to target application's window, e.g. W82495 waittime Wait # (integer) milliseconds, then focus on Window Title b Silently Bide (wait) until target process *appears* in the Process List; may be combined with F; incompatible with Q [NEW in v1.3.1] f Silently wait until target process *terminates*, then optionally stuff /text; may be combined with B [NEW in v1.2.15] q Quiet (no error message) if "Window Title" not found [NEW in v1.2.9] r Stuff /text [required] into the keyboard buffer of the "Window Title" process, then "R"estore focus to GoWP.EXE d Display /text and file-based scripts after parsing /text Focus on Window Title and stuff text into the keyboard buffer [accepts all alphanumeric characters, as well as CHR(##) and KEY(codes)]. /text must be the LAST argument on the DOS command line-- see "Text Commands", below Requirements: ------------ Issue arguments in the order specified in "Usage", above WordPerfect's Window Title *must* contain the case-INsensitive substring "WORDPERFECT" MSVBVM60.DLL must be located in the DOS Path (it already exists on almost every Windows computer, except early Windows 95; if necessary, fetch it at http://vbnet.mvps.org/files/runtimes/vbrun60sp6.zip) Examples: -------- GoWP Focus on a process with "WordPerfect" in its Window Title GoWP 1500 Wait 1.5 seconds, then focus on "WordPerfect" Allow time for a BATch file to complete, for another process to launch (use "start Go ..." to force the BATfile to continue processing), etc. -- many sophisticated uses GoWP "Notepad" Focus on a process with "Notepad" in the Window Title. "otepad" "oTePa" or ANY substring of the Title will suffice IF it is *unambiguous*, i.e. no other Window has the same substring in its Title GoWP /Hello World! Focus on "WordPerfect" and stuff "Hello World!" into a WP text window GoWP "Super Shareware Application" /CHR(13) Kill a nag screen by stuffing Enter key into keyboard buffer ... start /min GoWP.exe "Super Duper App" b /key(WT{11000}ET) SuperDuperApp.exe ... Bide (wait) until SupDupApp is running, then Kill a nag screen that cannot be dismissed until 10 seconds have elapsed (wait one extra second [=11000ms total] to accommodate target app initialization time) GoWP "XyWrite" r /Boo!KEY(ET) Poke the string "Boo!" into XyWrite's text window, then *Return* to Go's process. Uses the reserved string "KEY(XX)" to issue Go commands (in the example, "ET" is the Enter Key). E.g.: Manipulate external programs, such as macros; signal to a waiting external program that a task has completed; etc. etc. -- Go Anywhere! Following are synonyms. All write "Boo!" into XyWrite's window, then return to GoWP's own session. The differences lie in the way they *return* to Go's session: GoWP "XyWrite" /Boo!KEY(ETJW{TM}) ditto: find Me by Window Title GoWP "XyWrite" /Boo!KEY(ETJW{gowp}) ditto: specify Me literally GoWP "XyWrite" /Boo!KEY(ETJW{WM}) ditto: find Me by window Handle GoWP "{self}" /KEY(JW{XyWrite})Boo!KEY(ETJW{GoWP}) ditto: specify two other processes literally (XyWrite & GoWP) GoWP "" Empty Title argument "" focuses the current Foreground window [NEW in v1.3.2 (no longer focuses "Program Manager")] Start filename & GoWP "" 2000 f /key(JW{TO}) Start an application, then start GoWP, wait 2 seconds for app to initialize, focus it, wait for termination, JumpWindow to TitleOriginal (i.e. focus on "WORDPERFECT") GoWP "Program Manager" Focus the Windows Desktop (but do NOT minimize windows) GoWP "Program Manager" /key(LW)d Minimize all windows and Show the Desktop (Windows key, D) GoWP "M$ Outlook" /key(ALSP)n - GoWP "M$ Outlook" /key(AL) n | Identical GoWP "M$ Outlook" /key(AL)key(SP)n - Minimize execrable applications (issue Alt, Spacebar, [release], N) GoWP "{self}" Focus on Go's own session GoWP /key(CTF1)1key(CP)exitCHR(13) Re-synchronize opposite CapsLock states in the OpSys and WordPerfect GoWP /key(CT)w1,38key(ET) Put Cedilla in WP (Ctrl-W, char 1,38) GoWP /key(RDAL)ckey(ALF4)key(CTF1)6kmd/c start GoWP "soft Word" key([/key(CT)vkey(JW{]WD[})]) Copy WP text (using Clip) into M$Word, then return to WP for more; performs a "round trip" (assumes Windows Copy key assigned to Alt-C in WP). To learn about "kmd", see "Notes" near the end of this document (download & install KMD.EXE file!!). start GoWP /KEY(LW)rkmd/c start GoWP "Notep" KEY([/key(rhfh{]WM[}phet)]ETJW{WM}IP) Get hWnd window number of another process, e.g. Notepad (basic technique). Normally, on termination, this command reverts to the target of GoWP, namely WordPerfect; add "JW{OP}" before the terminal parenthesis and it will focus instead on Notepad, demonstrating that Go now knows the unambiguous window number of Notepad Text Commands: ============= Go has a built-in interpreter and a language with numerous commands. Commands are expressed in two statements, CHR() and KEY(). These enable remote control of any application, in FullScreen DOS or the Windows GUI. Commands are case-INsensitive (key=KEY=Key=kEY). CHR(): ----- Stuff 7-bit characters that have no ready keystroke, such as a LineEnd (CHR(13), LineFeed CHR(10), BackSpace CHR(8), etc. LineEnd CHR(13) is a satisfactory replacement for carriage return with most Windows programs (see also command ET, EnterKey, below). Stuff one character at a time; CHR commands can be contiguous, e.g. "CHR(13)CHR(13)" generates two carriage returns. 8-bit characters >127 cannot be stuffed by Go (but many programs have a sequence of commands that can write those characters to the screen -- in WPDOS v6.x, for example, a Cedilla (Ascii-128) can be stuffed, per example code above, with Ctrl-W 1,38.) You cannot nest a CHR() command within a KEY() command. KEY(): ----- Stuff non-alphanumeric keys (F5, Escape, NumberPad-4, Insert, etc) into the keyboard buffer with KEY commands. A full list of Go's mnemonic KEY commands appears in Appendix A of this Help document. If you wish to stuff a key which is not available among Go's mnemonic keys, you can put *any* virtual key using the KEY(VK{xx}) command, where "xx" is a two-character virtual key code recognized by Windows (all virtual key codes are listed in Appendix B). All KEY commands are two characters, e.g. CT for Ctrl, ET for Enter. Keys are case-INsensitive (et=ET=eT=Et). Multiple commands can be stuffed within a single KEY() statement: KEY(BSET). String literals may be passed within a KEY command by placing the literal within [] brackets, e.g. /key(F5[dir d:\path\*.wpd]ET) which is functionally identical to /KEY(F5)dir d:\path\*.wpdKEY(ET) Literals are never executed; they are written verbatin into the keyboard buffer. This is especially useful when passing key commands to a second iteration of Go (see "Child Processes and Callbacks", below): the child will execute them, but not the parent. "Locking keys" (12): CapsLock, NumLock, ScrollLock, and Insert (Typeover) ------------ When you stuff a Locking toggle key (CP NM CL IN), the current state of the key is reversed. You can also stuff unambiguous keys, set either to Off (CO NO CO IO ,letter "O" not zero) or On (CI NI CI II) [a deliberate misconstruction of the zero and one concept representing Off and On, because KEYs "N0" and "N1" are already in use as Numpad keys]. Locking keys can be troublesome under Windows 9x. Keyboard lights sometimes don't change although the state of the lock does change. It can be hardware and application dependent as well. Experiment. "Shifting keys" (11): see Appendix A ------------- Shifting keys stay on until you issue a single alphanumeric character -- for example, Ctrl-F: /KEY(CT)f After that *one* character is issued, the Shifting keys unshift (in reverse order, if more than one, e.g.: Ctrl-Alt-x-Alt-Ctrl). If you need to issue more than character, use brackets "[]" to indicate a sequence of characters to be issued while the Shifting keys are depressed. For example, to put a Cedilla in a DOS application, you might type Alt-1-2-8, holding down the Alt key (AL) throughout the procedure: /KEY(AL[128]) Shifting keys remain depressed as long as KEY commands are issued within a single KEY() statement, e.g. to tab through four items in the system TaskList (Window List): /KEY(ALTBTBTBTB) The keystrokes unique to individual programs can be exploited. For example, to print the current file in WordPerfect (N.B. this command might be issued within a DOS BATch file): /KEY(F7ET) <== F7, Enter or to force WordPerfect to Shell to DOS, pipe a directory display into a file, return to WP, then Retrieve the piped file into a WP window: /key(CTF1)6dir C:\WINDOWS\* chr(62)DIR.TMPkey(ETET)... ...key(SHF0)DIR.TMPkey(ETET) which represents: Ctrl-F1, 6, "dir C:\WINDOWS\* >DIR.TMP", Enter ...{make the file}... Enter to terminate Shell, Shift-F10, "DIR.TMP", Enter to Open file, Enter to accept default Ascii-Text Retrieval and display DIR.TMP. Note how we avoid misinterpretation by DOS of the ">" redirection character, by issuing "CHR(62)" instead. Statements CHR and KEY are **RESERVED NAMES**; if you add an open parenthesis to either of them as plain /text within a Go command, e.g. "CHR(" or "KEY(", it WILL be misinterpreted. Caveat emptor. "Windows Keys": ------------ Use Winkeys to perform Windows tool shortcuts ONLY, such as Winkey-R (show the Run dialog), Winkey-M (Minimize all windows, i.e. show the Desktop), Winkey-D (toggle do/undo Minimize all windows), Winkey-F-Ctrl (search for computers on the network), etc. In Go's script language, the Winkeys are treated like Shifting keys. For example: Minimize all windows except *one* (the second quoted target app, i.e. "WordPerf" in this example): GoWP.exe "{self}" /start GoWP.exe "WordPerf" 200 key (ETLW)m Do NOT use a Winkey to open the Start Menu! Use Ctrl-Escape instead: /key(CTES). NEVER use a Winkey by itself; depressing a Winkey without releasing it will cause all manner of mystifying keyboard events. [/KEY(LW[]) will also open the Start Menu, because the empty alphanumeric string forces the Winkey to be released afterward.] Wait Time KEY(WT{##}): ========= KEY Wait Time may be inserted in text at any point. Express Wait Time in milliseconds, in integers. Wait Time takes a special syntax (note *curly braces* around the Wait value): key(WT{waittime_in_milliseconds}), e.g. key(WT{1000}). Scripts: ======= Complicated commands, or commands that do not fit on the DOS command line, may be entered into a file, identified to Go at runtime by a *fully-qualified* d:\path\filename.ext. Any script filename must be the FIRST argument to Go, immediately preceding the "Window Title", if any. You MUST include the drive:\path\ in the filespec! Enter commands on lines of any length, each terminated by a *true* carriage return (Ascii-13+10). Carriage returns are ignored. Do NOT use the command-line backslash character to initiate the script or individual lines (the command-line "/" character identifies text to be stuffed by Go, which is unnecessary in scripts because they are text- only, although you must still place the "Window Title" and other Go arguments on the command line). Scripts are executed one line at a time. Therefore, each line must be syntactically coherent. Do NOT break a line in the middle of a KEY() or CHR() statement! "Comments": ======== Non-executing Comments may be included in /Text arguments and Script lines, by prefixing the Comment with "///". The rest of the line on which a Comment appears will not execute. Note Well: Every character in a Go script is interpreted, so the Comment prefix must be situated *without intervening space* after the last executing character on the line, e.g.: key(CTALDL)t/// Bring up the Task Manager (Ctrl-Alt-Delete, T) Calling GoWP within WordPerfect: =============================== Easy. Typically GoWP would be used within a Macro. Here's a fragment that toggles the *system wide* CapsLock, something you cannot do from within WordPerfect: ... DLGINPUT(1) DOSCommand("kmd.exe /c start "+?PathMacroPersonal+"GoWP.exe "+NTOC(34)+"{self}"+NTOC(34)+" /key(CP)") EnterKey ... Change key(CP) to key(NM) to toggle the NumLock. Occasionally, the system CapsLock gets out of sync with the local WordPerfect CapsLock -- they have opposite states, and hitting CapsLock manually simply reverses the out-of-sync condition. To resynchronize the *local* CapsLock: DLGINPUT(1) DOSCommand("kmd.exe /c "+?PathMacroPersonal+"GoWP.exe "+NTOC(34)+"{self}"+NTOC(34)+" /key(CP)") EnterKey Another example: Open your computer "System Properties": DLGINPUT(1) DOSCommand("kmd.exe /c "+?PathMacroPersonal+"GoWP.exe "+NTOC(34)+"{self}"+NTOC(34)+" /key(LWBK)") //Left WinKey, BreakKey EnterKey Manipulating WordPerfect from DOS: ================================= In this example, intended for execution within a BATch file, we Save as plain Ascii text a file originally written in WP format. We then open the Ascii version in Notepad to see how it looks to DOS users. The BATch file might be arranged thus: GoWP.exe d:\path\GoScript.1 GoWP.exe "{self}" d:\path\GoScript.2 The file-based Go scripts called by the BATch file might look like this: GoScript.1 (runs within WordPerfect) ---------- key(F5)MYDOC.WPD/// In WP File Manager, specify filename "MYDOC.WPD" to Open key(ETCDCDET)/// Open it key(F7)s/// 'Save As' key(CTCR)key(BSBSBS)TXT/// Change MYDOC.WPD to MYDOC.TXT key(TB)2ASCII Text (Stripped)/// Specify 'Save As' Format as ASCII Stripped key(ETET)y/// Save file MYDOC.TXT and Close the window key(WT{2000})/// Wait 2 seconds for file to be written to Disk GoScript.2 (runs in Go's DOS session, i.e. "{self}") ---------- key(LW)r/// Open "Run" dialog Notepad MYDOC.TXTkey(ET)/// Open MYDOC.TXT in Notepad In Windows NT (NT|2K|XP), a more concise method of execution might be to call a second iteration of GoWP as a child of the first iteration, which means you are executing one DOS command, and only one script (GoScript.1; the content of GoScript.2 is executed directly on the command line): GoWP.exe "{self}" key(LW)rGoWP.exe d:\path\GoScript... ...key(ETWT{3000})key(LW)rNotepad MYDOC.TXTkey(ET) Or use replaceable parameters, and set this up with no scripts as a multi-purpose BATch file, e.g. commanding "Go.BAT MYDOC": Go.BAT: (assumes GoWP.exe is in the DOS Path) ------ GoWP.exe "{self}" /key(LW)rGoWP.exe /key(F5)%1.WPDkey(ETCDCDET)... ...key(F7)skey(CTCR)key(BSBSBS)TXTkey(TB)2ASCII Text (Stripped)... ...key(ETET)ykey(ETWT{3000})key(LW)rNotepad %1.TXTkey(ET) Manipulating Window Handles: =========================== Window hWnd handles are an unambiguous way of identifying a particular window, and then focusing on it. For example, suppose you have four different windows open all Titled "DOS Window". How can you distinguish among them? Key JW FocusHandle accepts two forms of argument. Examples: /key(JW{3109476}) <== indicate a specific Handle by hWnd /key(JW{WD}) or /key(JW{WM}) <== Handle previously-Read with key(RD) [key(WM) is always internally available] You can only read and save internally one program handle at a time (keys RD and WD). The handle of the currently-focused process is only available for internal storage with key RD when you are focused on it (obviously). Go's own handle (WM) is always available to write to screen directly, or to use within key(JW{WM}). Example: from the DOS command line (substitute an actual Window Title!): GoWP "Title of a Running Process" /key(RDWT{2000}JW{WM}WT{2000}JW{WD}) Go focuses on the specified Title, reads its hWnd handle, waits 2 seconds, focuses on Go's own process for 2 seconds, and finally focuses back on the process of the specified Title -- but this time by focusing on its previously-read hWnd, not its Title. Child Processes and Callbacks: ============================= Example: Run a second iteration of GoWP, and specify that it run in a specific "DOS Window"; ask it to do a DIR display of *.XYQ files (.XYQ files probably don't exist -- this way you can see what's happening on a 25 line screen): GoWP /key(WT{2000}JW{WM})start GoWP Wkey(WM[ /dir *.BASkey(ET)]ET) The parent iteration of Go goes to WordPerfect for 2 seconds (purpose: slow this procedure down and make it visible to you), then launches a second ("child") iteration of Go, passes to that child the handle of the parent's window via a "W" argument, and specifies the DIR command that the second iteration should issue. Both parent and child exit when they finish executing their commands. GoWP could easily do the same thing using WordPerfect services: GoWP /key(RDWT{2000}CTF1)6cmd/c start GoWP Wkey(WM[ /dir *.XYQkey (ETJW{]WD[})]ETET) Go's syntax is rebarbative, due to the need to be pithy on a short COMMAND.COM command line. Scripts with comments reveal the logic; the parent's commands are UPPERCASE, the child's commands lowercase: ------------------------------------------- KEY(RDWT{2000}CTF1)/// Read and save WordPerfect's hWnd; wait 2 seconds; /// issue Ctrl-F1 to get Shell menu, release keys /// 6CMD/C START GOWP W/// Type 6 to get WP's Shell to "DOS Command". Must use CMD /// /C or KMD /C, otherwise START fails. Begin writing a "W" argument, then... KEY(WM[ /dir *.xyqkey(et)key(fh{]WD[})]ETET)/// Poke parent's handle into /// the "W" arg, & begin to write the commands that will be interpreted by the /// second iteration of Go, e.g. "/" to start /text, then "dir *.XYQ", and /// EnterKey. After the DIR display, the child will return to WP, so put /// an "JW" FocusHeader command, but poke WordPerfect's hWnd, obtained by /// the parent, into the child's command. Finally, parent hits /// EnterKey twice, to launch the command and then to return from WP's shell /// state to the word processor. Parent exits. Child is still executing. ------------------------------------------- Notes: ===== Ascii-0 and Ascii-255 are RESERVED characters in /text strings. Do NOT use them! No CHR(255), for example. In file-based Scripts, CHR(8) is a RESERVED character. Use key(BS) BackSpace instead. Filename GoWP.DA2 in the Macros Personal Path is a RESERVED filename. If you use it for any other reason and run a file-based Go script, GoWP.DA2 *will* be erased. KMD.EXE is distributed with GSPrnVw6.EXE at: http://www.columbia.edu/~em36/wpdos/gsprnvw6.zip or can be separately downloaded from: http://www.serve.com/xywwweb/WIN95CMD.ZIP KMD.EXE is a version of CMD.EXE from Win2000 adapted for Win95, Win98, and WinME (it works also with WinNT, 2000, XP, etc). It does NOT (and MUST NOT) replace your current command processor (%COMSPEC%), but when called for specific purposes as the "brains" behind commands issued under it, KMD offers cross-platform uniformity of response across all Windows platforms (which means no more nitpicking about "which Windows are you running?"). An indispensable file. Situate KMD in the same directory as COMMAND.COM or CMD.EXE, depending on your platform. If you have a version of NT, you can replace any references in this document to "KMD" with "CMD". Or just install KMD and forget about it. KMD was originally part of a Microsoft SDK (under filename WIN95CMD.EXE). To learn more, Google "Win95cmd". APPENDIX A ========== List of Go KEY Commands ======================= KEY() Pseudo Command KeyPress ------- -------- SH Shift - LS Left Shift | RS Right Shift | CT Ctrl | LC Left Control | RC Right Control | Shifting keys AL Alt | LA Left Alt | RA Right Alt | LW Left Windows | RW Right Windows _| CP Caps Lock (reverse current state) - CO Caps Lock Off | CI Caps Lock On | NM Num Lock (reverse current state) | NO Num Lock Off | NI Num Lock On | Locking keys SL Scroll Lock (reverse current state) | SO Scroll Lock Off | SI Scroll Lock On | IN Insert (reverse current state) | IO Insert Off | II Insert On _| ET EnterKey XC Execute (not present on many keyboards) ES Esc SP Spacebar BS Backspace TB Tab PU Page Up PD Page Down EN End HM Home DL Delete CL Left Arrow (Cursor Left) CR Right Arrow (Cursor Right) CU Up Arrow CD Down Arrow BK Break/Pause PS Print Screen N0 Numpad 0 N1 Numpad 1 N2 Numpad 2 N3 Numpad 3 N4 Numpad 4 N5 Numpad 5 N6 Numpad 6 N7 Numpad 7 N8 Numpad 8 N9 Numpad 9 AD Add SU Subtract ML Multiply DV Divide DC Decimal SE Separator (not present on many keyboards) F1 F1 F2 F2 F3 F3 F4 F4 F5 F5 F6 F6 F7 F7 F8 F8 F9 F9 F0 F10 FE F11 FT F12 LB Left Mouse Button MB Middle Mouse Button RB Right Mouse Button VK{xx} VirtualKey code: write to screen *any* Virtual Key, represented by its two-character hexadecimal code (see Appendix B for the full list), e.g. KEY(VK{F6}). All VK{} codes are passed *verbatim*, WITHOUT error checking. Careful! It's worth noting that even if your physical keyboard hardware does not contain a particular key, Go can still stuff it in the keyboard buffer; if the currently-focused program recognizes that key, it *will* work! AK{xx} AwaitKey code: wait for user to hit a specified key, then resume Go processing. AK permits the user to put all other keys freely, until the specified key "xx" is struck. "xx" is a two-character hexadecimal Virtual Key code (see Appendix B) -- NOT a Go KEY() command! WT{##} WaitTime in milliseconds, e.g. KEY(WT{2000}) to pause Go for 2 seconds TM TitleMe: write to screen, or use in a JW{TM} command, the Title of "{self}", i.e. GoWP's own process, the Title of which is known to Go inherently, and is always available WM WindowMe: write to screen, or use in a JW{WM} command, the hWnd Handle of "{self}", i.e. GoWP's own process. The value of WM is known to Go inherently, and is always available. Unlike TM, the WM of a parent Go process may be passed to the runtime "W" argument of a child iteration of Go TD TitleDefault: write to screen, or use in a JW{TD} command, the Window Title of a window. At startup, and until it is overwritten by a subsequent RD command, this variable contains the Title of the default application, whatever it is: WordPerfect, an alternate "default app" specified by "Title", "{self}", or a handle passed with the runtime "W" argument TO TitleOriginal: write to screen, or use in a JW{TO} command, the Window Title of the executable when it initialized, i.e. WORDPERFECT. TO never changes. [NEW in v1.3.2] FW Fullscreen|Window: write to screen a one-character identifier, "F" or "W", representing the current window mode ("F"ullscreen VGA or Desktop "W"indow) of Go itself. [NEW in v1.3.3] WD WindowDefault: identical to KEY(TD), above, except that WD stores the hWnd handle pf the default application rather than the Window Title. Unlike TD, the WD of a parent Go process may be passed to the runtime "W" argument of a child iteration of Go RD ResetDefault: store the Window Title of the currently-focused process in KEY(TD) TitleDefault, and the hWnd Handle in KEY(WD) WindowDefault. KEY(RD) will overwrite the initial settings of keys TD and WD, which are set automatically to the initial target process, whatever it is or was (see TD and WD, above) S2 StoreToo: store the Window Title and hWnd Handle of additional, currently-focused processes to keys T0,T1,T2,...T9 and W0,W1,W2,...W9. KEY(S2) increments to the first empty T# and W# *pair*, starting with T0 and W0. Maximum = ten stored window Titles/Handles. Together with the Me keys TM and WM, Default keys TD and WD, and the external Input/Output keys IP and OP, thirteen key pairs may be stored T0 to T9 Titles_0_to_9: write to screen, or use within JW{T#} command, a Window Title saved with KEY(S2) W0 to W9 Windows_0_to_9: write to screen, or use within JW{W#} command, an hWnd Handle saved with KEY(S2) DR Write to screen the DRiveletter (one letter A-Z) of the current focused process PT Write to screen the \PaTh of the current focused process EX Write to screen the filename[.ext] of the current focused process (EXEcutable) FP Write to screen the fully-qualified d:\path\filename of the current focused process. This is equivalent to "key(DR[:]PT[\]EX)" IP InPut: await external manual keystrokes or GoWP (child process) keystuff (input is solicited in GoWP's process). InPut is terminated with a carriage return. Content of input, if length > 0, may be written back to the screen with KEY(OP) or used by JW{OP}. If IP is a numeric value (e.g. an hWnd window number), the content of IP is also stored in W# (W# increments W0-W9, to first empty W#), and the corresponding T# pair is voided, so that new InPut can be accepted and stored in OP. PR{text} PRompt issued when soliciting IP InPut. Default: "Waiting for input... (EnterKey [Ctrl-C aborts])" OP OutPut: write to screen the external input previously accepted by KEY(IP) GD Go Data: write to file GO.DAT, located in the same directory as your default command processor (the %COMSPEC%), the current status of all writeable internal variables [NEW in v1.3.4] JW{xx} JumpWindow: focus immediately on any process by {Title} or by hWnd {Handle}, e.g. KEY(JW{DinkyLimp Word}) or KEY(JW{82495}) Special KEY(JW{}) Usages: JW{TM} Focus on GoWP by Title (ambiguous, e.g. "DOS Window", cf. JM{WM}) JW{TO} Focus on Title key TO (the Original Title, i.e. WORDPEFECT) JW{TD} Focus on Title key TD JW{T#} Focus on Title keys T0,T1,T2,...T9 JW{WM} Focus on GoWP by hWnd handle (UNambiguous -- superior to JM{TM}!) JW{WD} Focus on hWnd Handle key WD JW{W#} Focus on hWnd handle keys W0,W1,W2,...W9 JW{OP} Focus on Handle previously accepted as external InPut by KEY(IP) NP No Operation (dummy key; it calls unassigned virtual key &HE8; system makes all low-level calls but nothing happens; *sometimes* this forces Locking keys to respond in Win9x). Identical to KEY(VK{E8}) APPENDIX B ========== List of Virtual-Key Codes ========================= Table of the symbolic constant names, hexadecimal KEY(VK{}) virtual-key codes used by Go (and Windows), and keyboard or mouse equivalents. Codes are listed in numeric order. ®SV01,0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ¯®SV02,0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ¯®SV03,X¯®SU04,®SV06,¯®XS01,03,,07,06¯®SX01,®IS06¯¯¯®SU05,®SV06,¯®XS02,03,,08,06¯®SX02,®IS06¯¯¯®LBa¯®IF®VA|02¯>0¯®GT05¯®LBb¯®IF®VA|01¯>0¯®GT04¯®SX10,®IS08¯+®IS07¯¯®SX11,®RK¯¯ÿ‚«dos/nv/z /c goxy.exe {self} /key(VK{®PV10¯})ÿ‚®IF®VA$SC¯<>115¯®GLb¯®EI¯ÿ®PV10¯®EX¯®EI¯®GLa¯®EI¯®PRNo dice¯®EX¯ Constants: --------- VK_LBUTTON = 01 - Left mouse button VK_RBUTTON = 02 - Right mouse button VK_CANCEL = 03 - Control-break processing VK_MBUTTON = 04 - Middle mouse button (three-button mouse) VK_XBUTTON1 = 05 - Windows 2000/XP: X1 mouse button VK_XBUTTON2 = 06 - Windows 2000/XP: X2 mouse button Undefined = 07 VK_BACK = 08 - BACKSPACE key VK_TAB = 09 - TAB key Reserved = 0A-0B VK_CLEAR = 0C - CLEAR key VK_RETURN = 0D - ENTER key Undefined = 0E-0F VK_SHIFT = 10 - SHIFT key VK_CONTROL = 11 - CTRL key VK_MENU = 12 - ALT key VK_PAUSE = 13 - PAUSE key VK_CAPITAL = 14 - CAPS LOCK key VK_KANA = 15 - Input Method Editor (IME) Kana mode VK_HANGUEL = 15 - IME Hanguel mode (maintained for compatibility; use VK_HANGUL) VK_HANGUL = 15 - IME Hangul mode Undefined = 16 VK_JUNJA = 17 - IME Junja mode VK_FINAL = 18 - IME final mode VK_HANJA = 19 - IME Hanja mode VK_KANJI = 19 - IME Kanji mode Undefined = 1A VK_ESCAPE = 1B - ESC key VK_CONVERT = 1C - IME convert VK_NONCONVERT = 1D - IME nonconvert VK_ACCEPT = 1E - IME accept VK_MODECHANGE = 1F - IME mode change request VK_SPACE = 20 - SPACEBAR VK_PRIOR = 21 - PAGE UP key VK_NEXT = 22 - PAGE DOWN key VK_END = 23 - END key VK_HOME = 24 - HOME key VK_LEFT = 25 - LEFT ARROW key VK_UP = 26 - UP ARROW key VK_RIGHT = 27 - RIGHT ARROW key VK_DOWN = 28 - DOWN ARROW key VK_SELECT = 29 - SELECT key VK_PRINT = 2A - PRINT key VK_EXECUTE = 2B - EXECUTE key VK_SNAPSHOT = 2C - PRINT SCREEN key VK_INSERT = 2D - INS key VK_DELETE = 2E - DEL key VK_HELP = 2F - HELP key 0 key = 30 1 key = 31 2 key = 32 3 key = 33 4 key = 34 5 key = 35 6 key = 36 7 key = 37 8 key = 38 9 key = 39 Undefined = 3A-40 A key = 41 B key = 42 C key = 43 D key = 44 E key = 45 F key = 46 G key = 47 H key = 48 I key = 49 J key = 4A K key = 4B L key = 4C M key = 4D N key = 4E O key = 4F P key = 50 Q key = 51 R key = 52 S key = 53 T key = 54 U key = 55 V key = 56 W key = 57 X key = 58 Y key = 59 Z key = 5A VK_LWIN = 5B - Left Windows key (Microsoft Natural keyboard) VK_RWIN = 5C - Right Windows key (Natural keyboard) VK_APPS = 5D - Applications key (Natural keyboard) Reserved = 5E VK_SLEEP = 5F - Computer Sleep key VK_NUMPAD0 = 60 - Numeric keypad 0 key VK_NUMPAD1 = 61 - Numeric keypad 1 key VK_NUMPAD2 = 62 - Numeric keypad 2 key VK_NUMPAD3 = 63 - Numeric keypad 3 key VK_NUMPAD4 = 64 - Numeric keypad 4 key VK_NUMPAD5 = 65 - Numeric keypad 5 key VK_NUMPAD6 = 66 - Numeric keypad 6 key VK_NUMPAD7 = 67 - Numeric keypad 7 key VK_NUMPAD8 = 68 - Numeric keypad 8 key VK_NUMPAD9 = 69 - Numeric keypad 9 key VK_MULTIPLY = 6A - Multiply key VK_ADD = 6B - Add key VK_SEPARATOR = 6C - Separator key VK_SUBTRACT = 6D - Subtract key VK_DECIMAL = 6E - Decimal key VK_DIVIDE = 6F - Divide key VK_F1 = 70 - F1 key VK_F2 = 71 - F2 key VK_F3 = 72 - F3 key VK_F4 = 73 - F4 key VK_F5 = 74 - F5 key VK_F6 = 75 - F6 key VK_F7 = 76 - F7 key VK_F8 = 77 - F8 key VK_F9 = 78 - F9 key VK_F10 = 79 - F10 key VK_F11 = 7A - F11 key VK_F12 = 7B - F12 key VK_F13 = 7C - F13 key VK_F14 = 7D - F14 key VK_F15 = 7E - F15 key VK_F16 = 7F - F16 key VK_F17 = 80 - F17 key VK_F18 = 81 - F18 key VK_F19 = 82 - F19 key VK_F20 = 83 - F20 key VK_F21 = 84 - F21 key VK_F22 = 85 - F22 key VK_F23 = 86 - F23 key VK_F24 = 87 - F24 key Unassigned = 88-8F VK_NUMLOCK = 90 - NUM LOCK key VK_SCROLL = 91 - SCROLL LOCK key OEM specific = 92-96 Unassigned = 97-9F VK_LSHIFT = A0 - Left SHIFT key VK_RSHIFT = A1 - Right SHIFT key VK_LCONTROL = A2 - Left CONTROL key VK_RCONTROL = A3 - Right CONTROL key VK_LMENU = A4 - Left ALT key VK_RMENU = A5 - Right ALT key VK_BROWSER_BACK = A6 - Windows 2000/XP: Browser Back key VK_BROWSER_FORWARD = A7 - Windows 2000/XP: Browser Forward key VK_BROWSER_REFRESH = A8 - Windows 2000/XP: Browser Refresh key VK_BROWSER_STOP = A9 - Windows 2000/XP: Browser Stop key VK_BROWSER_SEARCH = AA - Windows 2000/XP: Browser Search key VK_BROWSER_FAVORITES = AB - Windows 2000/XP: Browser Favorites key VK_BROWSER_HOME = AC - Windows 2000/XP: Browser Start and Home key VK_VOLUME_MUTE = AD - Windows 2000/XP: Volume Mute key VK_VOLUME_DOWN = AE - Windows 2000/XP: Volume Down key VK_VOLUME_UP = AF - Windows 2000/XP: Volume Up key VK_MEDIA_NEXT_TRACK = B0 - Windows 2000/XP: Next Track key VK_MEDIA_PREV_TRACK = B1 - Windows 2000/XP: Previous Track key VK_MEDIA_STOP = B2 - Windows 2000/XP: Stop Media key VK_MEDIA_PLAY_PAUSE = B3 - Windows 2000/XP: Play/Pause Media key VK_LAUNCH_MAIL = B4 - Windows 2000/XP: Start Mail key VK_LAUNCH_MEDIA_SELECT = B5 - Windows 2000/XP: Select Media key VK_LAUNCH_APP1 = B6 - Windows 2000/XP: Start Application 1 key VK_LAUNCH_APP2 = B7 - Windows 2000/XP: Start Application 2 key Reserved = B8-B9 VK_OEM_1 = BA - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key VK_OEM_PLUS = BB - Windows 2000/XP: For any country/region, the '+' key VK_OEM_COMMA = BC - Windows 2000/XP: For any country/region, the ',' key VK_OEM_MINUS = BD - Windows 2000/XP: For any country/region, the '-' key VK_OEM_PERIOD = BE - Windows 2000/XP: For any country/region, the '.' key VK_OEM_2 = BF - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key VK_OEM_3 = C0 - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key Reserved = C1-D7 Unassigned = D8-DA VK_OEM_4 = DB - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key VK_OEM_5 = DC - Used for miscellaneous characters; it can vary by keyboard. - Windows 2000/XP: For the US standard keyboard, the '\|' key VK_OEM_6 = DD - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key VK_OEM_7 = DE - Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key VK_OEM_8 = DF - Used for miscellaneous characters; it can vary by keyboard. Reserved = E0 OEM specific = E1 VK_OEM_102 = E2 - Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard OEM specific = E3-E4 VK_PROCESSKEY = E5 - Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key OEM specific = E6 VK_PACKET = E7 - Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. Unassigned = E8 OEM specific = E9-F5 VK_ATTN = F6 - Attn key VK_CRSEL = F7 - CrSel key VK_EXSEL = F8 - ExSel key VK_EREOF = F9 - Erase EOF key VK_PLAY = FA - Play key VK_ZOOM = FB - Zoom key VK_NONAME = FC - Reserved VK_PA1 = FD - PA1 key VK_OEM_CLEAR = FE - Clear key