current executorpage

BECOME PART OF THE COMMUNITY - Sign up here
  • hi,


    Im writing some Lua plugins and I need the actual faderpage of the current user.

    In gma2 we had the global "system"variables, but in Gma3 I cant find this?
    I did some searching in the root by changedest, but without succes.

    On the github page I found the "GetExecutor" function. But I'm not able to get this working?


    Code
    local test = CurrentExecPage()
    Echo(test)
    local test2 = CurrentExecPage
    Echo(test2)

    my 2 extra questions:


    -I want to learn how Hossimo found the Lua functions? And how to test the parameters of each function
    -Can we find some global system variables in the GMA3 software


    Im a fulltime lighting programmer, but not a fulltime Coding/lua specialist. My only LUA experience is my self learned GMA2 lua knowledge

    thanks a lot :thumbup:

    greets Cedric

  • CurrentExecPage() returns the current page as an object.

    Depending on what you want from the object, try e.g.


    local mypage = CurrentExecPage()
    Echo(mypage.index)

    Echo(mypage.name)

  • He has the inside track :)


    I've been documenting things as I find them but, one of the many tricks I use is listing the properties in the console.


    First I figure out what class I'm looking at:


    Echo(CurrentExecPage():GetClass())


    This returns Page


    Then I try CD Page


    That takes me to ShowData/DataPools/Default/Pages


    From there type List to get a listing of what is available:


    In this case you get back:

    • Lock
    • No (nr index)
    • Name
    • Scribble
    • Appearance

    With that information you can do things like:


    Code
    CurrentExecPage().Name = "Frank"
    Echo(CurrentExecPage().Name) -- Frank

    The issue I always run into is it gets deep quick, for example once you have an object you can see what who it's parent is and if it has children.


    But since I'm looking at the objects from the outside I often need to dig a little to get useful information.


    I'll add CurrentExecPage() today though.

  • Hi Hoss, thanks for the fast reply. This is really useful information.

    I will try this myself, if I discover something new. I let you know!


    :):)

  • FYI, cedric-e the reason there is no documentation yet is because a lot of this is still changing. Be aware that any/all of the plugins you make now could stop working in future versions (or hopefully become less relevant as more features are implemented natively).

  • There is actually lots more information there, I realized I was looking at the pages not the page itself. So if from the pages Directory you cd into a page index then list you will see lots information regarding information in the page.


    And like Ryan says, all of my work if probably for not, but up until today I had all the time in the world :)

Participate now!

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