Create and Attach Scripts via commands

Open Source software contributions and discussions that supplement or extend the Palette / Light Palette software
Post Reply
User avatar
MickCrozier
Posts: 288
Joined: Tue Mar 31, 2009 3:10 am
Primary Venue / Use: Professional Theatre
Where I Am: Melbourne, Australia
Location: Melbourne, Australia

Create and Attach Scripts via commands

Post by MickCrozier » Fri Aug 28, 2009 10:51 pm

It be handy to be able to create and attach a script to anything via commands.

So where functionality requires the use of a script - such as start and stop cue list chase, it can be performed very quickly by an external app, or a bump button.

perhaps along the lines of:

HC.ScriptEditorOpen('lookpage | cuelist | etc', 'parent', 'item' [, action [, value]]) - returns scriptOpenID - loads the existing script if present
HC.ScriptEditorAddLine(scriptOpenID, 'ScriptLineString')
HC.ScriptEditorGetScript(scriptOpenID) - returns tab separated list of lines
HC.ScriptEditorGetLine(scriptOpenID, number)
HC.ScriptEditorDeleteLine(scriptOpenID, number)
HC.ScriptEditorClear(scriptOpenID)
HC.ScriptEditorClose(scriptOpenID) - creates the action (or deletes if script is empty) and saves the script
Formerly Durisian (who died peacefully of digital old age)

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: Create and Attach Scripts via commands

Post by RobertBell » Sat Aug 29, 2009 11:27 am

Are you sure this can't be done by defining the function on the fly from within your app using function (see http://www.lua.org/manual/5.1/manual.html#2.5.9)?

I guess the issue is, the function is not stored in the show file. You could store it along side the showfile using http://www.lua.org/manual/5.1/manual.html#pdf-dofile and http://www.lua.org/manual/5.1/manual.html#pdf-loadfile using Chuncks.

Maybe you could tell me a bit more of what you want to do. Is this for architectural purposes? Please give me an example of why the outside app would be wanting to change the macros inside the show file?
Robert Bell - Product Manager - Horizon Control Inc.

User avatar
MickCrozier
Posts: 288
Joined: Tue Mar 31, 2009 3:10 am
Primary Venue / Use: Professional Theatre
Where I Am: Melbourne, Australia
Location: Melbourne, Australia

Re: Create and Attach Scripts via commands

Post by MickCrozier » Sat Aug 29, 2009 9:13 pm

Hi Robert

Its more about being able to automagically put the scripts in the right place, like in a cue.

there are 2 apps I had in mind -
Cue List Chase Assistant, like John's Bump Chase Builder. The app would be able to assign hc.cuelistgo and hc.curlistrelease to a cue. (This would need a few other functions now that I think about it - to manipulate cuelist properties)

And also a Show Reporter Assistant - click a button and it adds showstart etc to the chosen cue.
Formerly Durisian (who died peacefully of digital old age)

Post Reply