沒學(xué)過編程,隨便亂搞的,2000點多行,但是功能還是實現(xiàn)了,難為我了,有沒有大佬幫忙優(yōu)化?文章來源地址http://www.zghlxwxcb.cn/news/detail-737902.html
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg ==6) then--當(dāng)按下鼠標(biāo)6鍵然后
PressAndReleaseKey("b")--按下并彈起按鍵b
Sleep(10)--延遲20毫秒
PressAndReleaseKey("spacebar")--按下空格鍵
Sleep(200)
local i=math.random(1,37)--隨機變量1到37
if i==1 then
PressAndReleaseKey("num0")
Sleep(10)
elseif i==2 then
PressAndReleaseKey(1)
Sleep(10)
elseif i==3 then
PressAndReleaseKey(2)
Sleep(10)
elseif i==4 then
PressAndReleaseKey(3)
Sleep(10)
elseif i==5 then
PressAndReleaseKey(4)
Sleep(10)
elseif i==6
文章來源:http://www.zghlxwxcb.cn/news/detail-737902.html
到了這里,關(guān)于羅技鼠標(biāo)lua腳本隨機按鍵輸出的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!