萝卜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   萝卜L  阅读(696)  评论(0编辑  收藏  举报

编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示