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

Re: Send a keystroke to Xy?



Reply to note from Harry Binswanger  Tue, 16 Jun
2015 02:03:26 -0400

> I can't do a call to DOS without that messing up the screen. The
> fix has to be applied while the screen is the XyWrite (not the
> DOS) screen.

Ah, well, then you're stuck in a feedback loop, Harry. You can't send
a keystroke with XPL alone, so you've got to shell to a program that
can send a keystroke, but shelling causes the very problem you're
trying to solve. I don't see an alternative to hitting your hotkey
every time. Life's a beach -- but you know that. ;)

> BTW, what else would a word be but a string? I don't follow you
> there. Can you give an example?

Take this line of AHK code:

InputBox, AllArgs, Alarm, The time is %now%,, 600, 180

"InputBox" is a function that takes arguments. "AllArgs" is a
variable name. "Alarm" is ordinary text. The syntax makes no visual
distinction among the three types of entities. It's meant to be
simple -- dumbed-down, really -- but it's confusing as hell. By
contrast, the equivalent in AutoIt would be:

InputBox($AllArgs, "Alarm", "The time is " & $now, "", 600, 180)

Functions are easily identified by the trailing parens enclosing the
parameters. Variable names all begin with "$", and there's none of
this nonsense of using variable_name in some contexts and
%variable_name% in others. And text strings are enclosed in quotes,
as the gods intended them to be. AutoIt also appears to be more
capable, and it certainly makes it easier to access the Win API. The
user community is much larger, and generally helpful, though somewhat
rebarbative -- fools are not suffered, and lord help you if you ask a
question that can be answered by reading the manual or searching the
forums. I like it.

--
Carl Distefano
cld@xxxxxxxx