用一个脚本生成另一个脚本并运行

在新的 AutoHotkey 进程中执行给定的代码.
ExecScript(Script, Wait:=true)
{
    shell := ComObjCreate("WScript.Shell")
    exec := shell.Exec("AutoHotkey.exe /ErrorStdOut *")
    exec.StdIn.Write(script)
    exec.StdIn.Close()
    if Wait
        return exec.StdOut.ReadAll()
}

; 示例:
InputBox expr,, 输入一个表达式, 将用一个新的脚本来计算.,,,,,,, Asc("*")
result := ExecScript("FileAppend % (" expr "), *")
MsgBox % "Result: " result

 

给TA捐赠
共{{data.count}}人
人已捐赠
其他

浏览器嵌入GUI窗口实例

2018-4-9 9:06:12

其他

从网站获取复制文本并粘贴至notepad

2018-4-10 12:17:28

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索