One idea (from my memory): Use EXTRACT /CURSOR/ to see if
the cursor is past the first character of the cmdline. If so
then READ CMDLINE should put the cmdline data on the stack
so you can PARSE PULL it.
When in doubt about how something like READ actually works,
use the HELP command.
A lot of the XEDIT details have faded from my memory, so you
might have to experiment or wait for a post from a more
active XEDIT user. These days I pretty much use it to
compare THE on the pc against it.
Les
Bob wrote:
I'm struggling trying to write an XEDIT macro and hoping someone can help
me
over a tiny stumbling block.
I want a pfkey set to a macro. ie. SET PF6 BEFORE MACRO SCROLL
And I want to be able to accept an *optional* command line parameter.
If there is always a command line parameter I seem to be able to use
"READ CMDLINE" to get it. However, this does not seem to work
when there is no command line parameter at all. I just get hung
at the "READ CMDLINE" until I hit <enter>. Also, when there is a
parameter I not only what to read it, but I want to "consume" it so that
it is no longer on the command line after my macro.
Is there a way to do this?
Thanks!
Bob