Macro Language Reference > Macros > System > boxit
  
boxit
Description
An internal or debugging macro used by PTC ALD to test elements, boxit is useful when writing scripts as it displays the value of a particular variable or string on screen, rather than in the text as is done with the @ (insert) macro.
 
Example 220. Display contents of a variable
The macro shown below will display the contents or value of the ^hgt variable in a box on-screen.
boxit ^hgt^
 
Example 221. Display a line from a dialog box
boxit %2..1e[OK][Cancel]
 
Example 222. Display the contents of a string
The example below will display the contents of a string (named "string") in a boxit.
boxit ^"string"^
 
Note the closing ^ at the end of the string to close the variable.
Syntax
boxit xpos:n? ypos:n? string:b
xpos
The initial x-position of the box in screen pixels, i.e. its distance from the left-hand edge of the screen.
ypos
The initial y-position of the box in screen pixels, i.e. its distance from the top of the screen.
string
The dialog box string, text stream or variable to be displayed.
Additional Information
As with the wdb macro, boxit calls standard PTC ALD dialog box code. Instead of displaying a dialog box, however, boxit simply displays the individual elements of the dialog box without their surrounding border. Dialog code can also be used to enhance your boxit display: take the following as an example:
boxit ^my_var%;60s
This example uses the %;60s dialog box syntax to create an editable field of 60 characters.
However, unlike a dialog box definition, boxit does not affect the ^wdb variable. All the other rules for putting together PTC ALD dialog boxes apply when you use boxit.
Since the boxit example provides no other exit methods, it is necessary to quit the box with either Enter, Ctrl+A or Shift+Shift. A ~ (tilde) character can also be included when calling the box, as in any dialog box definition, to allow the user to exit using any key, as shown below:
boxit ~^hgt^
The boxit macro can also be used to create toolbars such as the one shown below, the definition for which appears in sscr.3ad (string number 909):
 
Some characters will not be displayed by boxit. For example, if you are setting an area name to a variable, e.g.: ^area1={myfiles}, this will be displayed by boxit as myfiles but the characters are still present.
Related Links