How to check if a hanndle/playback exists?

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

Moderator: Moderators

icke_siegen
Posts: 903
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

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)">


and

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
Gregory
Site Admin
Posts: 1114
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

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)
</step>

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.
icke_siegen
Posts: 903
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

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

Postby icke_siegen » 15 Oct 2019, 20:36

Gregory, is there a way to use IsClaimed with the handle location?

Currently we are trying this:

Code: Select all

<step condition="Handles.IsClaimed("Location=Beams,3,25")" pause="0.01">


but this macro doesn't even show at all, and Log Collector says

Unexpected Token 'Location'...


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

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

Postby Gregory » 16 Oct 2019, 18:21

Try using single quotes around the location string e.g.:

Code: Select all

<step condition="Handles.IsClaimed('Location=Beams,3,25')" pause="0.01">

Who is online

Users browsing this forum: No registered users and 2 guests