GET TOOL LIST: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
No edit summary
Mikeo (talk | contribs)
No edit summary
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Tool_List|'''Back''']]
[[:Category:List|{{Up}}]]
 
{{Command|syntax=GET_TOOL_LIST
|description=:Set the following list of variables from the current list of tools.
:<br>
:NUMBER_OF_TOOLS
:FIRST_TOOL_NUMBER
:NEXT_TOOL_NUMBER
:LAST_TOOL_NUMBER
:FIRST_FREE_TOOL_NUMBER


{{Command|syntax= GET_TOOL_LIST
|-
|description=:th
|param1=|param1_desc={{No Parameters}}
|param1=|param1_desc={{No Parameters}}
}}
}}
===Example===
===Example===
:If you have 4 tools defined, tools 1, 2, 5 and 7.
<br>
:LOCAL NumTools, FirstTool, LastTool, FreeTool, ToolList(1000)
<br>
:GET_TOOL_LIST
:GET_TOOL_LIST
:NumTools = NUMBER_OF_TOOLS
:FirstTool = FIRST_TOOL_NUMBER
:LastTool = LAST_TOOL_NUMBER
:FreeTool = FIRST_FREE_TOOL_NUMBER
<br>
:FOR i=1 TO NumTools
:ToolList(i) = NEXT_TOOL_NUMBER
:NEXT i
<br>
:The variables will be set to the following values
<br>
:NumTools = 4
:FirstTool = 1
:LastTool = 7
:FreeTool = 3
<br>
:ToolList(1) = 1
:ToolList(2) = 2
:ToolList(3) = 5
:ToolList(4) = 7




 
[[Category:List]]
[[Tool_List|Category:Tool_List]]
[[Category:Tools]]

Latest revision as of 14:53, 14 October 2013

Up

Command

GET_TOOL_LIST


Set the following list of variables from the current list of tools.

NUMBER_OF_TOOLS
FIRST_TOOL_NUMBER
NEXT_TOOL_NUMBER
LAST_TOOL_NUMBER
FIRST_FREE_TOOL_NUMBER

Parameters

No Parameters

Example

If you have 4 tools defined, tools 1, 2, 5 and 7.


LOCAL NumTools, FirstTool, LastTool, FreeTool, ToolList(1000)


GET_TOOL_LIST
NumTools = NUMBER_OF_TOOLS
FirstTool = FIRST_TOOL_NUMBER
LastTool = LAST_TOOL_NUMBER
FreeTool = FIRST_FREE_TOOL_NUMBER


FOR i=1 TO NumTools
ToolList(i) = NEXT_TOOL_NUMBER
NEXT i


The variables will be set to the following values


NumTools = 4
FirstTool = 1
LastTool = 7
FreeTool = 3


ToolList(1) = 1
ToolList(2) = 2
ToolList(3) = 5
ToolList(4) = 7