Difference between revisions of "Template:Priority"

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with " <noinclude>This template describes the '''priority''' parameter of the automacro eventMacros.</noinclude> ; priority <number> :* '''priority'''...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  <noinclude>This template describes the '''priority''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude>
 
  <noinclude>This template describes the '''priority''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude>
 
 
; priority <[[number]]>
 
; priority <[[number]]>
 
:* '''priority''' is an optional parameter.
 
:* '''priority''' is an optional parameter.
:* '''priority''' defines the priority for activation the automacro has between all automacros, the lower the priority, the sooner ir will be checked.
+
:* '''priority''' defines the priority for activation the automacro has between all automacros, the lower the priority, the sooner it will be checked.
 
:* If not used in the automacro the default value will be used, which is: 0.
 
:* If not used in the automacro the default value will be used, which is: 0.
 
:* Must have a numeric value.
 
:* Must have a numeric value.
  
  automacro MyAuto {
+
  automacro MyAuto1 {
 
     <automacro conditions and parameters (and only them)>
 
     <automacro conditions and parameters (and only them)>
 
     priority 5
 
     priority 5
Line 19: Line 18:
 
     priority 2
 
     priority 2
 
     call {
 
     call {
         log This automacro will be checked before MyAuto because it's priority is lower
+
         log This automacro will be checked before MyAuto1 because it's priority is lower
 
     }
 
     }
 
  }
 
  }

Latest revision as of 20:37, 18 October 2020

This template describes the priority parameter of the automacro eventMacros.
priority <number>
  • priority is an optional parameter.
  • priority defines the priority for activation the automacro has between all automacros, the lower the priority, the sooner it will be checked.
  • If not used in the automacro the default value will be used, which is: 0.
  • Must have a numeric value.
automacro MyAuto1 {
    <automacro conditions and parameters (and only them)>
    priority 5
    call {
        log This automacro will be checked after MyAuto2 because it's priority is higher
    }
}

automacro MyAuto2 {
    <automacro conditions and parameters (and only them)>
    priority 2
    call {
        log This automacro will be checked before MyAuto1 because it's priority is lower
    }
}