7 comments

  • 0
    Avatar
    Lyndon

     

    Let me find that for you. The problem is that zendesk changed their form to no longer allow certain types of attachments so those links are now gone..

     

  • 0
    Avatar
    Lyndon

    https://www.brightsignnetwork.com/download/Scripts/getvar.zip

    This has sample project file and the getvar plugin.  

  • 0
    Avatar
    ^UD\_$

    Where can I find documentation for SetCurrentValue(myvalue$,true)?

    More specifically, what is the purpose of the second argument?

     

  • 0
    Avatar
    Lyndon

    I don't believe it's documented beyond being in the autorun script. It's a function created as part of the brightauthor autorun. So it's not a native functio; just a supporting one for the ba autorun. 

     

    The "true" sets a "variable has been updated" flag. This will trigger a variable update event to be sent for that variable. If you use false, then that flag's not set and that event doesn't get sent. 

     

    Variable update events are marked as handled in the main autorun though so you can't actually look for a variable update event in a plugin because they're not passed through. 

  • 0
    Avatar
    ^UD\_$

    Thank you for the insight.

    Could you provide the line number in the autorun? 

    For some reason I could not find the SetCurrentValue() function definition.

  • 0
    Avatar
    Lyndon

     

    The real function name is below. Setvalue points to this function. It's defined on line 6070 of autorun version 4.6.0.18. You'll see the true is passed into postmsg variable inside the function, which is used to decide if an event should be sent when the variable is updated. 

     

    Sub SetCurrentUserVariableValue(value As Object, postMsg As Boolean)

    if IsString(value) then
    value$ = value
    else
    ' only convert integers currently
    value$ = stri(value)
    endif

    m.currentValue$ = value$

    m.bsp.UpdateDBVariable(m.bsp.GetCategoryIdFromAccess(m.access$), m.name$, m.currentValue$)

    if postMsg then
    userVariableChanged = CreateObject("roAssociativeArray")
    userVariableChanged["EventType"] = "USER_VARIABLE_CHANGE"
    userVariableChanged["UserVariable"] = m
    m.bsp.msgPort.PostMessage(userVariableChanged)

    m.bsp.SendUDPNotification("refresh")

    endif

    End Sub

  • 0
    Avatar
    ^UD\_$

    Good stuff!

    Thanks

Please sign in to leave a comment.