Page 1 of 1

Passing Handle Pages

Posted: 22 Jun 2018, 10:35
by icke_siegen
Is there a way to pass the handle page to functions which expect only handlegroup and index?

I want to store a cue:

Code: Select all

Playbacks.StoreCue("PlaybackWindow", 1000, false)


However I cannot store this specifically to a certain playback page. Is there a way to pass the page to the function?

Re: Passing Handle Pages

Posted: 24 Jun 2018, 11:47
by Gregory
No I’m afraid not. These functions are for use in places like the Record menu where the user is selecting a physical button and as such are hard coded to use the current page. The only suggestion I can make is to change the page prior to calling the function.

Re: Passing Handle Pages

Posted: 24 Jun 2018, 13:13
by sideshowbond
is there a way to determine the current page so I could change back once StoreCue has run?

Re: Passing Handle Pages

Posted: 24 Jun 2018, 21:45
by Gregory
Here is an example of how you can do this:

Code: Select all

ActionScript.SetProperty("UserMacros.CurrentUserNumber", Handles.PlaybackWindow.Page.Index)
Handles.PlaybackWindow.ChangePage(1)
ActionScript.SetProperty("Playbacks.PendingLegend", Handles.PlaybackWindow.Page.DisplayName)
Playbacks.StoreCue("PlaybackWindow", 20, false)
Handles.PlaybackWindow.ChangePage(UserMacros.CurrentUserNumber)
This uses the UserMacros.CurrentUserNumber property, which is an integer, as a temporary store for the original page index so that page can be restored later. In the example the legend of the playback is also set to the name of the page it is on; not a useful thing to do but there to demonstrate what you can do.

Pages have the following properties:
  • Index: The internal page index, starts from zero.
  • DisplayIndex: The page number that is displayed to the user, normally starts from one except for the preset pages on the Pearl Expert.
  • Name: The legend of the page.
  • DisplayName: The legend of the page if it has been set otherwise the display index.