[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: AE* expand*





On Thu, Apr 10, 2008 at 7:51 AM, mailto:cld@xxxxxxxx wrote:
Fred:

> I don't understand what  "N.B.   Space characters must separate
> "frame argument[COarg,...]NO"" means.

You need to read this line of the Help screen in the context of the lines that follow it. What we're saying, basically, is that a framename must separated from its argument(s) by a space *character* (f,r,a,m,e, ,a,r,g,...), whereas multiple arguments (arg1,arg2,arg3) must be separated from each other by the comma *function* (not the comma character):
f,r,a,m,e, ,a,r,g,1,COa,r,g,2,COa,r,g,3....

> As well, I don't seem to be able to use, as a second argument, a BX...Q2 series.
> ...
> but
>
> 20=NOXHJM2,.,P,r,s,K,b,d,A,r,g,Q2,a,e, ,c,o,p,y, ,f,o,.,t,m,p, ,c,:,\,
> d,e,s,k,t,o,p,\,',v,a,$,f,I,',.,p,s,Q2,CO,BX,d,e,l, ,f,o,.,t,m,p,Q2,NO
>
> which attempts to add the command to delete FO.TMP, locks XyWrite and
> forces a shut down with ctrl-alt-del.

That's an inherently flawed KBD macro for several reasons. *One*, you have an extraneous func Q2 (after ,.,p,s,) in the AE statement (which is probably what is locking up Xy). *Two*, you can't force 2-byte func mnemonics into an AE command. AE's syntax doesn't support it, nor would you ever want or need to do it. I can't conceive of any situation in which you'd want to use 2-byte func mnemonics on the CMline, except in an XMACRO command, a special situation not encompassed by your example (although your example could be translated into an XMACRO KBD-file program).

To do what your command purports to do, you'd have to take the DEL command out of the AE statement and execute it afterwards (disregard the line break below):

20=NOXHJM2,.,P,r,s,K,b,d,A,r,g,Q2,a,e, ,c,o,p,y, ,f,o,.,t,m,p, ,c,:,\,
d,e,s,k,t,o,p,\,',v,a,$,f,i,',.,p,s,Q2,NOBX,d,e,l, ,f,o,.,t,m,p,Q2

But -- *Three* -- this will NOT work as intended, because the AE statement merely puts a COPY command on the CMline without executing it, while the DEL command is executed *immediately*, so by the time you hit to execute the COPY command, FO.TMP will have been deleted.

The solution, however, is simple: Use the AE/X switch to execute the COPY command immediately. Once the COPY command is finished, DEL FO.TMP makes sense. As a matter of caution, I'd insert a one-second pause, BX pQ2 , between the two commands, to ensure that COPY FO.TMP... is finished before DEL FO.TMP starts. So the KBD statement would be (again, disregard the internal line break):

20=NOXHJM2,.,P,r,s,K,b,d,A,r,g,Q2,a,e,/,x, ,c,o,p,y, ,f,o,.,t,m,p, ,c,:,\,
d,e,s,k,t,o,p,\,',v,a,$,f,i,',.,p,s,NOBX,p,Q2BX,d,e,l, ,f,o,.,t,m,p,Q2

Let us know if that works.

--
Carl Distefano
mailto:cld@xxxxxxxx

Clear as a bell, Carl. The extraneous Q2 was a 'function' of my misunderstanding of syntax. The forcing of 2-byte mnemonics into the AE command was, well, ignorance: a not-too-careful reading of the help file. The use of BXp Q2 (I actually ended up using BXp 3Q2) clears up what had been a problem for me earlier, when trying to write an XPL routine to accomplish the same thing: FO.TMP was incomplete by the time the routine ended, and the Mac PS interpreting program (Preview.app) couldn't make its conversion from the resulting file. I have also learned, from your patient instructions, that NO functions as a command separator. See also Mr Lagasse's suggestion, which has enabled me to shorten the macro considerably.

If you would be willing to indulge my curiosity, how did the string of mnemonics (NO [NoOperation]XH[clear help]JM[JumptoMenu]2[should I assume this refers to a U2 routine?]) come to be used in this way? From Billerica? Yours and Robert's devising?

Thanks again for your help.

FW.