(LUA) - Selection Jog - fixed

Open Source software contributions and discussions that supplement or extend the Palette / Light Palette software
Post Reply
tom
Posts: 224
Joined: Thu Jun 26, 2008 5:30 am
Location: The Netherlands

(LUA) - Selection Jog - fixed

Post by tom » Fri Nov 04, 2011 9:13 am

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.
Light palette : classic
Nederlands Dans Theater.

"Come forth and thy shalt win eternal happiness", but he came fifth, so he won an electric toaster.

Post Reply