Example to demonstrate an AutoControl script used for product testing. It has two user-prompted input variables, creates a CSV file to log the results, an on screen popup that displays pass/fail, and an indefinite loop that runs the ASCII program until the ESC key is pressed. 



' this is a test run of the auto-control feature

[Language1]                        ' set language to English

[Device1]                        ' select first Device

[Clear]                        ' clear display

[ResetCSVResults]                ' clears the string buffers for CSV results tracking

[TrackCSVResults]ON        ' turns the CSV tracking On

[DefineCSV]ID Number(V2)Pass/Fail(PF)Fail Count(FC)Tester Name(V1)Mil.Time(MT)Time(TM)Mon/Day/Yr(MDY)Date(DT) ' Define data to save to the CSV file

[VarInput1]Tester Name        ' user input dialog-box requesting "Enter: Tester Name"

[SaveResultsAutoESC]        ' save results buffer text to the next available disk file when the ESC key is pressed

[ResetResults]                ' clear display

[LoopStart]                        ' Start of Loop

       [FailClear]                ' clears the Fail Counter flag

       [VarInput2]ID Number        ' user input dialog-box requesting "Enter: ID Number"

       [ESCExit]                ' check for ESC key press, if ESC pressed, stops the AutoScript and also terminates the Terminal app

       [Show]------------------------------------------

       [ShowVar1]                ' display variable #1 (Tester Name)

       [ShowVar2]                ' display variable #2 (ID Number)

       [UserInput]

       [Show]------------------------------------------

       [ShowMode4]                ' display only lines that fail for ASCII program script

       [RunProg4]          ' runs ASCII program test04.prg

       [ESCExit]                ' check for ESC key press, if ESC pressed, stops the AutoScript and also terminates the Terminal app

       [Show]------------------------------------------

       [Show]            End test program

       [Show]------------------------------------------

       [ShowFailCT]        ' displays current Failure count

       [StoreResults]        ' copies display contents to buffer

       [UpdateCSV]                ' add the current data to CSV data buffers 

       [PassFailMsg2]        ' displays a popup window that shows the current Pass or Fail state

       [Clear]                 ' clear display

[LoopEnd]                        ' End of Loop (returns to LoopStart until ESC key is pressed)