[LastRev.11/4/06]

Manual for Go??.EXE v1.5.0
[GoXy.EXE, GoNB.EXE, GoWP.EXE, and GoMW.EXE]
4 November 2006

Freeware Win32 only ©Robert J. Holmgren «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: GoXy.EXE — Go XyWrite GoNB.EXE — Go Nota Bene GoWP.EXE — Go WordPerfect GoMW.EXE — Go Microsoft Word This document, while tailored for WordPerfect, is intended for all four executables. Substitute the name of YOUR executable wherever it mentions “WP” or “WordPerfect”.
Contents
  • Purpose
  • Requirements
  • Usage Summary
  • Text
  • Commands
  • Examples
  • Scripts
  • Comments
  • Calling Go within WordPerfect|XyWrite|Nota Bene|Microsoft Word
  • Manipulating WordPerfect|XyWrite|Nota Bene|Microsoft Word from DOS
  • Manipulating Window Handles
  • Child Processes and Callbacks
  • Notes
  • Appendix A: Go Virtual-Key Mnemonics
  • Appendix B: Go Internal Command Reference
  • Appendix C: Table of Virtual-Key Codes
  • Contact Me...

    Purpose The primary function of GoWP [GoXy, GoNB, GoMW] is to restore WordPerfect [XyWrite, Nota Bene, Microsoft Word] 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 optionally can be controlled by a file-based script which Go reads at runtime. Requirements Issue arguments in the order specified in “Usage”, below WordPerfect's Window Title must contain the case-INsensitive substring "WORDPERFECT" [or "XYWRITE", "NOTA BENE", "MICROSOFT WORD"]. Set the Window Title in a Shortcut's “Properties”. For DOS “PIF” Shortcuts, set it in the topmost box of the “Program” tab; for GUI “LNK” Shortcuts, set it in the topmost box of the “General” tab 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 (this is the hard-to-find latest version) at http://vbnet.mvps.org/files/runtimes/vbrun60sp6.zip) Locate MSVBVM60.DLL in the (Win9x|ME) "C:\WINDOWS\SYSTEM" or (WinNT+) "[BootDriveLetter]:\WINDOWS[or WINNT]\system32" folder — in both cases, these are the System or %COMSPEC% folders. Then install it with this DOS command: Regsvr32.exe MSVBVM60.DLL<cr> Usage GoWP.EXE ["Title"|w{hWnd_handle}] [waittime_in_milliseconds] [c] [t] [b] [f] [q] [n] [r] [d] [/text] | [h] or GoWP.EXE d:\path\filename ["Title"|w{hWnd_handle}] [waittime_in_ms] [c] [t] [b] [f] [q] [n] [r] [d] | [h] where: h Help 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 Scripts, below, for full description] "Title" Case-INsensitive Window Title, in quotation marks [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 c Search for Titles and Handles among Child windows as well as Top-level windows Applies to all searches undertaken by Go [NEW in v1.4.1] t Search for Titles and Handles among Thread windows as well as Child and Top-level windows [NEW in v1.4.1] b Silently Bide (wait) until target process appears in the Process List; may be combined with F; incompatible with Quiet [NEW in v1.3.1] f Silently wait until target process Finishes (terminates), then optionally stuff /text; may be combined with Bide [NEW in v1.2.15] q Quiet (no error message) if “Window Title” not found; incompatible with B [NEW in v1.2.9] n Check whether Title exists, but do Not Focus; Title Not Found returns ErrorLevel 1 to DOS (in Win9x, you must first run Go.COM, in the same dir as %COMSPEC%, to obtain the ErrorLevel; under 9x, Go.COM (6 bytes long) is written to the Windows system directory automatically if an errorlevel is returned) [NEW in v1.3.7] r Stuff /text [required] into the keyboard buffer of the “Window Title” process, then Restore focus to GoWP.EXE d Debug and display /text and file-based scripts after parsing (Go does not execute) /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 Commands, below Text: Stuffing plain text into the current window is the primary purpose of the /text command. Reserved DOS characters like “&”, “|”, or “>” must be escaped with the “^” character, e.g. “... /echo dir %temp%^>FOO.BAT” Commands: Go has a built-in interpreter, and a language with numerous commands. Commands are expressed in two statements, KEY() and CHR(). These enable remote control of any application, in FullScreen DOS or the Windows GUI. Commands are case-INsensitive (key=KEY=Key=kEY etc), with one exception within IF conditionals. CHR(): Stuff characters that have no ready keystroke, such as a LineEnd (CHR(13), LineFeed CHR(10), 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 can be stuffed by Go only under Win5.0+ (Win2000 and up), where they are treated as Unicode; but many programs have a sequence of commands that can write those characters to the screen under any operating system — in WPDOS v6.x, for example, a Cedilla (Ascii-128) can be stuffed, per example code below, with Ctrl-W 1,38.) You cannot nest a CHR() command within a KEY() command. Characters 0, 5, 6, and 8 are reserved. Do not use them in CHR() statements! For character 8, use KEY(BS) BackSpace instead. 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 hexadecimal code recognized by Windows (all virtual key codes are listed in Appendix C). The VK Unicode Packet "E7" is disabled because Go automatically uses Unicode in all available operating systems (Win2K and up). All KEY commands are two characters, e.g. CT for CTrl, ET for EnTer, BS for BackSpace. 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) Bracketed [literals] are never executed; they are written verbatim into the keyboard buffer. Go also has a group of “internal commands” that perform highly useful, specialized functions, e.g. jump between windows, rename windows, accept and act upon user input, return variables to the screen, to a file, or to Go itself, determine underlying filenames and paths, perform conditional actions, jump to Labels, etc. For full details, see the Command Reference, Appendix B. 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 Locking 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 concepts that represent “Off” and “On”, because KEYs "N0" and "N1" are already in use as Numpad keys]. Ambiguous Locking keys (CP NM CL IN) stay On until you issue them again to turn them Off, or until a KEY statement ends (close parenthesis), or until a Go /text or script ends (i.e. Go terminates). 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 one character with the Shifting state retained, 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, redirect a directory display into a file, return to WP, then Retrieve the 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 WORDS*; 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 (LW, RW) to perform Windows tool shortcuts, such as LeftWinkey-R (show the Run dialog), LeftWinkey-M (Minimize all windows, i.e. show the Desktop), LeftWinkey-D (toggle do/undo Minimize all windows), LeftWinkey-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 NEVER use a Winkey by itself; depressing a Winkey without releasing it will cause all manner of mystifying keyboard events. Do NOT use a Winkey to open the Start Menu! Use CTrl-EScape instead: /key(CTES). [/KEY(LW[]) will also open the Start Menu, because the empty alphanumeric string forces the Winkey to be released afterward.] Examples GoWP Focus on a process with case-INsensitive "WORDPERFECT" in its Window Title It is imperative that the target native process be started with a Shortcut (or a START "Title" ... command) in which the Title includes the keyword that Go expects to find: for GoWP, "WordPerfect" (no space char); for GoXy, "XyWrite"; GoNB, "Nota Bene" (with space); GoMW, "Microsoft Word" (with space). This is a basic premise of Go's operation, and you must set this Title manually in the Shortcut or BATch file! GoXy Focus on a process with case-INsensitive "XYWRITE" in its Window Title GoWP 1500 Wait 1.5 seconds (1500 milliseconds), 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 an alternative process with "Notepad" contained (as a substring) in its Window Title. "otepad" "oTePa" or ANY case-INsensitive substring of the Title will suffice if it is unambiguous, i.e. no other Window has the same substring in its Title. The alternative Title must be enclosed in quotes. GoWP "" Empty Title argument "" focuses the current Foreground window No change of focus, even if using "START [/min ]GoWP ..." [CHANGED in v1.3.2: "" no longer focuses "Program Manager"] GoWP "Program Manager" Focus the Windows Desktop (but do NOT minimize windows) GoWP "Program Manager" /mKEY(ET) Focus the Windows Desktop, launch the one (and only) application Title beginning with letter "M", e.g. "Media Player Classic" GoWP "{self}" Focus on Go's own session. Handy for debugging and experimentation GoWP /Hello World! Focus on "WordPerfect" and stuff "Hello World!" into a WP text window GoXy /Très bien! Focus on "XyWrite" and stuff 8-bit characters (Ascii 128-255) (Win2000 and up only). The characters are put (internally) as Unicode. Unicode characters will crash Go if the current CodePage does not support them. E.g., in CodePage 850 a character like "è" (character 138) is supported, whereas in CodePage 1252 character 138 is NOT supported ("è" is character 232 in CP1252) [8-bit character stuffs are NEW in v1.4.1] GoWP "Super Shareware Application" /CHR(13) or (identical result) GoWP "Super Shareware Application" /KEY(ET) Kill a nag screen by stuffing EnTer key into keyboard buffer, in response to nag's "OK" prompt DOS BATch file: C:\>start /min GoWP.exe "Super Duper App" b /key(WT{11000}ET) C:\>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 "Notepad" r /Boo!KEY(ET) Poke the string "Boo!<cr>" into Notepad's text window, then Restore (return to) Go's native target process – here, WordPerfect (we've employed the GoWP executable). Uses the reserved string "KEY(xx)" to issue Go commands (in the example, "ET" is the EnTer Key). You can manipulate external programs, such as macros, signal to a waiting external program that a task has completed, etc. etc. — Go Anywhere, then return "home"! Following are synonyms. All write "Boo!<cr>" into Notepad's window, then return to Go's native target process. The differences lie in the way they return to Go's session: GoWP "Notepad" /Boo!KEY(ETJW{TO}) find WP by Window Title ["JumpWindow{TitleOriginal}"] GoWP "Notepad" /Boo!KEY(ETJW{WordPerfect}) ditto: specify WP literally The following Jump, not to Go's native target process, but to GoWP's own session or window: GoWP "Notepad" /Boo!KEY(ETJW{TM}) find "Me" by Window Title ["JumpWindow{TitleMe}"] GoWP "Notepad" /Boo!KEY(ETJW{WM}) find "Me" by Window Handle ["JumpWindow{WindowMe}"] GoWP "{self}" /KEY(S2JW{Notepad}[Boo!]ETJW{W0}) find "Me" by first stored Window Handle [procedure: StoreToo the Title and hWnd of Me or "self", JumpWindow{Notepad}, stuff "Boo!<cr>", JumpWindow{WindowZero}] Those three examples work. GoWP "Notepad" /Boo!KEY(ETJW{GoWP}) find "Me" by specifying Me literally But that doesn't work. The problem is that Go's own Title usually includes all the parameters that it is calling. Try this: launch Notepad, then command GoWP "Notepad" /key(JW{WM}RDWC{TD}) Here, Go writes it's own Title [JumpWindow{WindowMe},ResetDefault,WriteConsole{TitleDefault}] in Go's own console (window). Windows thinks that Go's own title is something like 'DOS Window - GoWP "Notepad" /key(JW{WM}RDWC{TD})'. In other words, Go's Title contains the same name as the window that Go seeks to find! Thus, when you command 'GoWP "Notepad"', you would be as likely to find Go itself as your target "Notepad" application. Therefore, jumping to Go's own window by literal Title or by stored T# is disallowed. However, you may jump to Go's own window with keys TM, WM, or stored W#, i.e. find Me using the TitleMe or WindowMe keys, or by storing the Window number of Me (with key S2) and then recalling it (the first three of four examples above) GoWP "{self}" /KEY(JW{Notepad})Boo!KEY(ETJW{List}) Specify literally, and successively Jump to, two non-default processes (Notepad & List), stuffing "Boo!<cr>" in the first window GoWP "Program Manager" /key(LW)d Minimize all windows and Show the Desktop (LeftWindows key, d) [KMD /c ]Start filename & GoWP "" 2000 f /key(JW{TO}) Start application "filename", then start GoWP, wait 2 seconds for filename to initialize, focus filename, wait for filename to terminate, then JumpWindow to TitleOriginal (i.e. restore focus to "WORDPERFECT"). Use KMD.EXE in 9x! (download & install file KMD.EXE!!) GoWP "Outlook" /key(AL)key(SP)n ¯| GoWP "Outlook" /key(ALSP)n | Identical results GoWP "Outlook" /key(AL[ n]) | GoWP "Outlook" /key(AL) n _| MiNimize execrable application (issue Alt, Spacebar, [release], N). ALt is a Shifting key, which is released after the first alphanumeric is stuffed. The fourth example works, even though ALt is released after the space character, because the Window menu is now displayed and awaits a keystroke. In fact, none of these examples require that the ALt key be depressed after the space character due to the way the Window menu works; but it can be held down through issuance of "N", and indeed the third example does hold it down (because Shifting keys are always held down throughout bracketed "[chars]" within a KEY() statement. Note that the miNimized application is moved to the end of the Z-order in the Alt-Tab list of running (visible) apps. GoWP "Outlook" /key(ALSP)c Close execrable application GoWP /key(CTF1)1key(CP)exitCHR(13) Re-synchronize opposite CapsLock states in the OpSys and WordPerfect. This anomaly occurs frequently with DOS apps that try to independently control the keyboard. Sometimes you must issue this command twice to achieve re-synchronization — experiment! dos/nv/x/z /c kmd.exe /c GoXy "{self}" /key(CP)&exit<cr> Ditto, from the XyWrite command line GoWP /key(CT)w1,38key(ET) Put Cedilla in WP (Ctrl-W, char 1,38) GoWP "XyWrite" /Ç GoXy /Ç Put Cedilla in XyWrite (Ascii 128 in CodePages 437|850). Ascii 126-255 work only in Win2K+. GoWP needs to be explicitly retargeted at XyWrite, whereas GoXy is inherently targeted at XyWrite GoWP /KEY(AL)cKEY(ALF4JW{Microsoft Word}CT)vKEY(JW{WD}) Copy WP-DOS v5|v6 text (using Clip.EXE for WP) into M$Word, then return to WP; performs a “round trip” (assumes Windows Copy [with Clip] key is assigned to Alt-C in WP) GoWP "" /key(S2JW{TaskName1}S2JW{TaskName2}S2JW{TaskName3}S2WC{W0}WC{W1}WC{W2}WC{W3}JW{WM}) StoreToo (key S2) the hWnd window number of other processes (write them to Go's console with key WC{W#}, to prove that Go knows the unambiguous window numbers of multiple "Tasknames" and, thus, is capable of jumping between them at random GoWP "editor" /key(ST{WD,Xy Write}) Focus on "editor"; SetTitle (change Window Title from "editor" to "Xy Write") Execute: GoXy "Excel" /KEY(DRIT{:}PTJW{WM}[echo chdir /D ]AT[^>.\TMP.BAT]ET) Create a BATch file in Go's directory, to ChangeDir to Excel's directory GoXy "Excel" /KEY(DRIT{:}PTJW{WM}[echo cd /D ]AT[^>%TEMP%\TMP.BAT]ET[echo start %COMSPEC% /c del %TEMP%\TMP.BAT^>^>%TEMP%\TMP.BAT]ET[%TEMP%\TMP.BAT]ET) Create a BATch file in the system %TEMP% directory, execute it, then delete it Investigate: GoWP "" 2000 /key(S2WC{W0}) Get the hWnd handle of a currently-focused process with unknown (or no assigned) Title, e.g. the System Tray (Go waits 2 seconds to allow you to manually click on (focus) SysTray, then reports its hWnd in Go's own window) C:\>EnumAllWind.exe >ENUMALL.TXT Utility (included in Go.ZIP) to list all running Titles and hWnds. Here, the output of EnumAllWind is redirected to ENUMALL.TXT (normally to StdOut). This lets you determine the Title and Window number of both visible and invisible windows. EnumAllWind provides the x,y pixel coordinates of each window, to assist in finding it. Look particularly for "Top-Level Windows" GoWP w9813 /key(ST{WD,Xy Write}) Focus on process with known hWnd handle but unknown current Title, and SetTitle (change its Window Title to unique/identifiable name) GoWP "{self}" /key(ST{9813,Xy Write}) Focus on one process and SetTitle of a different process BATch file ERRORLEVEL Example #1: C:\>@GoXy.EXE "Go_OED" q n /key(JW{Oxford English Dictionary}) [C:\>@go.com] [required to return errorlevel in 9x; illegal in NT] C:\>@if errorlevel 1 start /min "Go_OED" GoXy.EXE "Oxford English Dictionary" f /key(JW{TO}) BATch file to detect whether GoXy is already running (restrict GoXy to one iteration only); return to XyWrite when the focused process terminates. Under Win9x, Go.COM (6 bytes long) is written to the Windows system directory automatically if an errorlevel is returned — just call it BATch file ERRORLEVEL Example #2: C:\>@echo off C:\>C:\WINDOWS\system[32]\GoXy.EXE q n C:\>::Remove colons on next line if Win9x! C:\>::C:\WINDOWS\system\go.com C:\>if not errorlevel 1 goto running C:\>start /min "d:\path\XYWRITE.PIF" C:\>start /min C:\WINDOWS\system[32]\GoXy.EXE b /key(WT{4000}F5[ca %1]ET) C:\>goto x C:\>:running C:\>start /min C:\WINDOWS\system[32]\GoXy.EXE /key(F5[ca %1]ET) C:\>:x BATch file to detect whether XyWrite (EDITOR.EXE) is running (if not, to launch it via "XyWrite.pif", "b"ide until it starts, WaiT 4000ms for it to initialize), and then CAll argued file %1 Conditionals: GoWP /The current window is key(IF{TD=WordPerfect:G1}IF{TD=XyWrite IV:G2}L1)Corel's WP-DOSkey(G3L2)XyQuest's XyWritekey(L3) GoWP /key(IT{The current window is }IF{TD=WordPerfect:G1}IF{TD=XyWrite IV:G2}L1JW{WM}AT)Corel's WP-DOSkey(G3L2JW{WM}AT)XyQuest's XyWritekey(L3) GoWP /key(TDJW{WM}[The focused window was ]IF{AT=WordPerfect:G1}IF{AT=XyWrite IV:G2}ATG3L1[Corel's WP-DOS]G3L2[XyQuest's XyWrite]L3) GoWP /The current window is key(IF{FW=F:G1}IF{FW=W:G2}L1)FullScreenkey(G3L2)a Desktop Windowkey(L3) Conditionals, "L#"abels, and "G#"o-labels key(IF{x=y:do_something}). Ten Label and Go-label keys are available for use on any single script line (they can be recycled on new lines): L0-L9 and G0-G9 dos/nv/x/z /c GoXy "{self}" /key(IF{FW=W:ALET}) Force FullScreen VGA (Shell from the XyWrite command line) GoWP /key(L1WT{2000}RDWC{TD}IF{TD=XyWrite:G2}G1L2F5)print Why doesn't my script work? Find out with key(WC{xx}): it reports to Go's console (not the command line!) the value of any key, here TD TitleDefault. The purpose of this script is to force Go to trigger an action (print current document) when user focuses on XyWrite; otherwise Go simply loops. (Actually, this script works perfectly.) 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\scriptname.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 — when using scripts, you must still place the "Window Title" and other Go arguments on the command line). Scripts are executed one line at a time (although lines can be any length). Therefore, each line must be syntactically coherent. In particular, Go-to-label statements, and their Label referents, may not cross line boundaries. 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-DOS v6: ... 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 Calling GoWP within XyWrite|Nota Bene Example: Toggle between FullScreen VGA and a Desktop Window in XyWrite. The following ALt-EnTer code is designed for an XPL macro; the command could also be issued on the CMline: ...BX dos/nv/x/z /c GoXy "{self}" /key(ALET)Q2 ... Example: Reselect the Printer in NBWin. Due to the way DOS/NV works in NBWin, you must START a separate session via the command processor (CMD.EXE in this example): ...BX dos/nv/x/z /c cmd/c start /min GoNB /key(WT{500}AL)fkey(WT{500}[p]TBTBTBTBTBTBETWT{1500}ESES)Q2 ... 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\GoScriptkey(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 JumpWindow accepts two forms of argument. Examples: key(JW{3109476}) <== indicate a specific Handle by hWnd key(JW{WD}) or key(JW{WM}) <== indicate Go's default process by hWnd [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 when you are focused on it. If you intend to return to it later, you can save it for later use with key S2 (restore it with W# or T#), or you might Reset it as the Default app with key RD (restore it later with WD or TD). 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(WT{2000}JW{WM}WT{2000}JW{WD}) Go focuses on the specified Title (where it collects information about the process including 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 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(WMAT[ /dir *.XYQkey(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(WMAT[ /dir *.XYQkey (ETJW{]WDAT[})]ETET) [But here's a far simpler method that achieves the same result with a single (Parent) iteration of Go: GoWP /key(WT{2000}JW{WM}IT{dir *.XYQ}ATET) Less is more. Wait 2 seconds, Jump to Go's window, add the text "dir *.XYQ" to the AT command with IT InsertText, put AT on the command line of Go's session, and execute it with ET. Simpler still: GoWP /key(WT{2000}JW{WM}[dir *.XYQ]ET) Wait, JumpWindow, put plain text on the command line, execute.] Go's syntax is rebarbative, due to the need to be pithy on a short COMMAND.COM command line. The Go language is NOT flexible fuzzy and friendly; one misplaced parenthesis WILL sink a script. Scripts with comments reveal the logic; the parent's commands are UPPERCASE, the child's commands lowercase:
    KEY(RDWT{2000}CTF1)/// Reset as the Default 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 "DOSCommand". Must use CMD /// /C or KMD /C, otherwise START fails. Begin writing a "W" argument, then... KEY(WMAT[ /dir *.xyqkey(et)key(jw{]WDAT[})]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 /// a "JW" JumpWindow 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, 5, and 6 are RESERVED characters in /text strings. Do NOT use them! No CHR(0)! In file-based Scripts, CHR(8) is a RESERVED character. Use KEY(BS) BackSpace instead. All script files are copied into executable code as a new file, located in the same directory as the original script, and using the same filename with extension ".DA2". This is a RESERVED filename. If you use it for any other reason and run a file-based Go script, "scriptfilename.DA2" will be erased. KMD.EXE may be 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, read some of William Allen's newsgroup posts about “Win95cmd”. APPENDIX A Go Virtual-Key Mnemonics 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 Escape 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 • Insert ¯| N1 Numpad 1 • End | N2 Numpad 2 • Cursor Down | N3 Numpad 3 • Page Down | N4 Numpad 4 • Cursor Left | N5 Numpad 5 | N6 Numpad 6 • Cursor Right | N7 Numpad 7 • Home | Numpad keys N8 Numpad 8 • Cursor Up | N9 Numpad 9 • Page Up | AD Add + | SU Subtract - | ML Multiply * | DV Divide / | DC Decimal . • Delete | SE Separator (not present on many keyboards) _| F1 F1 ¯| F2 F2 | F3 F3 | F4 F4 | F5 F5 | F6 F6 | Function keys F7 F7 | F8 F8 | F9 F9 | F0 F10 | FE F11 | FT F12 _| LB Left Mouse Button ¯| MB Middle Mouse Button | Mouse keys [ENABLED in v1.4.1] RB Right Mouse Button _| APPENDIX B Go Internal Command Reference Data Keys are asterisked(*) 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 C), not a Go KEY() command! AT* AllText: Write all data accumulated by Go to the current cursor position, e.g. to the command line of Go's session or to any window that will accept text, e.g. a word processor. All data, plus plain text via IT{}, are concatenated. An AT command empties the AT buffer, which then can be refilled. Combined with command JW{WM}, AT enables data acquired in another process to be manipulated, stuffed on Go's DOS command line, and executed [NEW in v1.5.0] DR* Store the DRiveletter (letter A-Z, no colon) of the current focused process. Write to Go console with WC{DR}; write to screen with AT EX* EXecutable: Store the filename[.ext] of the current focused process. Write to Go console with WC{EX}; write to screen with AT FP* Store the fully-qualified d:\Path\Filename of the current. focused process. This is equivalent to "key(DRPTIT{\}EX)" Write to Go console with WC{FP}; write to screen with AT. Note that, in DOS command line sessions, FP (also DR, PT, and EX) will generally report the location of %COMSPEC% rather than the application running under %COMSPEC%. An exception is Go ("{self}"), which is always accurately reported. Write to Go console with WC{FP}; write to screen with AT FW* Fullscreen|Window: Store a one-character identifier, "F" or "W", representing the current window state ("F"ullscreen VGA or Desktop "W"indow) of Go itself. If Go is a child of a DOS process e.g. XyWrite, Go will return XyWrite's window state [NEW in v1.3.3] G0 to G9 Go-to labels_0_to_9: Go-to same-numbered Label on current line Because scripts are interpreted one line at a time, all Go-to keys must reference Labels on the same line [NEW in v1.4.1] 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 data keys [NEW in v1.3.4] IF{x=y:action} Conditionals: see examples [NEW in v1.4.1] "x" may be one of keys FW|OP|T#|TD|TM|TO|W#|WD|WM "y" may be a string literal, e.g. a Window Title, or one of keys FW|OP|T#|TD|TM|TO|W#|WD|WM If "y" is a string literal, expression "x=y" evaluates TRUE if y is contained (case-INsensitively) in x; to ensure that y is not misinterpreted as a KEY, write string y in lower case! if "y" is a Go KEY, expression "x=y" evaluates TRUE if the underlying value of key x=the underlying value of key y; to ensure that y is interpreted as a KEY, write KEY y in UPPER case! "action" is a string literal (written to screen) or a KEY, e.g. a G0-G9 "Go-to-label" key 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. IT* InsertText: Append a plain text string to the AT command's current data string, e.g. KEY(IT{chdir /D }DRPTJW{WM}ATET) – but note that KEY(DRPTJW{WM}[cd /D ]ATET) achieves an identical result without using IT: both Change the Directory of Go's own session to that of the program initially focused [NEW in v1.5.0] JW{xx} JumpWindow: Focus immediately on any process by {Title} or by hWnd {Handle}, e.g. KEY(JW{DinkyLimp Word}) or KEY(JW{82495}) If key JW{} succeeds, it returns ErrorLevel 0 to DOS If key JW{} fails, it returns Errorlevel 1 to DOS N.B. Under Win9x, you must run Go.COM after Go terminates to poll the ErrorLevel; this overcomes a requirement to compile Go as Native code rather than P-code, in order to avoid crashes using the "ExitProcess" API (Native code adds an extra 50Kb+ to Go's filesize). See an example of usage above. Under Win9x, Go.COM (6 bytes long) is written to the Windows system directory automatically if an errorlevel is returned. [NEW in v1.3.9] 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. WORDPERFECT | XYWRITE | NOTA BENE | MICROSOFT WORD) 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) L0 to L9 Labels_0_to_9: Keys that mark go-to positions in script lines [NEW in v1.4.1] MP Mouse Position: Set mouse position to pixel x=Left+1,y=Top+1 in current focused process. KEY(MPRB) opens the context menu of most windows NP No oPeration (dummy key; it calls unassigned virtual key E8; system makes all low-level calls but nothing happens; sometimes this forces Locking keys to respond in Win9x). Identical to KEY(VK{E8}) OP OutPut: Write to screen the external input previously accepted by KEY(IP) PR{text} PRompt issued when soliciting IP InPut. Default: "Waiting for InPut... (EnterKey [Ctrl-C aborts])" PT* Store the \PaTh of the current focused process. Write to Go console with WC{PT}; write to screen with AT 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) 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 ST{hWnd,Title} SetTitle: New Window Title for any process [NEW in v1.3.5] Special KEY(ST{}) Usages: ST{WM,Title} Change Title of WindowMe (current GoWP window) ST{WD,Title} Change Title of current Default process ST{W#,Title} Change Title of any process by stored hWnd W0,W1,...W9 T0 to T9* Titles_0_to_9: Display, within WC{T#}, JW{T#}, or AT commands, a Window Title saved with KEY(S2) TD* TitleDefault: Store, or use within JW{TD}, WC{TD}, or AT commands, the full Window Title of a window. At startup, or until it is overwritten by a subsequent RD command, this key contains the Title of the default application, whatever it is: WordPerfect, an alternate "default app" specified by "Title", "{self}", or the Title underlying a handle passed with the runtime "W" argument. TD is inherently known to Go, and never needs to be explicitly initialized TM* TitleMe: Store, or use within JW{TM}, WC{TM}, or AT commands, the Title of "{self}", i.e. GoWP's own process, the Title of which is known to Go inherently, and never needs to be explicitly initialized TO* TitleOriginal: Use, within JW{TO}, WC{TO}, or AT commands, the Window Title of the executable when it initialized, i.e. WORDPERFECT | XYWRITE | NOTA BENE | MICROSOFT WORD. TO never changes and never needs to be explicitly initialized [NEW in v1.3.2] TW “TerminWait”: Wait until process in focus at the moment TW is executed Terminates. Equivalent of an "f" switch, but issued within the stream of KEY commands, and therefore (unlike "f", which always precedes KEYs) may be preceded and/or followed by other KEY commands [NEW in v1.3.7] VK{xx} VirtualKey code: Write to screen any Virtual Key, represented by its two-character hexadecimal code (see Appendix C for the full list), e.g. KEY(VK{A3}) to stuff Right-Ctrl. 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! VK{E7} (the Unicode Packet) is disabled; Go uses Unicode by default in the operating systems that support it (Win2000 and up) W0 to W9* Windows_0_to_9: Use, within WC{W#}, JW{W#}, or AT commands, an hWnd Handle saved with KEY(S2) WC{xx} WriteConsole: Write to the screen (“console”) of Go's own session the value of any data(!) Key that has been previously stored. Primarily informational (handy for debugging scripts). N.B.: WC{} cannot write to the DOS command line; use AT, /text, or KEY([text]) instead [NEW in v1.4.2] WD* WindowDefault: Identical to KEY(TD), except that WD stores the hWnd handle of 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. WD is inherently known to Go, and never needs to be explicitly initialized WM* WindowMe: Use within JW{WM}, WC{WM}, or AT commands, the hWnd Handle of "{self}", i.e. GoWP's own process. The value of WM is known to Go inherently, and never needs to be explicitly initialized. Unlike TM, the WM of a parent Go process may be passed to the runtime "W" argument of a child iteration of Go WT{##} WaitTime in milliseconds, e.g. KEY(WT{2000}) to pause Go for 2 seconds. Wait Time may be inserted in text at any point. Express Wait Time in millisecond integers. Note the curly braces around the Wait value) APPENDIX C Table of Virtual-Key Codes Table of the symbolic constant names, hexadecimal KEY(VK{Hex}) virtual-key codes used by Go (and Windows), and keyboard or mouse equivalents. Codes are listed in hexadecimal order. VK_Name Hex 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 07 Undefined VK_BACK 08 BACKSPACE key VK_TAB 09 TAB key 0A Reserved 0B Reserved VK_CLEAR 0C CLEAR key VK_RETURN 0D ENTER key 0E Undefined 0F Undefined 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 16 Undefined VK_JUNJA 17 IME Junja mode VK_FINAL 18 IME final mode VK_HANJA 19 IME Hanja mode VK_KANJI 19 IME Kanji mode 1A Undefined 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 3A Undefined 3B Undefined 3C Undefined 3D Undefined 3E Undefined 3F Undefined 40 Undefined 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) 5E Reserved 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 88 Unassigned 89 Unassigned 8A Unassigned 8B Unassigned 8C Unassigned 8D Unassigned 8E Unassigned 8F Unassigned VK_NUMLOCK 90 NUM LOCK key VK_SCROLL 91 SCROLL LOCK key 92 OEM specific 93 OEM specific 94 OEM specific 95 OEM specific 96 OEM specific 97 Unassigned 98 Unassigned 99 Unassigned 9A Unassigned 9B Unassigned 9C Unassigned 9D Unassigned 9E Unassigned 9F Unassigned 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 N.B. Many keys nominally for “Windows 2000/XP” work perfectly in 9x! 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 B8 Reserved B9 Reserved 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 C1 Reserved (key 115 in XyWrite) C2 Reserved (key 126 in XyWrite) C3 Reserved C4 Reserved C5 Reserved C6 Reserved C7 Reserved C8 Reserved C9 Reserved CA Reserved CB Reserved CC Reserved CD Reserved CE Reserved CF Reserved D1 Reserved D2 Reserved D3 Reserved D4 Reserved D5 Reserved D6 Reserved D7 Reserved D8 Unassigned D9 Unassigned DA Unassigned 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 E0 Reserved E1 OEM specific VK_OEM_102 E2 Windows 2000/XP: On the RT 102-key keyboard, the '\|' key or the angle bracket key E3 OEM specific E4 OEM specific VK_PROCESSKEY E5 Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key E6 OEM specific VK_PACKET E7 Disabled in Go. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. Go uses Unicode by default in the operating systems that support it (Win2000 and up) E8 Unassigned E9 OEM specific EA OEM specific EB OEM specific EC OEM specific ED OEM specific EE OEM specific EF OEM specific F1 OEM specific F2 OEM specific F3 OEM specific F4 OEM specific F5 OEM specific 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

  • Robert J. Holmgren
    xywwweb@mail.serve.com