Lua.diagnostics.globals
Closed this issue · 19 comments
bonjour,
je me demande comment à tu trouvé la liste des fonction LUA du gma3 ?
y a t'il une commande de list magic dans le gma3 ?
et encore bravo pour ton travail .
Hello,
I wonder how you found the list of LUA functions of gma3?
is there a list magic command in gma3?
and congratulations again for your work.
Basically I just iterated the LUA global variable. Because functions are just global variables looking through that table exposes all the functions we have access to.
The only issue with this approach is that if a C Data Object is required or returned you kind of have to guess what properties it has. I'm trying to think of a better approach to detailing this information but this is a start.
ok but
for n in pairs(_G) do print(n) end
or
for n in pairs(_G) do
Printf(n)
end
in plug gma3 do nothing
This is an example of the code that use.
The reason yours isn't working is because you actually want the key not the value. The key returns the name while the value returns the actual function.
for k, v in pairs(_G) do
Echo(string.format("%s\n", k))
count = count + 1
end
local pluginName = select(1,...);
local componentName = select(2,...);
local signalTable = select(3,...);
local my_handle = select(4,...);
local function myFunction(display_handle)
for k, v in pairs(_G) do
Printf(string.format("%s\n", k))
end
end
return myFunction
ok like this is work
That's right. Though I recently found that you can also just use the ExportJson() or ExportCsv() functions to build a table of keys and send the result to disk.
LUA 8h04m09.809s : error
LUA 8h04m09.809s : SetProgressRange
LUA 8h04m09.809s : GetVar
LUA 8h04m09.809s : _G
LUA 8h04m09.809s : SetVar
LUA 8h04m09.809s : last
LUA 8h04m09.809s : MouseObj
LUA 8h04m09.809s : TextInput
LUA 8h04m09.809s : Global_CurrentImagePoolName
LUA 8h04m09.809s : math
LUA 8h04m09.809s : load
LUA 8h04m09.809s : HandleToStr
LUA 8h04m09.809s : SetProgressText
LUA 8h04m09.809s : string
LUA 8h04m09.809s : DataPool
LUA 8h04m09.809s : OverallDeviceCertificate
LUA 8h04m09.809s : setmetatable
LUA 8h04m09.809s : StartProgress
LUA 8h04m09.809s : GetRTChannel
LUA 8h04m09.809s : MultiLanguage
LUA 8h04m09.809s : Export
LUA 8h04m09.809s : pcall
LUA 8h04m09.809s : require
LUA 8h04m09.809s : CurrentExecPage
LUA 8h04m09.809s : GetPathOverrideFor
LUA 8h04m09.809s : CreateUndo
LUA 8h04m09.809s : TestPanScroll
LUA 8h04m09.809s : tonumber
LUA 8h04m09.809s : SelectionFirst
LUA 8h04m09.809s : getmetatable
LUA 8h04m09.809s : assert
LUA 8h04m09.809s : IncProgress
LUA 8h04m09.809s : CurrentUser
LUA 8h04m09.809s : Enums
LUA 8h04m09.809s : GetUIObjectAtPosition
LUA 8h04m09.809s : ErrEcho
LUA 8h04m09.809s : CmdIndirectWait
LUA 8h04m09.809s : Echo
LUA 8h04m09.809s : coroutine
LUA 8h04m09.809s : rawequal
LUA 8h04m09.809s : FixtureType
LUA 8h04m09.809s : FileExists
LUA 8h04m09.809s : tostring
LUA 8h04m09.809s : Pult
LUA 8h04m09.809s : Unhook
LUA 8h04m09.809s : xpcall
LUA 8h04m09.809s : LoadExecConfig
LUA 8h04m09.809s : Root
LUA 8h04m09.809s : CmdIndirect
LUA 8h04m09.809s : SerialNumber
LUA 8h04m09.810s : type
LUA 8h04m09.810s : GetProgPhaserValue
LUA 8h04m09.810s : SelectionComponentX
LUA 8h04m09.810s : LockBtn
LUA 8h04m09.810s : SetProgPhaserValue
LUA 8h04m09.810s : fixtures
LUA 8h04m09.810s : rawlen
LUA 8h04m09.810s : GetPropertyColumnId
LUA 8h04m09.810s : GetFocus
LUA 8h04m09.810s : io
LUA 8h04m09.810s : SelectionComponentY
LUA 8h04m09.810s : TestCombinedSelection
LUA 8h04m09.810s : AddIPAddress
LUA 8h04m09.810s : SetLED
LUA 8h04m09.810s : __CallbacksRegistry
LUA 8h04m09.810s : Global_CurrentImagePoolElementNo
LUA 8h04m09.810s : Mouse
LUA 8h04m09.810s : Cmd
LUA 8h04m09.810s : DirList
LUA 8h04m09.810s : HostSubType
LUA 8h04m09.810s : GetDMXUniverse
LUA 8h04m09.810s : Checkinstance
LUA 8h04m09.810s : Keyboard
LUA 8h04m09.810s : CalculateSub
LUA 8h04m09.810s : ShowData
LUA 8h04m09.810s : take
LUA 8h04m09.810s : GetButton
LUA 8h04m09.810s : SelectedGelNr
LUA 8h04m09.810s : loadfile
LUA 8h04m09.810s : filter
LUA 8h04m09.810s : GetUIChannelCount
LUA 8h04m09.810s : RenewLayoutHook
LUA 8h04m09.810s : TestGridKeepScrollCellVisible
LUA 8h04m09.810s : TestColumnResize
LUA 8h04m09.810s : TestClickGesture
LUA 8h04m09.810s : MessageBox
LUA 8h04m09.810s : ReleaseType
LUA 8h04m09.810s : SystemTest
LUA 8h04m09.810s : GetSelectedAttribute
LUA 8h04m09.810s : os
LUA 8h04m09.810s : HandleToInt
LUA 8h04m09.810s : SelectionNotifyEnd
LUA 8h04m09.810s : GetUIChannels
LUA 8h04m09.810s : help
LUA 8h04m09.810s : UISystemTests
LUA 8h04m09.810s : performance3dMinor
LUA 8h04m09.810s : Import
LUA 8h04m09.810s : table
LUA 8h04m09.810s : library
LUA 8h04m09.810s : LedApi
LUA 8h04m09.810s : Obj
LUA 8h04m09.810s : ButtonApi
LUA 8h04m09.810s : HardwareTest
LUA 8h04m09.810s : GetChannelFunctionIndex
LUA 8h04m09.810s : SelectionComponentZ
LUA 8h04m09.810s : GetRTChannelCount
LUA 8h04m09.810s : SaveExecConfig
LUA 8h04m09.810s : SetBlockInput
LUA 8h04m09.810s : WaitModal
LUA 8h04m09.810s : GetAttributeIndex
LUA 8h04m09.810s : AddonVars
LUA 8h04m09.810s : CloseAllOverlays
LUA 8h04m09.810s : FindNextFocus
LUA 8h04m09.810s : FindBestFocus
LUA 8h04m09.810s : utf8
LUA 8h04m09.810s : GetDisplayCollect
LUA 8h04m09.810s : CurrentProfile
LUA 8h04m09.810s : DeskLocked
LUA 8h04m09.810s : select
LUA 8h04m09.810s : GetChannelFunction
LUA 8h04m09.810s : GetFocusDisplay
LUA 8h04m09.810s : WaitObjectDelete
LUA 8h04m09.810s : ProgrammerPart
LUA 8h04m09.810s : GetDisplayByIndex
LUA 8h04m09.810s : Confirm
LUA 8h04m09.810s : ErrPrintf
LUA 8h04m09.810s : GetUIChannelIndex
LUA 8h04m09.810s : IntToHandle
LUA 8h04m09.810s : Patch
LUA 8h04m09.810s : TouchObj
LUA 8h04m09.810s : InitialPrepare
LUA 8h04m09.810s : Programmer
LUA 8h04m09.810s : ToAddr
LUA 8h04m09.810s : DelVar
LUA 8h04m09.810s : GetPath
LUA 8h04m09.810s : GetSubfixtureCount
LUA 8h04m09.810s : GetTopModal
LUA 8h04m09.810s : _VERSION
LUA 8h04m09.810s : SelectionCount
LUA 8h04m09.810s : StrToHandle
LUA 8h04m09.810s : PluginVars
LUA 8h04m09.810s : ipairs
LUA 8h04m09.810s : UserVars
LUA 8h04m09.810s : CloseUndo
LUA 8h04m09.810s : rawget
LUA 8h04m09.810s : Timer
LUA 8h04m09.810s : Version
LUA 8h04m09.810s : GetExecutor
LUA 8h04m09.810s : SelectionNotifyBegin
LUA 8h04m09.810s : RefreshLibrary
LUA 8h04m09.810s : HostOS
LUA 8h04m09.810s : GetDMXValue
LUA 8h04m09.810s : CheckFIDCollision
LUA 8h04m09.810s : CheckDMXCollision
LUA 8h04m09.810s : FindBestDMXPatchAddr
LUA 8h04m09.810s : HostType
LUA 8h04m09.810s : debug
LUA 8h04m09.810s : SetProgress
LUA 8h04m09.810s : print
LUA 8h04m09.810s : KeyboardObj
LUA 8h04m09.810s : GetAttributeByUIChannel
LUA 8h04m09.810s : FromAddr
LUA 8h04m09.810s : Printf
LUA 8h04m09.810s : ExportJson
LUA 8h04m09.810s : dofile
LUA 8h04m09.810s : Time
LUA 8h04m09.810s : package
LUA 8h04m09.810s : Touch
LUA 8h04m09.810s : GetTokenNameByIndex
LUA 8h04m09.810s : idx
LUA 8h04m09.810s : CmdObj
LUA 8h04m09.810s : SelectionNext
LUA 8h04m09.810s : GetPathType
LUA 8h04m09.810s : SetProgPhaser
LUA 8h04m09.810s : ExportCSV
LUA 8h04m09.810s : performance3dShow
LUA 8h04m09.810s : GetPathSeparator
LUA 8h04m09.810s : SyncFS
LUA 8h04m09.810s : PopupInput
LUA 8h04m09.810s : pairs
LUA 8h04m09.810s : SelectionNotifyObject
LUA 8h04m09.810s : DefaultDisplayPositions
LUA 8h04m09.810s : GetUIChannel
LUA 8h04m09.810s : GetProgPhaser
LUA 8h04m09.810s : DeleteIPAddress
LUA 8h04m09.810s : BuildDetails
LUA 8h04m09.810s : HookObjectChange
LUA 8h04m09.810s : GetAttributeCount
LUA 8h04m09.810s : IsObjectValid
LUA 8h04m09.810s : StopProgress
LUA 8h04m09.810s : rawset
LUA 8h04m09.810s : next
LUA 8h04m09.810s : GlobalVars
LUA 8h04m09.810s : Selection
LUA 8h04m09.810s : collectgarbage
LUA 8h04m09.810s : GetSubfixture
LUA 8h04m09.810s : GetTokenName
LUA 8h04m09.810s : WindowObj
LUA 8h04m09.810s : HardwareShow
i have a more fonction
because is the last version of gma3
I'll double check but I took my list from the 1.1.3.2 version of software.
ok i'll don't see your wiki
it's perfect
Ahh good.
--[[
Instance Select v1.0.0.1
Please note that this will likly break in future version of the console. and to use at your own risk.
Usage:
- Select some fixtures
- Call Plugin "Instance Select"
- Your selection is now just Instance number.
Releases:
1.0.0.1 - Inital release
Created by Richard Fontaine "RIRI", April 2020.
MIT License
Copyright (c) 2020 Down Right Technical Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--]]
local pluginName = select(1,...);
local componentName = select(2,...);
local signalTable = select(3,...);
local my_handle = select(4,...);
-- ****************************************************************
-- speed up global functions, by creating local cache
-- this can be very important for high speed plugins
-- caring about performance is imperative for plugins with execute function
-- ****************************************************************
local F=string.format;
local E=Echo;
-- local functions forward declaration
local CalculateSFID, clamp
-- ****************************************************************
-- plugin main entry point
-- ****************************************************************
local function Main(display_handle,argument)
-- select all sub fixture
Cmd("Down")
Cmd("Down")
Cmd("Down")
local instance
local sfIdx = SelectionFirst (true);
if argument == nil then
E('Call Plugin Instance selection')
-- Gather information using MessageBox()
local messageBoxQuestions = {
"Instance"
}
local wfInt = "0123456789"
local messageBoxOptions = {
title="Instance Select",
backColor=nil,
timeout=nil,
timeoutResultCancel=false,
timeoutResultID=nil,
icon=nil,
titleTextColor=nil,
messageTextColor=nil,
message="Please enter the number of Instance",
display= nil,
commands={
{value=1, name="Done"},
{value=0, name="Cancel"}
},
inputs={
{name=messageBoxQuestions[1], value="", maxTextLength = 4, vkPlugin = "TextInputNumOnly", whiteFilter = wfInt}
}
}
local messageBoxResult = MessageBox(messageBoxOptions);
-- get inputs
instance = clamp(math.floor(tonumber(messageBoxResult["inputs"][messageBoxQuestions[1]]) or 0), 0, 360)
if instance == 0 then
return
end
-- have to filter out the numbers because non text inputs dont respect the black/white Filters.
local v = "[^0123456789.]"
end
local selcetionString = ""
local tt = 0
while (sfIdx ~= nil)
do
local result, take = Checkinstance(sfIdx,instance)
if take == true and tt == 0 then
selcetionString = selcetionString .. result
tt = 1
elseif take == true and tt == 1 then
selcetionString = selcetionString .. " + "
selcetionString = selcetionString .. result
end
sfIdx = SelectionNext(sfIdx, true);
end
Cmd("Clear")
Cmd("Fixture " .. selcetionString)
end
-- ****************************************************************
-- plugin exit cleanup entry point
-- ****************************************************************
local function Cleanup()
end
-- ****************************************************************
-- plugin execute entry point
-- ****************************************************************
local function Execute(Type,...)
local func=signalTable[Type]
if(func) then
func(signalTable,...)
else
local debug_text=string.format("Execute %s not supported",Type)
E(debug_text)
end
end
function signalTable:Key(Status,Source,Profile,Token)
local debug_text=F("Execute Key (%s) %s UserProfile %d : %s",Status,Source,Profile,Token)
E(debug_text)
end
function signalTable:Fader(Status,Source,Profile,Token,Value)
local debug_text=F("Execute Fader (%s) %s UserProfile %d : %s %f",Status,Source,Profile,Token,Value)
E(debug_text)
end
-- ****************************************************************
-- Local Functions
-- ****************************************************************
-- clamp
function clamp (input, min, max)
local i = input
if i < min then i = min end
if i > max then i = max end
return i
end
-- calculateSub FIDs
-- Sub Fixtures (not child fixtures), don't contain an FID. returns the aparent Sub fixture ID based on the root fixture
function Checkinstance(fixture,instance)
local take
local i = 0
local inst = {}
local result = GetSubfixture(fixture).FID
if (result ~= nil) then
return result , take
end
result = ""
local parent
while (GetSubfixture(fixture):GetClass() == "SubFixture")
do
i = i + 1
parent = GetSubfixture(fixture):Parent();
result = "." .. fixture - parent.SubfixtureIndex .. result
inst[i] = fixture - parent.SubfixtureIndex
fixture = parent.SubfixtureIndex
end
result = GetSubfixture(fixture).FID .. result
if inst[1] == instance then
take = true
else
take = false
end
return result , take
end
-- ****************************************************************
-- return the entry points of this plugin :
-- ****************************************************************
return Main,Cleanup,Execute
this pluging is inspired by your random select
I just made some comments on the forums.
Change this to make it yours:
Copyright (c) 2020 Down Right Technical Inc.
👍
Actually your line 67 just made me notice a minor non breaking bug.
SelectionFirst(true)
should be
SelectionFirst()
It has no effect as long as they don't change the API.
ok I modify it. if you want you can integrate it into your git
I've already fixed mine. I won't make a release since it's not a breaking bug.
ok i was talking about the selection code per instance
Oh I see. No I'd prefer to keep my repo for things that I am working on. You should merge it into your fork, I just wont accept it as a PR unless its a fix for something I broke 😮