Jump to content
  • 0

Run script continuously


Onions96

Question

Hello guys. I just want to ask. How to run lua script continuously? 

For example:

--main code--

gg.searchNumber("4;5;180;200::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("9999", gg.TYPE_DWORD

 

== then how to run it again starting from main code? What code should I put at the end?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

dont know if this the correct way but it will keep searching until script is interrupt.

local gg = gg

while true do
if gg.isVisible() then
gg.setVisible(false)
function main()
gg.clearResults()
gg.searchNumber("4;5;180;200::13",   gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("9999", gg.TYPE_DWORD)
gg.toast("Done")
gg.sleep(3000)--short break between search
end
  repeat until main()
end
end

 

Link to comment
Share on other sites

1 hour ago, MAARS said:

There might be more simple and short way for doing this but I just like keeping my code organized 

script.lua 569 B · 2 downloads

Thanks you. Its working dude. 

1 hour ago, MonkeySAN said:

dont know if this the correct way but it will keep searching until script is interrupt.

local gg = gg

while true do
if gg.isVisible() then
gg.setVisible(false)
function main()
gg.clearResults()
gg.searchNumber("4;5;180;200::13",   gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
revert = gg.getResults(500, nil, nil, nil, nil, nil, nil, nil, nil)
gg.editAll("9999", gg.TYPE_DWORD)
gg.toast("Done")
gg.sleep(3000)--short break between search
end
  repeat until main()
end
end

 

Thanks a lot its working now. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.