Gosub


 

Gosub>Subroutine_Name[,value1[,value2[,...]]]

 

Branches to the specified subroutine (SRT).  When that the subroutine returns, processing continues at the next line after the Gosub command.

 

Subroutines can be nested.  Subroutines can be located anywhere within the script.

 

If values are passed on the Gosub line variables will be created to contain these values.  The variables are named with the following format: SubroutineName_Var_1, Subroutine_Var_2, ... Subroutine_Var_n

 

See also SRT, END

 

Example

 

Gosub>EnterName

Gosub>CloseApp

 

//// Subroutines Below ////

 

SRT>FocusApp

   SetFocus>Data Entry Screen

End>FocusApp

 

SRT>EnterName

   Gosub>FocusApp

   Send>Firstname

   Press Tab

   Send>Surname

   Press Enter

End>EnterName

 

SRT>CloseApp

   Gosub>FocusApp

   Press ALT

   Press F4

   Release ALT

End>CloseApp