Page 1 of 1

(LUA) - Selection Jog - fixed

Posted: Fri Nov 04, 2011 9:13 am
by tom
Simple script, takes current selection set and jogs it forward or backwards by one number. Like prev and next but then with the whole selection.

bumps selection forward

Code: Select all

s = HC.GetCurrentSelectionSet(',')

for fixture in string.gmatch(s,"%d+") do
HC.Deselect(fixture)
end

for fixture in string.gmatch(s,"%d+") do
HC.Select(fixture + 1)
end
bumps selection backwards

Code: Select all

s = HC.GetCurrentSelectionSet(',')

for fixture in string.gmatch(s,"%d+") do
HC.Deselect(fixture)
end

for fixture in string.gmatch(s,"%d+") do
HC.Select(fixture - 1)
end
If the fixture doesnt exist then it will be taken out of the selection string.