- Resolution: Use TYPEFILE.EXE and CMD:EXEC= to generate macro from file
- TypeFile will read a macro file, and process up to 2000 characters. By Using CMD:EXEC for Key Action, effective result will be the same as a normal Key Action keystroke macro.
- Download TYPEFILE.EXE 5/11/2009 (45k) (MD5: 66CB31F8CB435222F4A61E32BD0D9668) Only for Win32 Targets! (95 thru XP)
- Download TYPEFILE.EXE 11/2/2011 (45k) (MD5: 1CB5D3C3B7B4B7C4F1599C2CCB75306B) Only for 2.20 Win32 Targets! (MSWIN32 - 2000/XP/Vista/7) (See 2.20 Notes below)
- For Linux Typefile, see tech item ID2012120679
- Download and Note location on system where downloaded file is saved
- Using Windows Explorer, Open Program Files\Build-A-Board\Bin\Test
- Copy TYPEFILE.EXE into Program Files\Build-A-Board\Bin\Test Folder
- Using Windows Explorer, Open Program Files\Build-A-Board\Bin\MSWIN
- Also Copy TYPEFILE.EXE into Program Files\Build-A-Board\Bin\MSWIN folder
- After adding file, open your project, and rebuild to update TARGET folders.
- Using TypeFile:
- There are 2 key issues that must be addressed - 1) saving a macro in a file, and 2) using a shortcut with a command line as the EXEC= entry.
- 1-A) The easiest way to save a keystroke macro file is to use the Build-A-Board Macro Builder dialog - to get to this, create a temporary key (or use a temporary project). Hover over the key with the mouse cursor, then right-click, and open the properties. Find the Key Action entry, and click on the right-hand button (...) to open the dialog.
- 1-B) Build your macro as required, then click on Save.
- 1-C) The Save function will save files as .KMF files (Keyboard Macro File) - you should browse to the \Program Files\Build-A-Board\Target\[Your Project Name]\MSWIN folder & enter a name to save, e.g. MyMacro[Enter] The file saved will be MyMacro.kmf.
- 1-D) If you want to test with this from within the Builder, also save (or copy the saved file) to \Program Files\Build-A-Board\Target\[Your Project Name]
- 1-E) You can also open, edit, and save any Macro file from within the Build-A-Board Macro Builder dialog - just follow the steps above, but click Open, then browse to where you have saved the file. Save the file in the MSWIN folder under the project folder, and also remember to save (or copy) to Project folder (which is the test folder) if you want to test from within the Builder.
- 2-A) To specify the file name to TypeFile.exe, you must use a shortcut - You CANNOT use a command line within the CMD:EXEC function!!
- 2-B) To create a shortcut, use Windows Explorer and browse to the \Program Files\Build-A-Board\Target\[Your Project Name]\MSWIN folder
- 2-C) Right-click on TYPEFILE.EXE and select Create Shortcut - by default, the shortcut will be called Shortcut to TYPEFILE.exe
- 2-D) Rename the shortcut to something useful, e.g. TypeThis (or MyMacro1, Macro02, etc.)
- 2-E) Modify the shortcut to specify the macro file name that TypeFile will type - right-click on the shortcut, select Properties, and in the Target, enter the name of the Macro File, e.g. ...TYPEFILE.exe MyMacro
- 2-F) Now (in the project that needs this extra long macro), select the key that will type this extra long macro, right-click, and go to properties, and enter for Key Action: [CMD:EXEC=TypeThis] - then click OK. IMPORTANT NOTE: Shortcuts have a file extension of .lnk, and this is usually hidden in Explorer. In most cases, you will not need to specify this, but it can be a source of confusion - Windows Explorer WILL NOT show you the ACTUAL Operating System file name! You can use the Command prompt if necessary.
- Other Notes:
- The Key Action with CMD:EXEC will be compiled and be part of the project KBF file (e.g. KEYBOARD.KBF), but the files TYPEFILE.EXE, the keystroke macro files, and any shortcuts created are not part of the source files - be sure to save / backup these files. Suggestion: You can manually copy them into the Source folder for the project prior to Closing the project.
- The shortcut name shown in Windows Explorer will have the .lnk extension, but this is not necessary to specify with the CMD:EXEC command in Build-A-Board.
- TYPEFILE.EXE will look in the same folder it is running from for the file name specified in the command line. If the file specified does not have an extension, it will add the .KMF extension. If you include a path, it will only look for the file in the specified location (i.e. it will not look in the folder where it is located).
- If you experience any difficulties, break each action into pieces - to test with TypeFile.exe, My-T-Soft must be running, but you can run the sample (i.e. Start Menu | Programs | Build-A-Board | My-T-Soft), and minimize it, then test with TypeFile.exe. The macro file is just a text file - use Notepad, and enter a few characters, then save the file as test.kmf (i.e. ANSI, NOT Unicode). Also, you may want to follow the above steps in a new project, prior to trying to integrate into an existing project.
- You may also specify the macro on the command line (effectively about 128 character limit, although this could vary). This approach is primarly for external manipulation by an application, not for use within Build-A-Board. If using words (vs. commands), be sure a file name does not exist with the macro you use - the first check is to see if a file name is specified on the command line.
- Version 2.20 Notes. The file downloaded as typefile220.exe can be renamed to typefile.exe if desired. The Key Action macro limits do not apply to the 2.20 version. The typefile utility can still be helpful for external control of keyboard command, etc., i.e. using [CMD:NKBF=NewLayout.kbf] can be helpful to allow an external application or tool to externally select a new layout to be displayed.
Original ID: PU225149
Category: Using | Type: Problem/Resolution | Product: Build-A-Board | Version: 2.10 |
Notes:
As seen in ...