TPE command

出自ITTS
跳至導覽 跳至搜尋

Embedded Command

Section1: TPE Section2: Stack

Command:

The TPE will have one command in section2: Stack which has four commands: Goto, Save,Back,Next, Next Grupe, Call.

1.Goto

Purpose: Jump to the specific Node. Value3: The name of the Node you want to jump. If it can not find the string in the Scrip tree, this command would fail. The string can be smart format.goto to some where out of 4 main section. you must use stack save (do something) then stack back or stack next to back to previous line index.

2.Save

Purpose: Push the Node ID, which is executed just before this node and is TPE non-embedded command, into Nodes Stack. Nodes Stack will maintain by the Scrip Editor software and will be cleared when each time the main program execute the Scrip.

3.Back

Purpose: Go back to the Node ID in the up of the Node Stack and pop it out. If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

4.Next

Purpose: Go back to the Node ID +1 in the up of the Node Stack and pop it out. If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

5.NextGroup

Purpose: Go back to the next Group of the Node ID in the up of the Node Stack and pop it out. If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

6.Call

Purpose: Push the next executable Node ID into Nodes Stack and jump to the specific sub-function (Group) . In that group, you should call at the last command to go to next executable node. If it can not find the string in the Scrip tree, this command would fail. following command will be: back



Example example: tpe stack call function 檔案:Stack call example.itts

funciton must put outside of 4 main groups

Example: Scrip call and back

Example Code
    <Item> 
      <Text> </Text> 
      <Description> call function1</Description> 
      <ItemType> 2</ItemType> 
      <Skip> 1</Skip> 
      <ItemSection1> tpe</ItemSection1> 
      <ItemSection2> stack</ItemSection2> 
      <ItemCommand> call</ItemCommand> 
      <FailAction> </FailAction> 
      <FieldName> </FieldName> 
      <FieldNumber> </FieldNumber> 
      <ErrorCode> </ErrorCode> 
      <RetryTimes> 0</RetryTimes> 
      <RetryDelay> 0</RetryDelay> 
      <Process> </Process> 
      <FieldType> </FieldType> 
      <Parameter> 
        <i1>
          <Content></Content>
          <Description>Min</Description>
        </i1>
        <i2>
          <Content></Content>
          <Description>Max</Description>
        </i2>
        <i3>
          <Content>function1</Content>
          <Description>Value3</Description>
        </i3>
      </Parameter> 
    </Item> 
    <Item> 
      <Text> function1</Text> 
      <Description> </Description> 
      <ItemType> 1</ItemType> 
      <Skip> 1</Skip> 
      <SubItem> 
         <Item> 
           <Text> </Text> 
           <Description> a=a+100</Description> 
           <ItemType> 3</ItemType> 
           <Skip> 1</Skip> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> a=a+100</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> variable</ItemSection1> 
           <ItemSection2> A</ItemSection2> 
           <ItemCommand> =</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
             <i3>
               <Content>['&VAR:A']+100</Content>
               <Description>Value3</Description>
             </i3>
           </Parameter> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> back</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> tpe</ItemSection1> 
           <ItemSection2> stack</ItemSection2> 
           <ItemCommand> back</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
           </Parameter> 
         </Item> 
      </SubItem> 
    </Item> 

Example: Scrip fail action and back action

Example Code
    <Item> 
      <Text> </Text> 
      <Description> fail action example</Description> 
      <ItemType> 2</ItemType> 
      <Skip> 1</Skip> 
      <ItemSection1> variable</ItemSection1> 
      <ItemSection2> field_proc</ItemSection2> 
      <ItemCommand> </ItemCommand> 
      <FailAction> function3</FailAction> 
      <FieldName> </FieldName> 
      <FieldNumber> </FieldNumber> 
      <ErrorCode> </ErrorCode> 
      <RetryTimes> 0</RetryTimes> 
      <RetryDelay> 0</RetryDelay> 
      <Process> </Process> 
      <FieldType> </FieldType> 
      <Parameter> 
        <i1>
          <Content>305</Content>
          <Description>Min</Description>
        </i1>
        <i2>
          <Content>999</Content>
          <Description>Max</Description>
        </i2>
        <i3>
          <Content>['&VAR:A']</Content>
          <Description>Value3</Description>
        </i3>
      </Parameter> 
    </Item> 
    <Item> 
      <Text> function3</Text> 
      <Description> </Description> 
      <ItemType> 1</ItemType> 
      <Skip> 1</Skip> 
      <SubItem> 
         <Item> 
           <Text> </Text> 
           <Description> stack save</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> tpe</ItemSection1> 
           <ItemSection2> stack</ItemSection2> 
           <ItemCommand> save</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
           </Parameter> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> a=a+1</Description> 
           <ItemType> 3</ItemType> 
           <Skip> 1</Skip> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> a=a+1</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> variable</ItemSection1> 
           <ItemSection2> A</ItemSection2> 
           <ItemCommand> =</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
             <i3>
               <Content>['&VAR:A']+1</Content>
               <Description>Value3</Description>
             </i3>
           </Parameter> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> textOut A</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> picture</ItemSection1> 
           <ItemSection2> </ItemSection2> 
           <ItemCommand> textOut</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
             <i3>
               <Content>90</Content>
               <Description>X</Description>
             </i3>
             <i4>
               <Content>190</Content>
               <Description>Y</Description>
             </i4>
             <i5>
               <Content></Content>
               <Description>font name</Description>
             </i5>
             <i6>
               <Content>20</Content>
               <Description>font size</Description>
             </i6>
             <i7>
               <Content></Content>
               <Description>color</Description>
             </i7>
             <i8>
               <Content></Content>
               <Description>back color</Description>
             </i8>
             <i9>
               <Content>['&VAR:a']</Content>
               <Description>char</Description>
             </i9>
           </Parameter> 
         </Item> 
         <Item> 
           <Text> </Text> 
           <Description> back back</Description> 
           <ItemType> 2</ItemType> 
           <Skip> 1</Skip> 
           <ItemSection1> tpe</ItemSection1> 
           <ItemSection2> stack</ItemSection2> 
           <ItemCommand> back</ItemCommand> 
           <FailAction> </FailAction> 
           <FieldName> </FieldName> 
           <FieldNumber> </FieldNumber> 
           <ErrorCode> </ErrorCode> 
           <RetryTimes> 0</RetryTimes> 
           <RetryDelay> 0</RetryDelay> 
           <Process> </Process> 
           <FieldType> </FieldType> 
           <Parameter> 
             <i1>
               <Content></Content>
               <Description>Min</Description>
             </i1>
             <i2>
               <Content></Content>
               <Description>Max</Description>
             </i2>
           </Parameter> 
         </Item> 
      </SubItem> 
    </Item> 



[ITTS_Scrip_Command]