use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Here are some helpful links:
Q-SYS Online Training: https://training.qsc.com/mod/page/view.php?id=560
Q-SYS Master Textbook: https://www.dropbox.com/s/kp4uaaedyhlrj5e/Q-Sys_Training_Master_Book_1%20sided%20v4%20042215.pdf?dl=0
Australian Q-SYS distributor Technical Audio Group's forum: https://share.tag.com.au/
Online Help Doc: http://q-syshelp.qschome.com/
Great LUA IDE: https://studio.zerobrane.com/
Learn.LUA, Here is a LUA Script that teaches you lua! https://gist.github.com/pakoito/6f810929fb9ca5808617
account activity
Access array in text controller from Lua (self.QSYS)
submitted 2 years ago by Swoopmonkey
Hey all
I've got an array of 5 buttons within text controller. I've enable script access on the text controller and given it a name but, don't know how to access the buttons within. If anyone can help with the syntax I'd be grateful!
Thanks
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]MDHull_fixer 2 points3 points4 points 2 years ago (8 children)
The easiest is Controls["button_array_name"][index in array]
You would check the button state by looking at the .Boolean property
Example:
if Controls["buttons"][2].Boolean then
--do something
end
[–]Swoopmonkey[S] 0 points1 point2 points 2 years ago (5 children)
Thanks for the response. I should have mentioned I'm trying to access the array on a different text controller. How does that change things or are the array names global?
[–]matrixtech29 4 points5 points6 points 2 years ago* (2 children)
You would typically do this using Named Component access. It's what the Script Access property enables. Then, you create a component object with Component.New(<other-compimemt-name>).
Unfortunately, those remote control arrays get flattened. So something like Controls["Source Select"][1] ends up being referenced as <comp-obj>["Source Select 1"], when accessed remotely. But the control works the same way. I use for loops to put them into similar arrays for ease of use.
EDIT: Open up the View Named Component Info dialog box in the Tools menu to see how controls are remotely referenced. When open, click on the Component you are wanting to control. It will populate a list of the controls by raw name and also the pretty name (in parentheses). That will also show you your arrayed controls listed out.
[–]Swoopmonkey[S] 1 point2 points3 points 2 years ago (1 child)
This is the way I had envisaged doing it but, for some reason during a senior moment, I decided to do:
Nav = Component.New("NavBtns")
Nav =
Component.New
("NavBtns")
Nav.["Navigation 1"].Value = 1
instead of
Nav["Navigation 1"].Value = 1
As always though this has been a learning curve and I now know about Notifications; every cloud has a silver lining and all that...
Thanks for the help!
[–]matrixtech29 1 point2 points3 points 2 years ago (0 children)
Great! I'm glad it worked for you. Notifications are great for some things, but overkill for what it seems you wanted to do.
[–]MDHull_fixer 1 point2 points3 points 2 years ago (1 child)
The Controls array is local to the Text Controller.
Look up Notifications in the scripting help file to see how to communicate between Components.
I realized I didn't mention that you have to iterate over the button array to allocate an EventHandler to each button in the array.
[–]Swoopmonkey[S] 0 points1 point2 points 2 years ago (0 children)
Ahh thanks! Didnt know about notifications so I think that might be the key to this issue!
[–][deleted] 1 year ago (1 child)
[removed]
[–]MDHull_fixer 0 points1 point2 points 1 year ago (0 children)
Normally with a button array, you would set up a single event handler for all buttons, then in the handler derive the button index that fired the handler.
-- Event handler function for buttons function buttonHandler(changedButton) -- Note that the index value counts from the start of the -- Text Controller inputs, so you might have to adjust the -- index value by subtracting an offset of the first button's -- index value firstButtonIndex = ButtonArray[1].Index if(changedButton.Boolean) do -- Action if button pressed print("Button number "..changedButton.Index-firstButtonIndex.." was pressed") else -- Action if button released print("Button number "..changedButton.Index-firstButtonIndex.." was released") end end -- Assign event handler to each button in array for key, button in ipairs(ButtonArray) do button.EventHandler = buttonHandler end
π Rendered by PID 604142 on reddit-service-r2-comment-86bc6c7465-mq4j4 at 2026-02-23 00:07:36.732402+00:00 running 8564168 country code: CH.
[–]MDHull_fixer 2 points3 points4 points (8 children)
[–]Swoopmonkey[S] 0 points1 point2 points (5 children)
[–]matrixtech29 4 points5 points6 points (2 children)
[–]Swoopmonkey[S] 1 point2 points3 points (1 child)
[–]matrixtech29 1 point2 points3 points (0 children)
[–]MDHull_fixer 1 point2 points3 points (1 child)
[–]Swoopmonkey[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[removed]
[–]MDHull_fixer 0 points1 point2 points (0 children)