How to check if a hanndle/playback exists?

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

Moderator: Moderators

Posts: 899
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany

How to check if a hanndle/playback exists?

Postby icke_siegen » 25 Jan 2019, 16:55

i want to release a number of playbacks by usernumber, regardless if the palybacks actually exist or not - but the macro terminates as soon as a handle is not existent:

Code: Select all

<step>Playbacks.ReleasePlayback(userNumber:83,  Playbacks.MasterReleaseTime, true)</step>
<step>Playbacks.ReleasePlayback(userNumber:2,  Playbacks.MasterReleaseTime, true)</step>
<step>Playbacks.ReleasePlayback(userNumber:79,  Playbacks.MasterReleaseTime, true)</step>

I tried

Code: Select all

<step condition="Handles.IsClaimed(userNumber:83)">


Code: Select all

<step condition="Playbacks.IsSteppedPlaybackHandle(userNumber:79)">

but neither works (logs complain a Null Argument exception).

How could I make this happen (want to define a group of playbacks which will always be given certain usernumbers...)

Thanks in advance. Sebastian
User avatar
Site Admin
Posts: 1103
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom

Re: How to check if a hanndle/playback exists?

Postby Gregory » 03 Feb 2019, 20:18

Try this:

Code: Select all

<step condition="Handles.IsClaimed("cueHandleUN=1")">
  Playbacks.ReleasePlayback(userNumber:1,  Playbacks.MasterReleaseTime, true)

You cannot use the userNumber cast for the IsClaimed function as Handles is used for all types of handles and therefore it doesn’t know to what type of handle the user number pertains.

Who is online

Users browsing this forum: No registered users and 2 guests