Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions random-selection-fixtures/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
-- Created by Corentin Azelart, 03-Jun-2015, v3.1.0.8

-- Extract some vars
local internal_name = select(1,...);
local visible_name = select(2,...);
local internal_name = select(1,...)
local visible_name = select(2,...)

-- Declare a logger
local E = gma.feedback;
local E = gma.feedback

-- Declare a gma command
local C = gma.cmd;
local C = gma.cmd

-- Init...
E("Plugin " .. internal_name .. " successfully loaded.")
E("Plugin will appear as " .. visible_name .. " in plugin pool.")

local function NewRandomFixturesSelection()
local selectedFixtures = gma.show.getvar("SELECTEDFIXTURESCOUNT");
local selectedFixtures = gma.show.getvar("SELECTEDFIXTURESCOUNT")
if(tonumber(selectedFixtures) > 0) then
for count = 0, selectedFixtures, 1 do
C("Next");
C("Next")
if(math.random(0, 1) == 0) then
C("At 100");
C("At 100")
end
end
else
gma.gui.confirm("Unable to find fixture selected", "Please select more groups and/or fixtures");
gma.gui.confirm("Unable to find fixture selected", "Please select more groups and/or fixtures")
end
end

return NewRandomFixturesSelection;
return NewRandomFixturesSelection