Lua Cuelist question

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 Cuelist question

Post by tom » Tue Dec 15, 2009 10:14 am

I thought this one would have been easy but....

a = HC.GetProperty('system','currentcuelist','name')
HC.MessageBox(a) --this works
HC.CueListGo(a) -- this doesn't

Any ideas?
Light palette : classic
Nederlands Dans Theater.

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

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: Lua Cuelist question

Post by RobertBell » Tue Dec 15, 2009 3:59 pm

It was returning the cue list name with crap (probably a tab) on the end. Try this

Code: Select all

function trim (s)
  return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end

a = HC.GetProperty('system','currentcuelist','name')
print(trim(a))
HC.CueListGo(trim(a)) -- this works 
Robert Bell - Product Manager - Horizon Control Inc.

tom
Posts: 224
Joined: Thu Jun 26, 2008 5:30 am
Location: The Netherlands

Re: Lua Cuelist question

Post by tom » Wed Dec 16, 2009 10:17 am

Yep, thanks. That did the trick.

What i've done with it is to connect the script to a fader on the up through and down through value (50%, same script for both triggers). I use this as a silent go button for those moments where i have to sit in the hall and theres a very quiet bit in the preformance. Nothing worse than sitting near a noisy operator during a show. Tap, tap tap. I used to have to change the script for each piece or cuelist.

Anychance on elaborating on what this part exactly does - "^%s*(.-)%s*$"
Light palette : classic
Nederlands Dans Theater.

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

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: Lua Cuelist question

Post by RobertBell » Wed Dec 16, 2009 6:55 pm

It's all standard ANSI-C format crap. Common in PHP and C and the like.
Robert Bell - Product Manager - Horizon Control Inc.

Post Reply