User Tools

Site Tools


macros:example:togglepagetemp

Example

Toggle Windows Page temporarily

by: Sebastian Beutel, Nov. 2022
published: here
description: temporarily toggles a window's page and returns
remarks: idea: shannon Asher, https://www.facebook.com/groups/Avolites/posts/2664983363633881/

This needs to be moved onto a hardware button as Titan doesn't support multitouch. Then, as long as this button is held down, a window is toggled to its next page.

functions

  • basic math

affected properties

Code

toggleWindowPages.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros> 
 
<!-- https://www.facebook.com/groups/Avolites/posts/2664983363633881/ -->
<!-- idea by Shannon Asher -->
<!-- toggle workspace window pages while a button is held -->
 
<macro id="Wiki.Macros.Toggle.Colours" name="Toggle Colours Window Page">
  <description>Toggle Colours Window</description> 
  <start> 
    <step>Handles.Colours.ChangePage(Handles.Colours.Page.Index + 1)</step> 
  </start> 
  <end> 
    <step>Handles.Colours.ChangePage(Handles.Colours.Page.Index - 1)</step> 
  </end> 
</macro> 
 
<macro id="Wiki.Macros.Toggle.PlaybackWindow" name="Toggle PlaybackWindow Page">
  <description>Toggle PlaybackWindow</description> 
  <start> 
    <step>Handles.PlaybackWindow.ChangePage(Handles.PlaybackWindow.Page.Index + 1)</step> 
  </start> 
  <end> 
    <step>Handles.PlaybackWindow.ChangePage(Handles.PlaybackWindow.Page.Index - 1)</step> 
  </end> 
</macro> 
 
</avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

  • upon pressing the button this macro is assigned to a specific window is toggled to its next page:
    Handles.Colours.ChangePage(Handles.Colours.Page.Index + 1)
  • when the button is released the window returns to its previous page:
    Handles.Colours.ChangePage(Handles.Colours.Page.Index - 1)

How to use it

  1. the start/end syntax works in newer software (from Titan 12 or so)
  2. the macro needs to be moved to a physical button: copying it would strip parts of the syntax, and since Titan doesn't support multitouch you need a hardware button
You could leave a comment if you were logged in.
macros/example/togglepagetemp.txt · Last modified: 2022/11/15 14:32 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki