Get the current cue number of selected sequence

BECOME PART OF THE COMMUNITY - Sign up here
  • Hi Guys,

    I'm trying to get the current cue number of the selected sequence.
    Something like $SELECTEDEXECCUE in GMA2.

    I figured it out using following LUA script:

    Code
    local function main()
    
        local selectedSeq = SelectedSequence()
        local cue = selectedSeq:CurrentChild()
        local currentcue = cue.index
        
        SetVar(UserVars(),"selectedexeccue", currentcue)
        
    end
    return main

    It does returns the number of the current cue, but this doesn't work with cue numbers like 1.2 - 4.5 - 8.9 - ...

    In this example it returns cue numbers like 1 - 4 - 8 - ....

    How can I make this work, and also returns cue numbers after comma?

    Kind regards,

    Tibo

  • Borrowing this thread for a bit.

    Tried to use this LUA scirpt for my self but hit a little wall and my understandin is not sufficient to go forward.

    Syntax:

    Run script

    $selectedexeccue

    CommandLineHistory:

    Illegal object:Fixture 3.000000

    So no if I write to commandline:

    Cue $selectedexeccue

    I get illegal Cue number in return.

    Can somebody enlighten me what I am doing wrong so I might learn something new. Thanks in advance.

  • Many thanks for the fast response. Now I can go to sleep.

    Really need to start learning Lua properly, it just seems like bottomless well atm. But still this is why I love MA3 there is so many different learning opperturnities with this software that I have just scratched the surface!

  • This thread really helped! I wrote (well, copied and modified from my good friend Jeff Farrow) my first LUA plugin today, riffing off this! The tostring() thing worked like a charm, and is perfect for my application.

    I use this to quickly label cues with a "CueLabel" macro so I don't have to type out "CHORUS" over and over again when I'm charting songs for a band. The macros also set the appearance, and now I can change the colour of every VERSE cue in the desk just by changing my VERSE appearance! An improvement on this process that I started in MA2.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!