Page 1 of 1

(LUA) Release all cuelists except Main Cue List

Posted: Mon Nov 09, 2009 7:42 pm
by MickCrozier
Useful for VL operators who use the physical M-Keys to trigger cue list chases.
I attached it to a bump button...

Code: Select all

for i = 1,50 do	
  name = HC.GetProperty('cuelist',i,'name')
  if name == "Main Cue List" or name == "" then
  else
    HC.CueListRelease(name, 1)
  end
  HC.VariableSet('Variables','Variable ' .. i, 0)
end
Notes:

The default variables page is attached to the Mkeys.
Variables 1-12 can be setup with 2 actions to give you quick chase access:
OnValue = 0, CueListRelease("Cuelist name")
OnValue = 1, CueListGo("Cuelist name")

By setting the variables back to 0 in the above code, you know that that next hit of the mkey will be sure to start the chase again

You may need to increase the number of loops if you use lots and lots of cue lists (for i = 1, ##)

You can set the name of your main cuelist here - if name == "Name of main cuelist"

edit: modified code with a line that I removed because I forgot why I put it there.... now I remember! :mrgreen:

Re: (LUA) Release all cuelists except Main Cue List

Posted: Tue Nov 10, 2009 4:37 am
by JohnGrimshaw
cool!

Re: (LUA) Release all cuelists except Main Cue List

Posted: Sat Jul 24, 2010 7:32 am
by MickCrozier
This came up in another post - thought I better update the code to with what I'm using now...

This will release all cuelists except the one you have selected AND any that you specifcally put into the code by extending the IF statement with "or cuelist == 'name of cuelist' "

Code: Select all

selected_cuelist = HC.GetProperty('system', 'currentcuelist')

for i = 0,HC.GetProperty('system', 'numcuelists') do
  cuelist = HC.GetProperty('cuelist',i,'name') 
  if cuelist == "" or cuelist == selected_cuelist or cuelist == 'Main Cue List' or cuelist == 'another cuelist I want to leave alone' then
  else
    HC.CueListRelease(cuelist, 1)
  end
end

Re: (LUA) Release all cuelists except Main Cue List

Posted: Sat Jul 24, 2010 10:49 am
by jltsale
Awesome, thanks