Change Legend

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Change Legend

Postby kimwida » 25 Feb 2018, 17:39

I know how to change legend a cue in a chase.

This code changes first cue's legend to "Test" in the chase which user id is 10555.

Code: Select all

   <step pause="0.01">Playbacks.SetCueLegend(handle:"chaseHandleUN=10555", 1, "Test")</step>


But I want to change the legend of the chase not cue in the chase.
I tried this but not worked.

Code: Select all

   <step pause="0.01">ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback",  handle:"chaseHandleUN=10555")</step>
   <step pause="0.01">ActionScript.SetProperty("Playbacks.Editor.SelectedPlaybackName","Test")</step>


And if I want to change a cue or cuelist playback's legend, what do I need??
instead of

Code: Select all

handle:"chaseHandleUN=10555"

Or can I use "chaseHandleUN" for a cue or cuelist playback??
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Change Legend

Postby Gregory » 25 Feb 2018, 18:06

Someone else asked the same thing the other day here is the code I sent them:

Code: Select all

Handles.SetSourceHandleFromHandle("chaseHandleUN=10555")
ActionScript.SetProperty("Handles.PendingLegend", "Test")
Handles.SetLegend()
Handles.ClearSelection()

You should call ClearSelection once you are done otherwise the handle will remain selected.
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Change Legend

Postby kimwida » 26 Feb 2018, 04:21

Thank you, it works!!

Code: Select all

handle:"chaseHandleUN=10555"


This code works with a cue or cuelist playback too.
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Change Legend

Postby Gregory » 27 Feb 2018, 12:55

The text string should match the type of the handle you are wanting to access. So in theory you should use cueHandle, chaseHandle and cuelistHandle dependent on the type of playback you are using. In this case the user numbers are shared by all three types so will probably work however may have side effects in other cases. There is also a generic playbackHandle that can be used for all three types.

Example:

Code: Select all

Handles.SetSourceHandleFromHandle("playbackHandleUN=10555")

Also note that for functions that explicitly require a parameter of type handle such as SetSourceHandleFromHandle you do not need to prefix the string with handle: as it will be automatically converted.

Who is online

Users browsing this forum: No registered users and 12 guests