Thinkai's Blog

Autohotkey|Python|php|aardio|VOIP|IT 爱好者

Autohotkey资源 9502

作者为 发表

直播:

Thinkai的直播 (长期潜水)

河许人的直播

QQ群:

AutoHotkey高级群 3222783

AutoHotkey终极群 470710096

AutoHotKey高手群 348016704

AutoAHK 348016704

HotWindows交流群 200300760 

网站:

AHK官网 http://ahkscript.org/

中文论坛(原AHK8) http://autohotkey.cn/ (暂时无法访问)

智能热键 https://www.autoahk.com

A大的知乎专栏 AutoHotkey之美http://zhuanlan.zhihu.com/autohotkey/19706598
Array的代码库 http://github.com/linxinhong
sunwind的博客 http://blog.csdn.net/liuyukuan



H版:

官网 http://www.autohotkey.net/~HotKeyIt/AutoHotkey

ahkdll-v1-release-master.zip

ahkdll-v2-release-master.zip

AhkDllThread.ahk

AhkExported.ahk



评论给 wangxiaotong 4个评论



wangxiaotong 2021年5月25日 的 18:06

你好,我是个AHK初学者,有个问题困扰了好久
——————————————————————————————
Run, %yunjian_path%, , , ThisPID ;先获得运行的记事本程序的进程ID
MsgBox,ThisPID = %ThisPID%
WinWait, %win_title% ahk_pid %ThisPID% ;等待该进程窗口的出现
WinGet, ThisHWND, ID, 无标题 – 记事本 ahk_pid %ThisPID% ;获得窗口句柄
MsgBox,ThisHWND = %ThisHWND%
WinActivate, ahk_id %ThisHWND% ;这里的 ahk_id 表明跟在后面的变量是窗口句柄
________________________________________________________________________________
我是个小白,这是我根据您的操作记事本脚本做的修改,第一步获取ThisPID可以打印出来,但是第二步获取ThisHWND就无法打印了,麻烦问下,这是因为我的语句有问题,还是对于一些程序无法获取呢?

    wangxiaotong 2021年5月25日 的 18:09

    不好意思,引用错了窗口标题,但是我修改了之后还是没起作用
    Run, %yunjian_path%, , , ThisPID ;先获得运行的记事本程序的进程ID
    MsgBox,ThisPID = %ThisPID%
    WinWait, %win_title% ahk_pid %ThisPID% ;等待该进程窗口的出现
    WinGet, ThisHWND, ID, %win_title% ahk_pid %ThisPID% ;获得窗口句柄
    MsgBox,ThisHWND = %ThisHWND%
    WinActivate, ahk_id %ThisHWND% ;这里的 ahk_id 表明跟在后面的变量是窗口句柄


友情链接:Autohotkey中文帮助Autohotkey官网Autohotkey中文网联系作者免GooglePlay APK下载

 主题设计 • skyfrit.com  Thinkai's Blog | 保留所有权利

58 queries in 4.951 seconds |