Roman012 !BEWARE! Deletes post on answer Reputation: 0
Joined: 25 Dec 2022 Posts: 24
Posted: Mon Jan 09, 2023 9:38 am Post subject: How do I pause?
I want line (getAddressList().getMemoryRecordByDescription('Pla').Active = true) to be executed
and then wait three seconds
and do the rest
how to do it?
[ENABLE]
{$lua}
getAddressList().getMemoryRecordByDescription('Pla').Active = true -----Here I need to wait a couple of seconds-----??? getAddressList().getMemoryRecordByDescription('Sk').Value = "-161.9665222"
if syntaxcheck then return end
local t=createTimer()
t.Interval=500
t.OnTimer=function()
memrec.Active=false
t.destroy()
end
{$asm}
[DISABLE]
if tmr1 then tmr1.Destroy() tmr1=nil end
local index1 = 0
tmr1 = createTimer()
tmr1.Interval = 500
tmr1.OnTimer=function()
index1 = tonumber(index1) + 1
getAddressList().getMemoryRecordByDescription('Pla').Active = true
-----Here I need to wait a couple of seconds-----???
if index1==6 then -- 3 seconds
getAddressList().getMemoryRecordByDescription('Sk').Value = "-161.9665222"
-- end
--if index1==10 then -- 5 seconds
getAddressList().getMemoryRecordByDescription('Pla').Active = false
end
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum