Technical Notes |
|
Beginning with Reflection version 14.0 Service Pack 1 (SP1), Reflection products can execute Reflection Basic (RB) host-initiated commands using Microsoft Visual Basic for Applications (VBA) with minimal modification to the command scripts.
Note: See Technical Notes 1223 and 1279 for more information about host-initiated commands.
Executing host-initiated Reflection Basic commands through VBA can resolve two known issues that occur after previous execution of a Reflection Basic script (.RBS file):
There are two ways that Reflection can be instructed to execute Reflection Basic commands using VBAby adding a special comment at the beginning of the Reflection Basic command, or by using a new escape sequence.
Add the following as a comment to the beginning of the host-initiated commands: RunAsVBA
<ESC>&o1G‘RunAsVBASub Main Dim c As Integer c = Val(InputBox$("Enter the sales amount:")) MsgBox "Your commission is: " & cEnd Sub<ESC>&oH |
<DCS>2000;1{ ‘RunAsVBASub Main Dim c As Integer c = Val(InputBox$("Enter the sales amount:")) MsgBox "Your commission is: " & DisplayCommission(c)End Sub <ST> |
The syntax for using a new escape sequence varies depending on whether you are using HP or VT emulation.
<ESC>&o<tag>t<term>G<RB script><ESC>&oI
<ESC>&o1GSub Main Dim c As Integer c = Val(InputBox$("Enter the sales amount:")) MsgBox "Your commission is: " & cEnd Sub<ESC>&oI |
<DCS>2001;<term>;<tag>{<commands><ST>
<DCS>2001;1{ Sub Main Dim c As Integer c = Val(InputBox$("Enter the sales amount:")) MsgBox "Your commission is: " & DisplayCommission(c)End Sub <ST> |
Note: All other aspects of command execution are the same as previously.
If you need further assistance, please contact technical support. For information about contacting Attachmate support, see http://support.attachmate.com/contact/?prod=reflection.