This seems like it should be the simplest thing in the world but I have been killing myself trying to get a JSON message to play macro...
I have tried alsorts of things. The best I have managed is to get a "False" respose to the message. Am I barking up the wrong tree or should I be able to do this? the macros work great via the Show Library but that's the only place.
This is the Macro I'm trying to use
<?xml version="1.0" encoding="UTF-8"?>
<avolites.macros>
<macro id="Avolites.Macros.Cue1">
<name>Cue1</name>
<sequence>
<step>Playbacks.ReleaseAllPlaybacks(Expert.ReleasePlayback.FadeTime, Expert.ReleasePlayback.UseMaster)</step>
<step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
<step pause="0.001">Menu.InjectInput("OnButtonDown","Connect","",0)</step>
<step pause="0.001">Menu.InjectInput("OnButtonUp","Connect","",0)</step>
<step pause="0.001">Menu.InjectInput("OnButtonDown","PlaybackFlash","Playbacks",0)</step>
<step pause="0.001">Menu.InjectInput("OnButtonUp","PlaybackFlash","Playbacks",0)</step>
</sequence>
</macro>
</avolites.macros>
and this is the message: :4430/titan/script/2/Macros/Run?macroId=Avolites.Macros.Cue1
Many thanks
API Playing Macros
Moderator: Moderators
- sideshowbond
- Posts: 182
- Joined: 18 Nov 2016, 20:58
Re: API Playing Macros
right, API is a little bit tricky as it basically works like another (virtual) console running in a multi user session. Hence while firing a specific playback works, things like connect a cuelist, the use of programmer and others are effectively not possible via API. Not sure about running a macro but personally I'd think that triggering a macro to connect a specific cuelist via API would try to connect that cuelist on the API console thus has no effect on the connected cuelist on your main console...
Pretty sure, Greg will correct me if I'm wrong...
Pretty sure, Greg will correct me if I'm wrong...
Re: API Playing Macros
So ok there is a virtual console running that I guess we can't see... Is it possible to use the Virtual console to fire the Macros? or call a macro with a Cue list or a JSON?
-
- Posts: 1119
- Joined: 02 Jul 2010, 10:29
- Location: Siegen, Germany
- Contact:
Re: API Playing Macros
Adam, this is exactly what I already explained to you. The WebAPI (again, there is no JSON involved apart from some answers of the webAPI) works in a separate environment in some aspects, in particular with a separate programmer.
The problem in your case is that the call
doesn't work which I believe is a WebAPI issue. The same is true for what you originally intended: directly calling the Connect command with WebAPI, like this
Maybe Gregory can shed a light on both issues.
I fear at the moment your only solution is what I already suggested: the extra 'control cuelist' which fires the connect macros.
Best regards, Sebastian
The problem in your case is that the call
Code: Select all
titan/script/2/Macros/Run?macroId=Avolites.Macros.Cue1
doesn't work which I believe is a WebAPI issue. The same is true for what you originally intended: directly calling the Connect command with WebAPI, like this
Code: Select all
titan/script/2/ConnectedPlayback/Connect?handle_userNumber=1
Maybe Gregory can shed a light on both issues.
I fear at the moment your only solution is what I already suggested: the extra 'control cuelist' which fires the connect macros.
Best regards, Sebastian
Re: API Playing Macros
Thanks Sebastian
I was starting to write back as I realsied what he was saying, when I had a condor moment. What I did was add the macro to the cue list and then call the handle using :4430/titan/script/2/CueLists/Play?handle=1 This works well apart from the flashandgo bit that seems to cause a loop. If I could do that part with something diffrent it would work fine.
Always the optomist
I was starting to write back as I realsied what he was saying, when I had a condor moment. What I did was add the macro to the cue list and then call the handle using :4430/titan/script/2/CueLists/Play?handle=1 This works well apart from the flashandgo bit that seems to cause a loop. If I could do that part with something diffrent it would work fine.
Always the optomist
Who is online
Users browsing this forum: No registered users and 1 guest