精易论坛

标题: LuaLoader 0.1 [打印本页]

作者: htrlq    时间: 2016-3-21 15:44
标题: LuaLoader 0.1
LuaLoader是一款Lua和三方插件交互的插件
local dm = CreateDm()

MessageBox(0,dm:Ver(),"Version",0)

hwnd = dm:FindWindowByProcess("iexplore.exe","IEFrame","")

local classList = {
        "WorkerW",
        "ReBarWindow32",
        "Address Band Root",
        "Edit"
}

local hwnds = {
        0,
        0,
        0,
        0
}

if hwnd > 0 then
        for i = 1, #classList
        do
                hwnd = dm:FindWindowEx(hwnd,classList,"")
                --MessageBox(0,string.format("%#x",hwnd),"windows",0)
                if hwnd > 0 then
                        hwnds = hwnd
                else
                        break
                end
        end
        
        if hwnd > 0 then
                dm_ret = dm:BindWindowEx(hwnd,"normal","normal","normal","",0)
               
                dm:SetWindowState(hwnd,12)
               
                dm:KeyPressChar("back")
                dm:KeyPressStr("http://125.confly.eu.org/forum.php",50)
                dm:KeyPressChar("enter")
               
                dm:UnBindWindow()
        end
else
        MessageBox(0,"未找到IE进程","错误",0)
end


这样一段简单的lua脚本,可以直接操作大漠插件
只要运行有一个IE进程(我是WIN7自带的IE10)
查找窗体句柄,把地址栏修改为精易论坛地址,打开

Lua是一门脚本,多用于游戏开发。
LuaLoader.zip (268.07 KB, 下载次数: 25)


作者: xiaobing2015    时间: 2016-3-30 18:39
楼主,感谢分享!~




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4