INTEGERABS(aexpr) Returns the absolute value of . TEMP = -12 PRINT "ABS(-12) = " ABS(TEMP) When this script fragment is executed the following is printed: ABS(-12) = 12 COMMANDsALARM Produces the audible attention sound that's used for file transfer completion and dialer connections. INTEGERmASC(svar) Returns the ASCII code for the first character of , error if NULL. TEMP$ = "ABCDE" TEMP = ASC(TEMP$) IF TEMP == 64 /* The decimal value of 'A' is 65 */ PRINT "EQUAL" ELSE PRINT "NOT EQUAL" ENDIF When this script fragment is executed the following occurs: NOT EQUAL CMDASEND filespec ASCII send a file. If is not a fully qualified pathname, the path defined in {PATHS}{UPLOADS}{U} will be used to locate the file. Typical command arguments would be: UPLOADSPATH$ = "UPLOADS:" FILE$ = "foo.txt" ASEND FILE$ When this script fragment is executed the filename "UPLOADS:foo.txt" will be sent via ASCII send. CMDfASK [LOCAL] [string,] svar Get a single character response from either the local user or from the remote connection if DCD is present and LOCAL is not used. Optionally prompt with if included, a '?' character is output otherwise. Returns a single character to . ASK "Enter menu selection: ", MENU$ This command will display the prompt with the string in quotes and place the single character input that the local or remote user enters into the string variable MENU$. Since this command is an assignment, the variable does not have to be declared prior to its use here. CMDBEEP Sounds bell if {GENERAL}{AUDIBLE BEEP}{A} is TRUE, otherwise a screen flash via the system call DisplayBeep() occurs. CMD2CALL filespec Start a new script file. Can return to the calling script with the use of the END command in the called script. If is not fully qualified, the supplied filename will be prefixed with the current path defined in {PATHS}{SCRIPTS}{S}. Global variables are not cleared. CMDCAPTURE {OPEN | APPEND | CLOSE} [SAVE] filespec Open, append or close a capture file. If the SAVE option is present on an open or append, the contents of the review buffer will be written to the capture file. If is not fully qualified, the supplied filename will be prefixed with the current pathname defined in {PATHS}{CAPTURE}{P}. CAPTUREPATH$ = "RAM:" CAPTURE APPEND SAVE "ARCHIVES:review.cap" CAPTURE OPEN "foo.cap" This fragment will cause the current contents of the review buffer to be appended to "ARCHIVES:review.cap". That file will then be closed and "RAM:foo.cap" will be opened as a new capture file. CMDCHAIN filespec Starts a new script file. Does not return to the calling script. If is not fully qualified, the supplied filename will be prefixed with the current path defined in {PATHS}{SCRIPTS}{S}. Global variables are not cleared. CMDyCHDIR dirspec Change current directory to . If does not exist no directory change will occur. STRINGCHR$(aexpr) Returns a single character string representing the ASCII value of modulo 256. TEMP = 354 CHAR$ = CHR$(TEMP + 23) The string variable CHAR$ will be assigned the character 'y' which is (354 + 23) % 256 = 121. CMD9CLEAR Clear all script variables, global and local. CMDSCLOSE [#fnum, ...] Close file or all open files if none are specified. CMD_CLRLINE [aexpr] This command will clear all or a portion of the line that the cursor is currently positioned on. The start of the line to be cleared is determined by the column that the cursor is at. The optional will limit the number of characters to be cleared, if present, to that amount or the remainder of the line if not. CMDCLRRECT aexpr1, aexpr2, aexpr3, aexpr4 Clears a rectangle in the main display starting at row , col and ending at row , col . The rectangle will be set to space characters and cleared to the current color defined by the BPEN variable. CMDACLS Clear screen using the current values of TPEN and BPEN. CMDCONTINUE Resume execution with the next iteration of the currently executing FOR, REPEAT or WHILE loop. The script must be executing one of these loop commands or an error will occur. CMDCURPALETTE c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 Sets current console palette colors. This command does not set the entire palette structure as the PALETTE option commands do. All color register values must be supplied in RGB hexadecimal format. CMDDOWNLOAD [filespec] Download a file using the current protocol selected. If is not fully qualified, the supplied filename will be prefixed with the current path defined in {PATHS}{DOWNLOADS}{D}. When DOWNLOAD is used with protocols such as YMODEM and ZMODEM, is ignored as those protocols send the filename, size and other information as part of the transfer. When used with XPR selected, is sent to the protocol library for use as needed by the selected XPR. CMDEND Halt script execution. Resumes execution in the previous script if the current script was started as the result of a CALL command. CMDYEXECUTE sexpr Executes as an AmigaDOS command. COPY$ = "copy " FOO$ = "foo " BAR$ = "bar:" EXECUTE COPY$ + FOO$ + BAR$ The resultant string "copy foo bar:" will be executed as an AmigaDOS command that copies the file "foo" from the current directory to the volume (or logical assignment) "bar:". CMDEXISTS(filespec) Returns TRUE if exists. IF EXISTS("TERMINUS:welcome.txt") ASEND "TERMINUS:welcome.txt" ELSE SEND "Welcome!\r" ENDIF This fragment checks to see if the file "TERMINUS:welcome.txt" exists, if it does it will be sent to the serial port via an ASCII send. If the file does not exist the string "Welcome!", and the current EOL will be sent instead. CMDEXIT This command will terminate the currently executing FOR, REPEAT or WHILE loop. An error will occur if no loop is executing. CMDFOR var = start TO end [STEP [-]step] statement ... NEXT Initialize to then execute intervening while the absolute value of is less than the absolute value of . NEXT causes to be incremented by 1 or . Unlimited nesting is allowed. FOR I = 20 TO 0 STEP -2 PRINT I " " NEXT The output from this script fragment would be: 20 18 16 14 12 10 8 6 4 2 0 CMDGETINT prompt, var [,min, max] Opens an integer input requester with the current value of (which can be created as part of calling this command). The optional and values define the boundaries of valid numeric input for the user. The OK gadget or pressing is required to accept the changed value. TEMP = 50 GETINT "Enter value", TEMP, 0, 100 Using this script fragment would result in the integer requester being opened set to the value of 50 and would only allow a value between 0 and 100 inclusive to be entered. The variable TEMP would be changed to the entered value once or {GETINT}{OK} is pressed. CMDGETLINE$(aexpr) Returns a copy of the contents of row in the main display. The string will be the same length as the current width of the display. If is less than 1 or greater than the number of rows in the display, an out or range error will occur. CMDGETSTRING prompt, svar Opens a string input requester with the current value of the supplied string variable (which can be created as part of calling this command). The OK gadget or pressing is required to accept the changed value. CMDGOSUB label Continue execution of script at