And in the version available with this manual 2.0 of DiskWorks there is still another characteristic with these macros. First of all eme bad message: at execution any longer DW will not leave macros automatically. And now many good: one knows now macros both in used form (with a small change one) and within DiskWorks to use. E.g. mark of all *.BAK and automatic deletion. Those there are applications many. But the user no border is set and its fantasy there demanded.
Now however information to the extension of the language ' DWMac '.
Little exaggeration is always completely nice. Thus do not take with the macro language so seriously. It concerns not an excellent programming language, but rather around noting key sequences, which DW can play then again.
That calls itself then a macro starts '. Macros can be implemented both within and outside by DW. ' only ' the KEYBUFF$ of the operating system is actually used.
It is important only that one does not implement inadvertently a macro that for ' outside ' was intended, within Diskworks. That leads then with security to the crash of the computer.
A macro has in principle a quite simple structure. It begin with the key, which is to lead after operation to the fact that the macro is started. Then a space follows and then begins the instruction sequence, which are implemented.
Thus:
< KEY><SPACE><INSTRUCTION>
The < key > must be a key, which one can reach the quantity [ A..Z,a..z,0..9,!, ",#,$,%,&,?,:,',{,},[,],() by means of the keyboard thus,|,_,@,;Ñ,]. everyone should experiment with it times. But in approximately the all indication would have to be.
< SPACE > must be also not further explained, is however in each case emergency little.
And now to the < command sequence > there first also times each indication can in it, which over the keyboard is attainable. E.G. the consequence < LOAD"s2:dw" >. Well, and had then also equal flax a problem are uncovered there (you think), because as make clear I to the computer that I would like to have gedruec_t behind the load. also still another ENTER? No problem. There are even two solutions of this problem. First is the indication "~" (the tilde). In place of the tilde becomes from the macro interpreter (sounds oneself also well, was not?) a ENTER during the execution of the macros assigned.
Now it is to have occurred however already times that one not only a ENTER would like to have, but e.g. the code of the off key in a macro. Or the code of the CTRL key.
Or the SML key...
Well, also there is a solution. One can write key codes of each kind in DW.CFG as the following character sequence:
\<ASCII CODE \
Thus \ that means the off key the code into two diagonal strokes set in, e.g. \15 tilted to the rear, since the ASCIICode of the off key is 15.
So that all codes do not have to only still find it out, gibt's a table with the special codes. You can illustrate in this way also the normal ASCII indications in the macros. But it is to be finally written more simply "LOAD", than \76\\79\\65\\68 \
There is still another small however nothing the despite fine characteristic. With the character sequence
\ @
the file name of the highest display line can be inserted in the place in the macro. Thus practically like a variable, which has another value depending upon situation.
And now still times on ' within ' and ' outside '. In the version 1.2 of DW for a macro DW was left automatically and ' released thus automatically ' on the BASIC interpreter. That does not happen now simply any longer, but one must produce a leaving of DW simply with the mode key. But how the FASHION key produce? Well clearly, straight only gelerntt simple \31 \ as the first indication of the instruction sequence and already geht's toward Basic interpreter.
Thus it becomes also clear why one must pay attention to play none ' outside ' macro ' within '. Would intend the following is accepted: Shop of the program Text+ from DW by macro. Text+ lies on S2: and TXT is called.
Thus the instruction sequence in the BASIC interpreter became reads ' BLOAD"s2:txt<enter > '. In DW.CFG however the following would have to be noted (we to take times on, daB we the key "T" occupy want):
T\31\BLOAD"S2:TXT~
Thus placed in front the code Gur the mode key, then the < SPACE > and finally the code for the ENTER key.
If the \31 should be forgotten \, then DW leads the macro ' within ' from and up to the first "T" of TXT nothing bad happens.
Home