home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Tele / I-L / LineShare Demo2.0.sit / LineShare Demo2.0 / LineShare Files / Docs / Script Docs < prev    next >
Encoding:
Text File  |  1993-05-16  |  4.4 KB  |  88 lines  |  [TEXT/ttxt]

  1. LineShare 1.3
  2. –––––––––––––––––––––––––––
  3. • The Note and LogMSG operators can have the second parameter (like in ARA): if the value is 2 or 3, the message is shown in the LineShare panel, if the value is 1 or 3, the message is written into the LineShare Log.
  4.  
  5.  
  6. LineShare 1.5
  7. –––––––––––––––––––––––––––
  8. • All comment lines started with "!$" are shown in the  "Comment" field when the script is selected in the "Attach" dialog box.
  9.  
  10. • The parameters should be defined in the script (the previous versions had the ^2,^3 and ^4 built-in parameters only). A parameter is described with a script line starting with the parameter identifier:
  11. ^n <parameter name> = <parameter type> <parameter values> <default value>
  12.  
  13. where:
  14. n    - defines the parameter ID, should a digit (from 2 to 9, the ^1 is reserved for the dialing string).
  15.  
  16. <parameter name> - the title string to be shown in the Options dialog box;
  17.  
  18. <parameter type>  - one of: TEXT, BOOL, ENUM
  19. a TEXT parameter is shown as a text field in the Options dialog box. A user can assign any string value to such a parameter;
  20. a BOOL parameters is shown as a pair of radio buttons in the Options dialog box.
  21. a ENUM parameters is shown as a pop-up menu in the Options dialog box. 
  22.  
  23. <parameter values>- a list of valid parameter values:
  24. this list contains elements separated with commas and enclosed with parenthesis; each element consists of two strings separated with the equal sign:
  25. Sample: ("Never"="0","1 Ring"="1","2 Rings"="2")
  26.  
  27. for  TEXT parameters this list should be omitted;
  28. for  BOOL parameters the list should contain 2 elements, the first string in each element defines the name of the radio button, the second string is assigned to the parameter if the button is selected; if the list is ommited, the default one is used:
  29. ("On"="1","Off"="0")
  30. for ENUM parameters the list elements define pop-up menu items: the first string is used as the item text, the second string is assigned to the parameter is the item is selected.
  31.  
  32. <default value> - a string assigned to the parameter when a script is initially attached to the line.
  33.  
  34. Sample:
  35. ^5 Fax Identifier:    = Text "Stalker_GmbH"
  36. A text field titled "Fax identifier" appears is the Options dialog box. Initially the string "Stalker_GmbH" is assigned to this parameter.
  37.  
  38. ^2 Speaker On: = Enum("Never" = "0" ,  "When Connecting" = "1", "Always"="2") "1"
  39. A pop-up menu titled "Speaker On:" appears in the Options dialog box. It has three items: "Never","When Connecting", "Always". Selecting one of these items results in the value "0", "1",  or "2" is assigned to the parameter ^2. Initially "1" is assigned.
  40.  
  41. • The wildcard combination ^$ is implemented. If met in a match string (i.e. in a MatchStr operator), this combination matches any string in the input stream:
  42. i.e. if the input stream is:
  43. CONNECT 9600/V42bis
  44. and a match string is defined as:
  45. MatchStr 1 10 "CONNECT ^$/"
  46. then script will jump to the lable 10, and the "9600" is assigned to ^$
  47.  
  48. When used in other operators, ^$ can be used to access the substring it has just compared.
  49. Sample:
  50. Note "Connected at ^$bps"
  51.  
  52. • The Say command is implemented:
  53. Say <string>
  54. It brings up a Notification Alert Box with the <string> message.
  55.  
  56. • Variables:
  57. you can use several (5 in this version) variables in strings. To substitute the variable content, you should write the carret sign and the variable name - a capital letter (^A,^B,^C,^D,^E).
  58. To assign a value to a variable, use the SETVAR command:
  59. SETVAR <variable_name> <string>
  60. Sample: SetVar B "Normal"
  61.              Note "^B Connection Established"
  62. This results in the "Normal Connection Established" message.
  63.  
  64. • Calculation:
  65. Everywhere in a script, except the "@Label" lines you can use a combination:
  66. VAL(<string>) instead of a number.
  67. Sample:
  68.   SetVar A "96"
  69.   SetSpeed VAL("^A00")
  70. This results in switching the serial port speed to 9600 bps.
  71. The digits in the string can have leading and trailing spaces.
  72.  
  73. Note: it means that you can use "calculated jump" as well:
  74. i.e. Jump Val("^A") is a legal operation.
  75.  
  76. • Error codes: LineShare now shows the error code, if an error is met when executing a script.
  77. There is the list of the error codes:
  78.  -6003        Jsr/return stack overflow
  79.  -6015        Undefined label
  80.  -6016        Unknown Script Command
  81.  -6017        Unexpected End of Script File.
  82.  -6018        Illegal MatchString index
  83.  -6025        Error in syntax
  84.  -6026        Error in number
  85.  -6027        String too long
  86.  -6028        Parameter/variable is not defined
  87.  -6052        Too long string in QueueInput
  88.