APPBATCH >>>>>>>>>>>>>> MACROS for the Portfolio !!! <<<<<<<<<<<<<<<< Some of the frequently used Portfolio applications just take too many keystrokes. For instance looking for a telephone- number and dialing it takes as many as fifteen keystrokes. A batch file for doing this would come in handy. But using just DIP doesn't allow APP programs beeing used in batchfiles. The utility FAKE.COM does. This short DOS command is public domain since it was published in the december 1985 issue of PC magazine. It emulates keyboard input. Using FAKE.COM you can make a batch files like DIAL.BAT so that when you type DIAL jim it: 1 - starts the APP applications 2 - chooses the Address book 2 - Searches for the name jim in your current .ADR file. 3 - Sets up the dialing screen for the first occurence of "jim". HOW DOES IT WORK ? Fairly simple: after the command FAKE you can add a string of keystrokes. Normal keystrokes are written as a normal string, between "", or by typing the ASCII code for each keystroke (decimal), seperated by spaces. Extended keyboard codes can be sent using a leading @ and the extended code in decimal notation. Syntax for using FAKE.COM (mostly in BATCH files :) FAKE ["letters"] [00] [@00] As you probably know you can make the actions of a batch com- mand 'invisible' (in DOS 3.3 and higher) by using a leading @. The batchfile DIAL.BAT as described above would look like this: @FAKE "app" 13 97 @59 115 "%1" 13 @59 100 ž ž ž ž ž ž ž ž ž ž ĄÄÄÄÄÄÅÄÄÄÄÅÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž Command ³ ³ ³ ³ ³ ³ ³ ³ ³ ĄÄÄÄÄÅÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž start APPlications ³ ³ ³ ³ ³ ³ ³ ³ ĄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž return ³ ³ ³ ³ ³ ³ ³ ĄÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž a for Address-book ³ ³ ³ ³ ³ ³ ĄÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž ATARI button (=F1) ³ ³ ³ ³ ³ ĄÄÄÄÅÄÄÄÅÄÄÄÅÄÄÄÅÄÄž s for Search ³ ³ ³ ³ ĄÄÄÄÅÄÄÄÅÄÄÄÅÄÄž expands to "jim" ³ ³ ³ on execution. ĄÄÄÄÅÄÄÄÅÄÄž return ³ ³ ĄÄÄÄÅÄÄž ATARI button ³ ĄÄÄž d for Dial SEARCH.BAT looks up a name in the current addres file and displays it. use: SEARCH name SERVE.BAT starts the SETUP/FILE TRANSFER/SERVER mode. use: SERVE THIN.BAT changes the SETUP/PRINTER/SETUP CODE, so that output from the standard PF applications are printed in condensed printing. Especially useful for wide spreadsheets. The printer codes used here work on most matrix printers (Epson-compatibles). use: THIN WIDE.BAT returns the printing mode to a "normal" 10 Characters per Inch. SHH.BAT toggles the Portfolio in to and out of MUTE mode (for use in Church or something...). CALC.BAT is a very fast way to calculate something from the DOS prompt, for instance : CALC 87*2048 use : CALC [calculation] LOAD.BAT starts the editor and immediately loads a file : use LOAD [filename] ALARM.BAT sets the alarm for a time (on the current day) use ALARM 14:00 or ALARM 14:00 message (the message may contain no spaces) MEMO.BAT writes the heading for a standard-memo. You can type the subject of the memo directly behind the command, like: MEMO subject_of_memo If in the DOS ENVIRONMENT a variabele %owner% has been declared (SET owner=S.J.Spoelstra) then this name is used in the memo header. For clarity : here is my AUTOEXEC.BAT : @ECHO OFF PROMPT $P$G PATH= C:\;A:; SET owner=S.J.Spoelstra ECHO %owner% APP If now I type MEMO bicycle then the file MEMO.TXT will look like this: --------Memo------------- Subj: bicycle Date: Sun 1-04-1990 Time: 20:10:54.00 From: S.J.Spoelstra To : ------------------------- Combination of the really quite extensive possibilities of BATCHFILES on the Portfolio with the tricks FAKE.COM makes possible will probably encourage users to find their own shortcuts for Portfolio operation. I would like to know if you do find new applications. ************************************************************** * IF THESE BATCHFILES GIVE PROBLEMS ON YOUR PF..... * ************************************************************** I use these batchfiles quite often on my Portfolio (DIP version 1.052) and they have not given me any problems, except when, while fooling around with MEMO.BAT , I ended up with a textfile ending in one space and a return. This is a well- documented BUG in Portfolio DIP, which makes it necessary to COLD-START the PF. Not the thing you want to have to do a lot. Reactions on the first release of APPBATCH were that users operating later DIP versions even had bigger problems using MEMO.BAT. It crashed the machine every time. The PF did display a apologetic remark (quite an improvement ,ATARI, thanks !) but it hung up the machine just the same. It now appears the PF editor is allergic to EVERY occurance of spaces before a hard return. That, at least, is my conclusion; I removed all unnecessary spaces from the MEMO.BAT file and now everything works fine, as well on the DIP v1.052 as on v1.072. My Portfolio is constantly in INSERT mode, so I designed for MEMO.BAT to leave the cursor one space behind `TO :'. If you prefer TYPEOVER mode then you will have to redesign the batchfile. With thanks to Peter ten Hoopen from Amsterdam, who typed in FAKE.COM from PC-Magazine . Sjoerd Spoelstra Comments to ATARI BBS HOLLAND (03473)77584/77376 APPENDIX : EXTENDED CODES FOR USE WITH FAKE.COM @59 F1 function key or ATARI button. @59-@68 F1 to F10 function keys @71 Home @72 Cursor Up. @73 Page Up. @75 Cursor Left. @77 Cursor Right. @79 End. @80 Cursor Down. @81 Page Down. @82 Ins. @83 Del.