View Single Post
Old 05-25-2019, 10:10 AM   #490
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

GUI.freq is in seconds, so you can give it 0.2 or something. For an exact number of loops you would have to manage a counter yourself:
Code:
local updateCounter = 0
local updateFrequency = 100
GUI.func = function()
  if (updateCounter == 0) then
    updateTheThings()
  end

  -- Increments the counter, but wraps it to 0 when it hits 100
  updateCounter = (updateCounter + 1) % updateFrequency
end
GUI.freq = 0
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote