Version 1.8

This commit is contained in:
OTCv8
2020-01-10 02:29:15 +01:00
parent 2a10e65ec0
commit 26c347d2bc
38 changed files with 531 additions and 792 deletions

View File

@@ -30,7 +30,7 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, webs
context.storage._macros = {} -- active macros
end
-- macros, hotkeys, scheduler, callbacks
-- macros, hotkeys, scheduler, icons, callbacks
context._macros = {}
context._hotkeys = {}
context._scheduler = {}
@@ -123,9 +123,9 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, webs
context.time = g_clock.millis()
for i, macro in ipairs(context._macros) do
if macro.lastExecution + macro.timeout <= context.now and (macro.name == nil or macro.name:len() < 1 or context.storage._macros[macro.name]) then
if macro.lastExecution + macro.timeout <= context.now and (macro.name == nil or macro.name:len() < 1 or macro.enabled) then
local status, result = pcall(function()
if macro.callback() then
if macro.callback(macro) then
macro.lastExecution = context.now
end
end)