萝卜L

导航

AHK通讯 CMD Lua IPC

  • 命令行/命令提示符/command-line/CMD/Console中:
    • ErrorLevel是变量,存储被调用命令的返回值。
    • 可以%变量名%%ErrorLevel%)获取变量
  • Autohotkey/AHK中,使用变量名ExitCode向调用者传递数值。

ExitCode:An integer (i.e. negative, positive, or zero) that is returned to its caller when the script exits. This code is accessible to any program that spawned the script, such as another script (via RunWait) or a batch (.bat) file.

text sent to stdout will not appear at the command prompt it was launched from. This can be worked around by piping a script's output to another command or program.
    • 在SciTE4AutoHotkey中执行脚本可以输出至Output窗口。
    • 在CMD中执行脚本无输出(ErrorLevel非0或抛出异常)。
    • 在CMD中执行脚本,在 Append 前,使用 DllCall("AttachConsole", "int", -1)  。
      • 但“输出”的内容不同于显示(如echo):
        • 在输入符号>之后;
        • 不可方向键导航,编辑删除;
        • 不影响其后用户输入的命令行。
      • 以上,在命令行中使用 my.ahk | more 可“正常”输出。
;CONOUT$ is a special file windows uses to expose attached console output

NamedPipe, Standard Input, Standard Output(FileAppend)

WM_COPYDATA应用

Alien is a Foreign Function Interface (FFI) for Lua
  • add to an existing file (using >>) or create a new file (using >)
  • The introduction of standardized streams represented a major breakthrough in the computer field

use Spy++ to examine the message being sent, and use Windows Debugger Tools, throwing a message box before sending the message

 acSendString(lpData, dwData, handle, x, y) 

  IPC module / USB connection dll used for IR remote / logitech Keyboard

posted on 2020-12-23 18:42  萝卜L  阅读(638)  评论(0编辑  收藏  举报