BECOME PART OF THE COMMUNITY - Sign up here
  • Hi Forum

    I am looking for help to create a Macro that inserts a time stamp into the the cue name when storing cues. Firstly I guess is this possible?

    Thanks

  • Personally I use LUA and the os.date function sort of like this:

    Code
    LUA'SetVar(UserVars(),"NAME",os.date("SOME TEXT-%Y_%m_%d-%H%M"))'
    SetUserVar "CUENUMBER" (Cue Number?)
    Store Cue $CUENUMBER
    Label Cue $CUENUMBER $"CUENAME"
    DELUSERVAR "CUENAME"
    DELUSERVAR "CUENUMBER"

    I normally use it to save show files, but when I try to oneliner it like this:

    Code
    LUA'SetVar(UserVars(),"CUENAME",os.date("SOME TEXT-%Y_%m_%d-%H%M"))'
    Store Cue (CueNumber?) $"CUENAME"
    DELUSERVAR "CUENAME"

    I get an error during the Store Cue that the variable does not exist.


    I forgot one important note, if you have a Timezone configured the time will be in UTC

    You can use the Root().StationSettings.TimeConfig to get details but I haven't played with other then just now

    List Root().StationSettings.TimeConfig.Hour for all the values e.g:

    lua't = Root().StationSettings.TimeConfig' shortener to t

    lua'Printf("%i:%i:%i", t.Hour, t.Minute, t.Second)'

    kind of works

    Edited once, last by hoss (January 20, 2022 at 7:03 PM).

Participate now!

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