Page 1 of 1

script question

Posted: Mon Oct 27, 2008 7:42 pm
by TaineGilliam
I'm having a bit of a problem with the code below. The idea is to load the Lua variable with a Cue number and its Label given a Palette variable with the cue number.

The output to the history/status window makes me believe my loop is working except the test cnumber==Cue is failing. The test for empty string at least succeeds and at least prevents the never ending loop. I suspect some form of type mismatch but I'm not really sure.

Code: Select all

Cue = HC.VariableGet('MainV', 'Next_show');

if (Cue == 0) then
  tshow = "None"
  cindex = -1
    cindex = cindex + 1
    cnumber = HC.GetProperty('cue', 'Main', cindex, 'number')
    HC.Status(":" .. cnumber .. ":" .. Cue .. ":")
  until ((cnumber=='') or (cnumber==Cue))

  tshow =  Cue .. " - " .. HC.GetProperty('cue', 'Main', cindex, 'name')

Re: script question

Posted: Tue Oct 28, 2008 1:17 pm
by BrianEvans
Hello Taine,

We'll need a showfile to put this into context.

Re: script question

Posted: Thu Nov 20, 2008 6:34 pm
by TaineGilliam
I'm trying to extract the label for a cue based on the cue number (not index). I'm sure there is a better way, please point the way.

In my example script, the variable "Next_Show" contains a cue number. For example 23. I'm hoping to have the variable "tshow" end up with something like "23 - The start of the end".

In this application there is no predictable relationship between the cue number in "Next_Show" and the cue currently active on stage.


Re: script question

Posted: Fri Nov 21, 2008 4:42 pm
by BrianEvans
I have no problem getting tshow to come up with the name of the cue specified by Next_Show.