Macro (coded) to replace cue list on playback handle

Welcome to the Avolites TitanOne Support Forum

Moderator: Moderators

User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Macro (coded) to replace cue list on playback handle

Postby htevents » 01 Nov 2023, 11:54

Hello all,

I have a few cue lists that I want to replace on the same playback handle. So The playback handle contains cue list 1 and I want a macro so I can replace it for cue list 2, cue list 3 or cue list 4.

Is there already a coded macro for, that I only have to adjust for my situation? If not, how to write the macro myself?

Thanks in advance.
icke_siegen
Posts: 1089
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Macro (coded) to replace cue list on playback handle

Postby icke_siegen » 01 Nov 2023, 14:55

Basically it would work like this: https://www.avolites.de/wiki/macros/example/movehandle (you may replace "move" with "copy"). Note that you need one macro per each cuelist you want to move/copy. Additionally you need to delete the 'old' cuelist before you copy the new one there. Deleting is also covered in the wiki: https://www.avolites.de/wiki/macros/exa ... teplayback

I am happy to help if you run into problems with this.
User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Re: Macro (coded) to replace cue list on playback handle

Postby htevents » 17 Nov 2023, 17:11

Thanks for the great reply.

It is something I can look into, but it can become a bit complicated to use macros for the desired workflow.

Is it possible to kill a playback containing a cue list (in the playback window) by just tapping it again? By default, the cue list would fire and every tap on the playback button acts as go, but can't I let it act as a toggle, like a normal playback? When tapped, it fires the cue list, pressing the global GO button, fires the next cue in the cue list (etc.) and tapping the playback button again kills the cue list.
User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Re: Macro (coded) to replace cue list on playback handle

Postby htevents » 09 Feb 2024, 16:38

I have made the following macro. This macro does nothing when it is exectued, so I am wondering what is wrong with it. Hope you can help.

<?xml version="1.0" encoding="UTF-8"?>
<avolites.macros>
<!-- V1.0 by Tinjo 9/2/2024 -->

<macro id="UserMacro.ColChsOddEven">
<name>Col Chs O/E</name>
<sequence>
<step pause="0.01">Handles.SetSourceHandleFromHandle(Handles.GetHandle("Playbacks",1,6))</step>
<step pause="0.01">Handles.ConfirmDelete()</step>
<step pause="0.01">Handles.SetSourceHandleFromHandle("PlaybackWindow",2,85)</step>
<step pause="0.01">ActionScript.SetProperty.Enum("Handles.OperationMode", "copy")</step>
<step pause="0.01">Handles.CopyDestination("Playbacks",1,6)</step>
<step pause="0.01">Handles.ClearSelection()</step>
</sequence>
</macro>
</avolites.macros>
icke_siegen
Posts: 1089
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Macro (coded) to replace cue list on playback handle

Postby icke_siegen » 09 Feb 2024, 16:53

For starters I had only a look, and will try it out later.
One thing:

Code: Select all

Handles.CopyDestination("Playbacks",1,6)

is wrong: this command always works on the current page, needs only the handle index and the group. Should be something like

Code: Select all

Handles.CopyDestination("Playbacks",6)


I'll try and let you know.
User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Re: Macro (coded) to replace cue list on playback handle

Postby htevents » 09 Feb 2024, 19:00

icke_siegen wrote:For starters I had only a look, and will try it out later.
One thing:

Code: Select all

Handles.CopyDestination("Playbacks",1,6)

is wrong: this command always works on the current page, needs only the handle index and the group. Should be something like

Code: Select all

Handles.CopyDestination("Playbacks",6)


I'll try and let you know.


Strange, I copied that line one on one from the Wiki page, only the page number and handle number where an "x" instead of the actual page and handle number I want to use.

But I will try your suggestion to see if that works.
User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Re: Macro (coded) to replace cue list on playback handle

Postby htevents » 09 Feb 2024, 19:06

I have tried your suggestion, but the macro's are still not working. The don't even seem to be "playing"
icke_siegen
Posts: 1089
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Macro (coded) to replace cue list on playback handle

Postby icke_siegen » 09 Feb 2024, 20:47

In short, this would work:

Code: Select all

<macro id="UserMacro.ColChsOddEven.3">
  <name>Col Chs O/E 3</name>
    <sequence>
      <step pause="0.01">Handles.SetSourceHandleFromHandle(Handles.GetHandle("Playbacks",1,6))</step>
      <step pause="0.01">Handles.ConfirmDelete()</step>
      <step pause="0.01">Handles.SetSourceHandleFromHandle("Location=PlaybackWindow,2,85")</step>
      <step pause="0.01">ActionScript.SetProperty.Enum("Handles.OperationMode", "copy")</step>
      <step pause="0.01">Handles.CopyDestination("Playbacks",6)</step>
      <step pause="0.01">Handles.ClearSelection()</step>
    </sequence>
</macro>


Apart from the issue I already mentioned (CopyDestination needs the index on the current page), the other problem was in this line:

Code: Select all

Handles.SetSourceHandleFromHandle("PlaybackWindow",2,85)


The function SetSourceHandleFromHandle() requires a handle object as argument which can be given as handle object, as location, as user number, or as titan ID. You provided the location parameters (handle group, page, and index) but not the complete location string, which is also the reason the Log Viewer shows something like 'error with number of parameters'.

The first line in your macro does work:

Code: Select all

Handles.SetSourceHandleFromHandle(Handles.GetHandle("Playbacks",1,6))

Here the inner function GetHandle() takes the location parameters as arguments and returns a handle object which SetSourceHandleFromHandle() happily accepts as input.

In my working version I merged the location parameters into a location string:

Code: Select all

Handles.SetSourceHandleFromHandle("Location=PlaybackWindow,2,85")


You could as well use the GetHandle() function here:

Code: Select all

Handles.SetSourceHandleFromHandle(Handles.GetHandle("PlaybackWindow",2,85))

would work as well, but with different numbering (see below).

Finally please have a look at the 0-based numbering:

Code: Select all

Handles.SetSourceHandleFromHandle(Handles.GetHandle("Playbacks",1,6))
Handles.ConfirmDelete()
deletes playback 7 on page 2 (regardless what the current page is) - this is 0-based.

Code: Select all

Handles.SetSourceHandleFromHandle("Location=PlaybackWindow,2,85")
defines the source for the following copy operation as slot 85 on page 2 in the playbacks window (1-based).

Code: Select all

Handles.CopyDestination("Playbacks",6)
copies to slot 7 in the current playbacks page.

Best regards, Sebastian
User avatar
htevents
Posts: 109
Joined: 26 Jun 2017, 10:05

Re: Macro (coded) to replace cue list on playback handle

Postby htevents » 14 Feb 2024, 17:03

Ok have tried a few things now and at this moment my created macro even prevent Titan Simulator to start :shock: so I am lost now.

Can someone please make a macro for me that does the following:

Step 1: Delete what is currently on Playback handle 6 of roller layer 1
Step 2: Copy the item (a Cue List FWIW) that is in slot 81, page 2 of the Playback Window, to Playback handle 6 of roller layer 1

I do not have my created macro on my phone, so I can't post it here now, but I am very lost in this matter at the moment
icke_siegen
Posts: 1089
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Macro (coded) to replace cue list on playback handle

Postby icke_siegen » 16 Feb 2024, 06:57

Only for the casual reader: the last problem was due to a typo. The above given macro does work as intended.

Who is online

Users browsing this forum: No registered users and 2 guests