User Tools

Site Tools


macros:example:firequickpalette

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
macros:example:firequickpalette [2025/04/24 13:23] icke_siegenmacros:example:firequickpalette [2025/04/24 13:53] (current) icke_siegen
Line 6: Line 6:
 ^ published: | April 2025 (stems from 2023) | ^ published: | April 2025 (stems from 2023) |
 ^ description: | fire some quick palettes and show active state | ^ description: | fire some quick palettes and show active state |
-^ remarks: |  |+^ remarks: | useful to see which active palette is currently fired |
  
 {{tag>quick palette active}} {{tag>quick palette active}}
  
 ==== functions ==== ==== functions ====
-  * [[:macros:function:someusedfunction]] +  * [[:macros:function:ActionScript.SetProperty.Integer]] 
-  * [[:macros:function:anotherusedfunction]] +  * [[:macros:function:Palette.ApplyQuickPalette]]
-  * [[:macros:function:someusedfunction]] +
-  * [[:macros:function:anotherusedfunction]] +
- +
-==== affected properties ==== +
-  * [[:macros:property:someproperty]] +
-  * [[:macros:property:anotherusedproperty]]+
  
 ==== control structures ==== ==== control structures ====
-  * [[macros:control_structures|step condition]]+  * [[macros:Variables]] 
 +  * [[macros:active_binding|]]
    
 ===== Code ===== ===== Code =====
Line 35: Line 30:
     <variables>     <variables>
       <integer id="PaletteRange100" value="100"/>       <integer id="PaletteRange100" value="100"/>
-   <integer id="PaletteRange110" value="110"/>+      <integer id="PaletteRange110" value="110"/>
     </variables>     </variables>
   </macro>    </macro> 
Line 44: Line 39:
     <sequence>     <sequence>
       <step>ActionScript.SetProperty.Integer("Wiki.Macros.Palettes.FireQuickPaletteInit.PaletteRange100", 101)</step>       <step>ActionScript.SetProperty.Integer("Wiki.Macros.Palettes.FireQuickPaletteInit.PaletteRange100", 101)</step>
-   <step>Palette.ApplyQuickPalette(userNumber: 101, true)</step>+      <step>Palette.ApplyQuickPalette(userNumber: 101, true)</step>
     </sequence>     </sequence>
   </macro>    </macro> 
Line 56: Line 51:
 This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]]
  
-tbd+The first macro simply initialises the variables ''PaletteRange100'' and ''PaletteRange110'' which are then used to hold which variable is currently active (you need to make sure this follow some logic...). 
 + 
 +The second macro ''Fire QuickPalette 101'' does the work (you need to create some more such macros though): 
 +  * ''<active binding=...'' checks whether this macro should show as active, based on the number in the corresponding variable 
 +  * ''ActionScript.SetProperty.Integer()'' sets the variable to the number of this macro/palette 
 +  * ''Palette.ApplyQuickPalette(userNumber: 101, true)'' fires the corresponding palette as quick palette 
  
 ===== How to use it ===== ===== How to use it =====
  
 +  - duplicate the second macro and adjust the numbers for the usernumbers you want to work with
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
 +  - adjust the usernumbers of the palettes you want to work with
 +  - instead of clickng the palette buttons now fire the macros
  
-tbd 
- 
- 
-~~DISCUSSION~~ 
macros/example/firequickpalette.txt · Last modified: 2025/04/24 13:53 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki