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