//没登陆

欢迎您来到凯恩之角,奈非天!

帖子:319

符文:70

跳转到指定楼层
1#
发表于 2019-10-9 20:19:50 |只看该作者 |倒序浏览 来自:江苏
罗技的api写得不太清楚,使用的lua也比较残缺,故扒了下罗技的全局变量表和注册表,将所有罗技可用的lua函数与库罗列出来,供大家使用
IncrementMouseSpeed(function)
tostring(function)
gcinfo(function)
MoveMouseToVirtual(function)
getfenv(function)
debug(table)
-getupvalue(function)
-debug(function)
-sethook(function)
-getmetatable(function)
-gethook(function)
-setmetatable(function)
-setlocal(function)
-traceback(function)
-setfenv(function)
-getinfo(function)
-setupvalue(function)
-getlocal(function)
-getregistry(function)
-getfenv(function)
ReleaseMouseButton(function)
assert(function)
tonumber(function)
MoveMouseTo(function)
ClearLog(function)
load(function)
MoveMouseWheel(function)
_G(table)
OutputLCDMessage(function)
ClearLCD(function)
coroutine(table)
-resume(function)
-yield(function)
-status(function)
-wrap(function)
-create(function)
-running(function)
EnablePrimaryMouseButtonEvents(function)
SetMouseDPITableIndex(function)
OutputLogMessage(function)
loadstring(function)
Sleep(function)
string(table)
-sub(function)
-upper(function)
-len(function)
-gfind(function)
-rep(function)
-find(function)
-match(function)
-char(function)
-dump(function)
-gmatch(function)
-reverse(function)
-byte(function)
-format(function)
-gsub(function)
-lower(function)
xpcall(function)
GetRunningTime(function)
_VERSION(string)
table(table)
-setn(function)
-insert(function)
-getn(function)
-foreachi(function)
-maxn(function)
-foreach(function)
-concat(function)
-sort(function)
-remove(function)
DecrementMouseSpeed(function)
AbortMacro(function)
ReleaseKey(function)
SetSteeringWheelProperty(function)
OnEvent(function)
ipairs(function)
PressAndReleaseHidKey(function)
PlayMacro(function)
rawequal(function)
ReleaseHidKey(function)
collectgarbage(function)
GetMKeyState(function)
newproxy(function)
PressHidKey(function)
unpack(function)
SetMKeyState(function)
IsModifierPressed(function)
SetMouseSpeed(function)
MoveMouseRelative(function)
rawset(function)
pairs(function)
print(function)
SetBacklightColor(function)
IsKeyLockOn(function)
setfenv(function)
SetMouseDPITable(function)
math(table)
-log(function)
-max(function)
-acos(function)
-huge(number)
-ldexp(function)
-pi(number)
-cos(function)
-tanh(function)
-pow(function)
-deg(function)
-tan(function)
-cosh(function)
-sinh(function)
-random(function)
-randomseed(function)
-frexp(function)
-ceil(function)
-floor(function)
-rad(function)
-abs(function)
-sqrt(function)
-modf(function)
-asin(function)
-min(function)
-mod(function)
-fmod(function)
-log10(function)
-atan2(function)
-exp(function)
-sin(function)
-atan(function)
GetDate(function)
pcall(function)
getmetatable(function)
setmetatable(function)
type(function)
next(function)
PressAndReleaseKey(function)
select(function)
GetMousePosition(function)
IsMouseButtonPressed(function)
rawget(function)
GetMouseSpeed(function)
PressAndReleaseMouseButton(function)
PressMouseButton(function)
dofile(function)
OutputDebugMessage(function)
PressKey(function)
error(function)
loadfile(function)
以上是全局变量表中所有的函数、库和字符串

帖子:319

符文:70

2#
以下是罗技lua的注册表,注册表是连接lua与c语言的桥梁,通过注册表则可以看到罗技所支持的所有接口
_LOADED(table)
     string(table)
-sub(function)
-upper(function)
-len(function)
-gfind(function)
-rep(function)
-find(function)
-match(function)
-char(function)
-dump(function)
-gmatch(function)
-reverse(function)
-byte(function)
-format(function)
-gsub(function)
-lower(function)
     _G(table)
     table(table)
-setn(function)
-insert(function)
-getn(function)
-foreachi(function)
-maxn(function)
-foreach(function)
-concat(function)
-sort(function)
-remove(function)
     math(table)
-log(function)
-max(function)
-acos(function)
-huge(number)
-ldexp(function)
-pi(number)
-cos(function)
-tanh(function)
-pow(function)
-deg(function)
-tan(function)
-cosh(function)
-sinh(function)
-random(function)
-randomseed(function)
-frexp(function)
-ceil(function)
-floor(function)
-rad(function)
-abs(function)
-sqrt(function)
-modf(function)
-asin(function)
-min(function)
-mod(function)
-fmod(function)
-log10(function)
-atan2(function)
-exp(function)
-sin(function)
-atan(function)
     coroutine(table)
-resume(function)
-yield(function)
-status(function)
-wrap(function)
-create(function)
-running(function)
debug(table)
-getupvalue(function)
-debug(function)
-sethook(function)
-getmetatable(function)
-gethook(function)
-setmetatable(function)
-setlocal(function)
-traceback(function)
-setfenv(function)
-getinfo(function)
-setupvalue(function)
-getlocal(function)
-getregistry(function)
-getfenv(function)
LuaVM(userdata)
Script(table)
-__gc(function)
-__metatable(table)
-new(function)
-__index(table)
-new(function)
-__tostring(function)
LuaState(userdata)


发表于 2019-10-9 20:23:44 |只看该作者 来自:江苏

帖子:319

符文:70

3#
顺便提供下罗技扒api的代码,供各个平台的朋友去按照自己的情况测试
function OnEvent(event, arg)
        local function treaverse_global_env(curtable,level)  
                            for key,value in pairs(curtable or {}) do  
                            local prefix = string.rep(" ",level*5)  
                            OutputLogMessage("%s%s(%s)\n",prefix,key,type(value))
                            if (type(value) == "table" ) and key ~= "_G" and (not value.package) then  
                                treaverse_global_env(value,level + 1)  
                            elseif (type(value) == "table" ) and (value.package) then  
                                OutputLogMessage("%sSKIPTABLE:%s\n",prefix,key)  
                            end   
                    end   
        end  
    if(arg == 4)then--全局变量表
                ClearLog()
                treaverse_global_env(_G,0)
        end
        if(arg==5)then--注册表
                ClearLog()
                treaverse_global_env(debug.getregistry(),0)
        end
end
发表于 2019-10-9 20:28:02 |只看该作者 来自:浙江

帖子:732

符文:69

4#
我感觉我落后了一个世纪
发表于 2019-10-9 22:19:48 来自凯恩之角App |只看该作者 来自:江苏

帖子:400

符文:77

5#
仰望大佬···
发表于 2019-10-9 22:59:37 |只看该作者 来自:广东

帖子:20

符文:2

6#
我怎么 完全看不懂呢?我 是不是古村落来的
发表于 2019-10-10 06:08:32 |只看该作者 来自:浙江

帖子:56

符文:57

7#
咋滴,你是觉得我能看的懂
发表于 2019-10-10 07:08:49 来自凯恩之角App |只看该作者 来自:江苏

帖子:319

符文:70

8#
额,api是指这个语言自带的函数与参数,也就是说,罗技拥有以上这些自带的函数,其中有一部分是罗技封装的,比如按下抬起啥的,还有一部分是lua原装的,写宏的时候可以直接调用的函数
发表于 2019-10-11 23:59:12 来自凯恩之角App |只看该作者 来自:浙江

帖子:1192

符文:24

9#
呃。。。我才看到這個
很有幫助!

我抽時間測試一下某些系統
发表于 2019-12-5 14:48:17 |只看该作者 来自:广东
您需要登录后才可以回帖 登录 | 注册网易通行证