August 1998 for WINDOWS NT® 4.0 for WINDOWS® 98 for WINDOWS® 95
Methods and Properties
WRQ
Reflection Reflection Reflection
®
WRQ
for HP with NS/VT
®
WRQ
for UNIX and Digital
®
for ReGIS Graphics
Copyright © 1994–1998 by WRQ, Inc. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language, in any form by any means, without the written permission of WRQ, Inc. Visual Basic © 1996, Microsoft Corporation. All rights reserved. Reflection for HP, UNIX and Digital, and ReGIS Graphics Methods and Properties Reference Manual Version 7.0 September 1998
Licenses and Trademarks WRQ, the WRQ logo, and Reflection are trademarks of WRQ, Inc., registered in the USA and other countries. Reflection Signature, Reflection Admit One, and Reflection Deploy are trademarks of WRQ, Inc. Patent pending. Adobe Systems Incorporated — Adobe, Acrobat, and Acrobat Reader are registered trademarks. Digital Equipment Corporation, Inc. — DEC, LAT, VAX, and VMS are registered trademarks. Hewlett-Packard Company — Hewlett-Packard, HP, and OpenMail are registered trademarks. HiT Software, Inc. — HiT Software, HiT ODBC, and HiT DB2 are trademarks. INSO Corporation — INSO is a registered trademark, and International Proofreader is a trademark. International Business Machines Corporation — AT, IBM, and AS/400 are registered trademarks. Microsoft Corporation — Microsoft, MS-DOS, Windows, Windows NT, and Visual Basic are registered trademarks. NCompass Labs, Inc. — NCompass and DocActive are trademarks. NetManage, Inc. — NetManage and NS/Router are registered trademarks. Novell, Inc. — Novell and NetWare are registered trademarks. The Open Company — UNIX is a registered trademark. All other brand and product names mentioned in this manual are the trademarks of their respective owners.
Customer Service WRQ Corporate Headquarters 1500 Dexter Avenue North Seattle, WA 98109 USA +1.206.217.7100 +1.206.217.0293 FAX 800.872.2829
European Headquarters The Netherlands +31.70.375.11.00 +31.70.356.12.44 FAX
S.E. Asian Headquarters Singapore +65.336.3122 +65.336.5233 FAX
Technical Support in the USA E-mail:
[email protected] WWW: support.wrq.com Reflection Technical Notes (24-hour automated fax request line): 206.216.2680 Bulletin Board (BBS): 206.217.0145 BBS Telnet Gateway: bbs.wrq.com Anonymous FTP Server: ftp.wrq.com Technical Support: 206.217.7000 Technical Support Fax: 206.217.9492 For Partners of WRQ visit: www.wrq.com/bp/currpart.htm
Technical Support Outside the USA Please contact your WRQ Worldwide Distributors: visit www.wrq.com/bp/intldist.htm, or call WRQ for the name of the Business Partner nearest you. You can also send an e-mail to
[email protected].
Technical Documentation Visit the following Web site to download the PDF (Portable Document Format) version of this and other WRQ manuals: www.wrq.com/products/evaluate/download/docindex.htm. We welcome suggestions on how to improve our printed and online documentation. Send your comments to
[email protected].
Introduction This manual is a reference to the methods and properties supported by: • Reflection for HP • Reflection for UNIX and Digital • Reflection for ReGIS Graphics The material in this document is copied directly from Reflection Help topics. When you view this information using the Help, you can take advantage of links to related topics, view lists of commands organized both alphabetically and by task, and get access to the most current information. To view these topics in Reflection’s Help: 1.
On the Help menu, click Help Topics.
2.
Click the Contents tab, open the Reflection Programming Guide, and double-click Shortcut to Reflection Programming Help.
3.
Click the Contents tab in the Reflection Programming Help, open the book called Language Reference, and select a topic from the list.
Methods Page 1
Programming with Reflection
The Reflection Object Model Reflection uses one object, Session. All of Reflection’s methods and properties act on the Session object. Note: Prior to version 7.0, Reflection used the name Application for the Reflection object. If you are creating or maintaining Reflection Basic scripts, continue to use Application for the Reflection object name. You can also use Application in Reflection Visual Basic macros, but using Session enables some Visual Basic Editor features that are not available with Application and may improve your macro performance. Programming with Reflection
AbortTransfer method Syntax
object.AbortTransfer
Description Aborts a file transfer in progress (for any of the supported transfer protocols: Kermit, WRQ/Reflection, Xmodem, or Zmodem) without communicating with the host program. This method is more drastic than CancelTransfer, and may leave the host in an unpredictable state. Use AbortTransfer only if you believe the host transfer program has stopped responding; otherwise use CancelTransfer. This method is not likely to be useful in a macro because all transfer methods must complete execution before subsequent commands are executed. AbortTransfer can be useful for mapping to custom items such as toolbar buttons, keystrokes, or events. You could also use this method if you are using Automation to control Reflection. For example, you could use stand-alone Visual Basic to create a form with an Abort button to abort a transfer in progress. Programming with Reflection
Activate method Syntax
object.Activate
Description Makes Reflection the active window. Programming with Reflection
BackgroundColor method Syntax
MyBackground = object.BackgroundColor(Attribute)
Description Returns the background color for a particular host attribute. For example, the following two statements assign the current color value for plain background text to the variable plainGround: Dim plainGround As Integer plainGround = Session.BackgroundColor(rcPlainAttribute) Arguments Attribute
Argument type: Enumeration Identifies the host attribute value (such as plain or underlined text). The values are: rcPlainAttribute rcBlinkAttribute
Methods Page 2
rcInverseAttribute rcUnderlineAttribute rcBoldAttribute (for DEC hosts) rcHalfbrightAttribute (for HP hosts) rcFunctionKeys (for HP hosts) These values (except rcPlainAttribute and rcFunctionKeys) can be added together to return color values for combined attributes (such as Bold Inverse and Underline Blink). For example, the following expression returns the background color for text with the Inverse Blink attribute: .BackgroundColor(rcInverseAttribue+rcBlinkAttribute) Return MyBackground
Return type: Enumeration This method returns an integer value between 0 and 15. These values are equal to one of the following predefined constants. (Note: The numeric values of these constants are not related to the position a color occupies in the Color Setup dialog box. To avoid confusion, always refer to colors using the predefined constants.) rcWhite rcGrey rcRed rcBlue rcGreen rcYellow rcCyan rcMagenta rcBlack rcDkGrey rcDkRed rcDkBlue rcDkGreen rcDkYellow rcDkCyan rcDkMagenta
Programming with Reflection
Break method Syntax
object.Break
Description Transmits a break signal to the host computer. The interpretation of this signal depends on the host to which it is sent. Break is not generally used with VMS hosts.
Methods Page 3
Programming with Reflection
CancelExitEvent method Syntax
object.CancelExitEvent
Description Cancels an Exit command. This method is only relevant during the processing of an exit event; it is ignored at any other time. You can define an exit event using Reflection’s Event Setup dialog box by selecting When Reflection exits in the Event type list. You can define an exit event programmatically with the OnEvent method by using rcReflectionExit for the Event type. Arguments None. Example The DefineExitEvent macro creates an exit event using the OnEvent method. This event calls the ExitMacro macro shown next. You could define an equivalent event using the Event Setup dialog box. (Line continuation characters—an underscore preceded by a space—are used in these examples to break up long lines.) Sub DefineExitEvent() Session.OnEvent rcNextEvent, rcReflectionExit, rcVBMacro, _ "ExitMacro", rcEnable, rcEventReenable End Sub ExitMacro gives the user an opportunity to cancel the exit event using the CancelExitEvent method. Note: If you have not saved your settings, you will see Reflection’s SaveChangesOnExit dialog box before you see the message box created by this exit macro. Sub ExitMacro 'Cancel an exit event if the user says to Dim result As Integer result = MsgBox("Reflection will now exit. Is this OK?", vbYesNo, _ "Custom Exit Prompt") 'Cancel the exit event only if the user selected No Select Case result Case vbYes Exit Sub Case vbNo Session.CancelExitEvent End Select End Sub
Methods Page 4
Programming with Reflection
CancelTransfer method Syntax
object.CancelTransfer
Description Attempts to cancel a file transfer in progress (for any of the supported transfer protocols: Kermit, WRQ/Reflection, Xmodem, or Zmodem) by shutting down the host program. Use AbortTransfer if you think the host program has stopped responding. This method is not likely to be useful in a macro because all transfer methods must complete execution before subsequent commands are executed. AbortTransfer can be useful for mapping to custom items such as toolbar buttons, keystrokes, or events. You could also use this method if you are using Automation to control Reflection. For example, you could use stand-alone Visual Basic to create a form with an Abort button to abort a transfer in progress. Programming with Reflection
CharacterAttributes method Syntax
ThisAttribute = object.CharacterAttributes(Row, Column)
Description Returns the character attributes of the character at the specified row and column. Arguments Row Argument Type: Integer Required Specifies a row in display memory. For HP emulation, the first row of display memory is 0, rows are numbered with positive numbers only, and the first row on the screen can be anything. To find coordinates relative to the current screen, use the ScreenTopRow property for the value of the top row on the screen. In HP emulation, DisplayMemoryTopRow will always return 0. For DEC emulation, the first screen row is always 0; rows on the screen have positive numbers, and rows scrolled off the screen have negative numbers. In DEC emulation, ScreenTopRow will always return 0. The property DisplayRows returns the number of rows displayed on the screen. To check all rows on the current screen in either emulation, use the following row values: Dim minRow, maxRow as Integer minRow = .ScreenTopRow maxRow = .ScreenTopRow + .DisplayRows - 1 Column
Argument Type: Integer Required Specifies a column in display memory. Columns are numbered starting at 0 in both HP and DEC emulation. The DisplayColumns property returns the number of columns displayed on the screen. To check all columns on the current screen, use the following column values:
Methods Page 5
Dim minColumn, maxColumn as Integer minColumn = 0 maxColumn = .DisplayColumns - 1 Return ThisAttribute
Return type: Enumeration This method returns an integer value. The return value of rcNoCharacter (-1) means that there is no character in the specified row and column, and also that there are no more characters to the right of that column in that row. If there is a character at the specified location, the return value is between 0 and 15, and is equal to one of the positive constants listed here, or the sum of one or more of these constants. For example, if a character has a blinking attribute, the return value will be rcBlinkAttribute (1). If the character is blinking, inverse, and underlined, the return value will be rcBlinkAttribute+rcInverseAttribute+rcUnderlineAttribute (1+2+4= 7) Return contants
Equivalent value
rcNoCharacter
-1
rcPlainAttribute
0
rcBlinkAttribute
1
rcInverseAttribute
2
rcUnderlineAttribute
4
rcBoldAttribute
8 (DEC only)
rcHalfbrightAttribute
8 (HP only)
Example This example demonstrates how to test the character attributes of each character in the current screen display. For this example, each character is tested for a particular attribute. If that attribute is found, the coordinates are displayed and we exit from the procedure. A bit-wise comparison is used to test the returned attribute. Sub DetermineCharacterAttributes () Dim row, minRow, maxRow as Integer Dim column, minColumn, maxColumn as Integer Dim thisAttribute as Integer With Session minRow = .ScreenTopRow maxRow = .DisplayRows -1 minColumn = 0 maxColumn = .DisplayColumns - 1 'For all rows and all columns on screen For row = minRow to maxRow For column = minColumn to maxColumn 'Check the current character thisAttribute = .CharacterAttributes(row, column) 'Check to see if this is the last character on the line. If (thisAttribute = rcNoCharacter) Then Exit For End If
Methods Page 6
'Do whatever you want with the attribute. 'For this example, use a bit-wise comparison to test for blinking 'text. The bit-wise test means that the returned attribute will pass if it 'just blinking, and also if it combines blinking with some other attribute. 'If blinking text is found, display the coordinates and 'exit from the procedure. If (thisAttribute And rcBlinkAttribute) > 0 Then MsgBox "Blinking text begins at row "& row & ", column " & column Exit Sub End If Next column Next Row End With End Sub
Programming with Reflection
CheckEvent method Syntax
Event = object.CheckEvent
Description Checks for the occurrence of an event defined with the DefineEvent method. Return Event Return type: Integer Returns the number of the first defined event that occurs after CheckEvent is executed.
Programming with Reflection
CheckEventNumber method Syntax
Result = object.CheckEventNumber(EventNumber)
Description Checks for the occurrence of the specified event, defined with the DefineEvent method. Arguments EventNumber Argument type: Integer Required The event for which to check. The event number is assigned by the Event argument of DefineEvent. Return Result
Methods Page 7
Return type: Integer Returns True if the event has occurred and False if it has not.
Programming with Reflection
Clear method Syntax
object.Clear ClearWhat
Description Clears text (or graphics) from Reflection’s display memory. Arguments ClearWhat Argument type: Enumeration Required Specifies what to clear. The possible values are: rcSelection Clears the selection. This option is ignored if no selection exists, or if Reflection is emulating a VT terminal (which does not allow the selection to be cleared). Therefore, this option is invalid in Reflection for UNIX and Digital, Reflection for ReGIS Graphics, and Reflection for HP in VT emulation mode. rcScreen Clears the current screen in display memory. rcAll Clears all of display memory, including the screen. Programming with Reflection
ClearEvents method Syntax
object.ClearEvents
Description Deletes all events defined with the DefineEvent method. Programming with Reflection
CloseAllConnections method Syntax
object.CloseAllConnections
Description Closes all connections established by the current copy of Reflection. This method disconnects the current connection (if any) and any suspended connections previously established. This method does not affect connections opened by other copies of Reflection. Programming with Reflection
CloseStatusBox method Syntax
object.CloseStatusBox
Description Closes the dialog box created by the StatusBox method.
Methods Page 8
Programming with Reflection
CommitLoginProperties method Syntax
object.CommitLoginProperties [Options]
Description This method is relevant only if Reflection Admit One is installed and new data has been provided for the Admit One database. (The GetPassword and GetLoginProperty methods can open dialog boxes that prompt for new user data.) CommitLoginProperties controls how these changes are saved to the database. By default, Reflection always prompts the user, asking if new information should be saved to the database. Use this method if you want to change this default behavior. For example, the following statement specifies that new information should be saved to the Admit One database without prompting the user: Session.CommitLoginProperties rcChangesAlways Arguments Options
Argument type: Enumeration Optional Specifies conditions for making these changes. The default value is rcChangesAskUser. rcChangesNever Do not commit changes to the Admit One database. rcChangesAlways Commit changes, but do not prompt the user. rcChangesAskUser If changes have been made, open a dialog box to ask the user whether to commit these changes to the database.
Programming with Reflection
CompileScript method Syntax
ErrorCode = object.CompileScript(ScriptName)
Description Compiles a Reflection Basic script. Arguments ScriptName Argument type: String Required Specifies a Reflection Basic script to compile. Supply complete path information if the script isn’t on the Reflection Basic path. If ScriptName specifies a plain text file, the file is automatically converted to the Reflection Basic script format. Return ErrorCode
Methods Page 9
Return type: Integer The numeric error code from the compilation: 0 if the script was successfully compiled (contained no syntax errors), or a non-zero error value. Use the Error$ statement to return the equivalent error message:
Example Sub Demo () Dim x As Long x = Session.CompileScript("C:\onions.rbs") MsgBox "Error #" & x & ", " & Error$(x) End Sub Programming with Reflection
Connect method Syntax
object.Connect [ConnectionName]
Description Establishes a connection using the current connection type (the value of the ConnectionType property) and connection settings (the value of the ConnectionSettings property). If a connection is already open when you use this method, an error is returned; you can use the Connected property to determine whether a connection is currently open. Further, you cannot change the connection type once a connection is open; however, you may be able to change certain connection setting keyword tokens. The tables of connection setting keywords show which settings can be changed. Arguments ConnectionName Argument Type: String Optional Specifies the name of a connection created using the Connection Directory. Use this property only if you have upgraded from an earlier version of Reflection (prior to version 6.0) and have elected to continue using the Connection Directory. If this argument is supplied, the Connect method ignores any previously configured connection type and connection settings, and instead uses the settings stored in the saved connection. Note: If the Connect method is used to make a modem connection when no modem is defined, one of the following will occur: • If Reflection is using Control Panel modems (the default configuration), a dialog box asking if the user wants to run the Modem Control Panel to add a modem driver opens. If the user clicks Yes in this dialog box, the Install New Modem program is started; Reflection displays a second dialog box instructing the user to click OK when modem installation is complete. When the user closes the dialog box, Reflection dials the newly installed modem. If the user does not run the Install New Modem program or cancels the installation process before modem installation is complete, Connect returns rcGeneralConnectionError with .ConnectionErrorMessage set to “No modems installed.” • If Reflection is using the older Reflection Modem dialer (the UseModemDialerV5 property is set to True), a dialog box that lets the user define a modem opens. If the user cancels this dialog box, Connect returns rcGeneralConnectionError with .ConnectionErrorMessage set to “No modems installed.” If the user selects a modem, Reflection dials the modem or prompts for a phone number if none has been configured. Example This example uses the Connect method to open the connection after the connection type and connection settings are specified: Sub MakeAConnection () With Session If .Connected = False Then .ConnectionType = "TELNET"
Methods Page 10
.ConnectionSettings = "Host myhost" .Connect End If End With End Sub
Programming with Reflection
ConnectionSetting method Syntax
Value = object.ConnectionSetting(Setting)
Description Returns the current value for a single connection keyword token. See also the ConnectionSettings property, which returns all of the connection settings for the current connection. Arguments Setting Argument type: String Required A valid connection keyword token for the connection type. Use the ConnectionType property to determine the current connection type. Use the ConnectionSettings property to determine all of the current connection settings for the connection type. Return Value
Return type: String The value of the specified connection keyword token.
Example The following example assumes a connection type that uses the “host” keyword token: Sub Demo () Dim hostName As String hostName = Session.ConnectionSetting("host") MsgBox hostName End Sub
Programming with Reflection
ConnectTemplate method Syntax
object.ConnectTemplate ConnectionName
Description Configures Reflection for connections saved in the Connection Directory. The Connection Directory is no longer standard in Reflection version 6.0 and 7.0; it was supported in Reflection version 5.x and earlier. The Options argument allows you to configure Reflection for a connection without connecting to the host. This method is used by the conversion wizard to convert Connection Directory information to settings files. Arguments ConnectionName Argument Type: String Required The name of a connection created using the Connection Directory. Options
Methods Page 11
Argument Type: Enumeration Optional
Use this argument if you want to configure Reflection for a connection, but do not want to connect to the host. rcNoConnect Opens the saved connection without connecting to the host.
Programming with Reflection
Copy method Syntax
object.Copy CopyWhat, [Format]
Description Copies text or graphics from Reflection’s display memory to the Clipboard. Arguments CopyWhat Argument type: Enumeration Required Specifies what to copy. The possible values are: rcSelection Copies the current selection (if one exists) to the Clipboard. If nothing is selected, rcSelection clears the Clipboard. rcScreen Copies the current screen in display memory to the Clipboard. rcAll Copies all of display memory to the Clipboard. Format
Argument Type: Enumeration Optional Specifies in what format to copy the data. If you omit this argument, data is copied to the Clipboard as plain ASCII text. The possible values are: rcAsPlainText Copies plain ASCII text. This is the default value. rcAsTableText Copies as a tab-delimited table. This is equivalent to clicking Copy Table on the Edit menu. rcAsRichText Copies data in rich text format (rtf). rcAsBitmap Copies a graphics/bitmap image to the Clipboard. This value is only valid in Reflection for ReGIS Graphics, and only when the value for the CopyWhat argument is rcSelection or rcScreen.
Methods Page 12
Programming with Reflection
CopyAboutBoxInfo method Syntax
object.CopyAboutBoxInfo
Description Copies information about your system from the About Reflection dialog box to the Clipboard. Programming with Reflection
DDEExecute method Syntax
object.DDEExecute ConversationID, Command
Description Sends a command to a DDE server application. Arguments ConversationID Argument type: Integer Required The conversation identifier (obtained from DDEInitiate). Command
Argument type: String Required One or more commands to send to the DDE server. Each command must be enclosed in square brackets.
Programming with Reflection
DDEInitiate method Syntax
ConversationID = object.DDEInitiate(AppName, TopicName)
Description Establishes a DDE conversation between Reflection (acting as the client) and the specified application (acting as the server). You cannot use an empty string ("") as the value for both arguments. Arguments AppName Argument type: String Required Identifies the DDE application name of a Windows application. Use an empty string ("") to establish a conversation with the first application that supports the specified TopicName. TopicName
Return ConversationID
Methods Page 13
Argument type: String Required Identifies the DDE topic for the conversation. Use an empty string ("") to establish a conversation with any topic supported by the specified application. Return type: Integer A number that can be used to identify this conversation in other DDE methods (DDEExecute, DDEPoke, DDERequest, and DDETerminate).
Programming with Reflection
DDEPoke method Syntax
object.DDEPoke ConversationID, ItemName, Value
Description Sends data to a DDE server application. Arguments ConversationID Argument type: Integer Required The conversation identifier (obtained from DDEInitiate). ItemName
Argument type: String Required The DDE item name. For valid item names, see the server application’s documentation.
Value
Argument type: String Required The data to be sent to the server application.
Programming with Reflection
DDEQueryServerTopics method Syntax
Topics = object.DDEQueryServerTopics(AppName, TopicName)
Description Returns a list of currently running DDE server applications, a list of topics supported by the specified application, or a list of the applications that support the specified topic. You cannot use an empty string ("") as the value for both arguments. Arguments AppName Argument type: String Required Identifies the DDE application of interest. Use an empty string ("") to query for all applications that support the specified topic. TopicName
Return Topics
Argument type: String Required Identifies the DDE topic of interest. Use an empty string ("") to query for all topics supported by the specified application. Return type: String A tab-delimited list of servers, topics, or both.
Programming with Reflection
DDERequest method Syntax
Value = object.DDERequest(ConversationID, ItemName)
Description Retrieves data from a DDE server application.
Methods Page 14
Arguments ConversationID
ItemName
Return Value
Argument type: Integer Required The conversation identifier (obtained from DDEInitiate). Argument type: String Required The DDE item name. Return type: String The requested data.
Programming with Reflection
DDETerminate method Syntax
object.DDETerminate ConversationID
Description Terminates a DDE conversation. Arguments ConversationID Argument type: Integer Required The conversation identifier (obtained from DDEInitiate). Programming with Reflection
DDETerminateAll method Syntax
object.DDETerminateAll
Description Terminates all DDE conversations. Programming with Reflection
DefineEvent method Syntax
object.DefineEvent Event, EventType, [String], [Row], [Column], [Key]
Description Defines an event that can be waited or checked for later. Defining an event doesn’t prevent processing of subsequent commands. You can check for the occurrence of defined events with CheckEvent or CheckEventNumber . You can pause to wait for defined events with WaitEvent or WaitEventNumber. Once defined, an event remains defined as long as your Reflection session lasts, and may affect subsequent procedures that check for events. You can remove an individual event definition using RemoveEvent, and it is a good idea to use this method after you have checked for an event. You can use ClearEvents to remove all defined events. Which arguments you need to use for this method depends on the event type you specify in the EventType argument.
Methods Page 15
Arguments Event
Argument type: Integer or Enumeration Required Specifies a number identifying this event. Do not use the same number to define another event during the same Reflection session. Do not use 0 as the value for this argument without first removing this event. Use rcNextEvent to have Reflection automatically assign an event number. (The EventDefined property returns the number of the most recently defined event.)
EventType
Argument type: Enumeration Required The event being defined. The values are: rcSilence Defines an event as the absence of activity (data from the host) for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format. rcKbdEnabled Defines an event as the keyboard being unlocked for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format. rcEvConnected Defines an event as a host connection being established. No additional arguments are needed for this event type. rcEvDisconnected Defines an event as a host connection becoming disconnected. No additional arguments are needed for this event type. rcEnterPos Defines an event as the positioning of the cursor at the specified screen coordinates, specified by the Row and Column arguments. For the event to occur, the cursor must be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time. rcExitPos Defines an event as the positioning of the cursor at any location on the screen other than specified coordinates. Use the Row and Column arguments to specify coordinates. For the event to occur, the cursor must have previously been at the coordinates, and now must not be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time. rcCommString Defines an event as the reception of the specified string from the host. Use the String argument to specify the string. rcDisplayString Defines an event as the specified string appearing at the specified row and column coordinates in the terminal window. Use the String argument to specify the string. Use Row and Column to specify coordinates. To specify any row or column, use rcAnyRow and/or rcAnyCol for Row and Column.
Methods Page 16
rcTimeOfDay Defines an event as the current time matching the specified clock time. Use the String argument to specify the time of day in HH:MM:SS.hh format using a 24-hour clock (00:00:00-23:59:59). rcTime Defines an event as the passage of the specified amount of time from when the event is defined. Use the String argument to specify the interval of time in HH:MM:SS.hh format. rcBlockModeEnter The terminal has entered block mode. No additional arguments are needed for this event type. rcBlockModeExit The terminal has exited block mode. No additional arguments are needed for this event type. rcFileTransferDone A file transfer has successfully completed. No additional arguments are needed for this event type. rcTerminalKeystroke Defines an event as the transmission of the specified terminal key to the host. The Key argument defines the host function. The Key argument defines the host function. String
Argument type: String Optional Specifies the string that defines string-oriented events. Use this argument when the value you use for EventType requires a string—that is, when EventType is rcSilence, rcKbdEnabled, rcCommString, rcDisplayString, rcTimeOfDay, or rcTime.
Row
Argument type: Integer or Enumeration Optional Specifies the row location for screen events. Use a row number to specify a particular row, or use rcAnyRow to specify that the event can occur at any row location. Use this argument when EventType is rcEnterPos, rcExitPos, or rcDisplayString.
Column
Argument type: Integer or Enumeration Optional Specifies the column location for screen events. Use a column number to specify a particular column, or use rcAnyCol to specify that the event can occur at any column location. This argument is relevant when EventType is rcEnterPos, rcExitPos, or rcDisplayString.
Key
Argument Type: Enumeration Optional Specifies a terminal key constant when EventType is rcTerminalKeystroke. For a complete list of terminal key constants, open the Reflection Type library in the object browser and look under TerminalKeys. To determine the appropriate constant for a particular keystroke, use the Reflection Keyboard Setup dialog box. When you click on a key in the terminal keyboard, you’ll see an identifier, such as VtF8 or HPF2, at the bottom of the dialog box. The terminal key constant is this identifier preceded by “rc” and followed by “Key”, so the terminal key constant for VtF8 is rcVtF8Key.
Methods Page 17
Example This example uses DefineEvent to define an event which occurs every 5 seconds. EventDefined is used to return the event number. The While loop uses WaitEventNumber to wait for the event and display a message box. When the user cancels the message box, RemoveEvent is used to remove the event. Sub DefinedEvent() Dim fiveSecondEvent As Integer 'event number Dim result As Integer 'Message box return With Session 'Define a Time event to occur after a 5 second interval .DefineEvent rcNextEvent, rcTime, "5" 'Use the EventDefined property to return the number of the 'most recently defined event. fiveSecondEvent = .EventDefined 'Wait for the event to occur until the user cancels. While .WaitEventNumber(fiveSecondEvent, 30) result = MsgBox("The event has occurred." & vbCrLf & vbCrLf & _ "Press OK to wait for the next event. " & _ "Press Cancel to terminate the event.", _ vbOKCancel + vbInformation, "Five Second Event") 'If the user cancelled, remove the event and quit If result = vbCancel Then .RemoveEvent fiveSecondEvent Exit Sub End If Wend End With End Sub Programming with Reflection
DestroyToolbar method Syntax
object.DestroyToolbar ToolbarName
Description Removes the specified toolbar. If the specifed toolbar does not exist, Reflection ignores this command; no error is returned. Arguments ToolbarName Argument type: String Required The name of the toolbar to be removed. Include spaces, if any, in the toolbar name. Toolbar names are not case sensitive. For example, this command will remove the toolbar created using the name “My Toolbar.” Session.DestroyToolbar "My Toolbar"
Methods Page 18
Programming with Reflection
Dial method Syntax
object.Dial PhoneNumber, [Description], [InitString], [AnswerTimeout], [RetryTimes], [RetryInterval], [SpeakerMode], [SpeakerVolume], [SpeakerOffAfterRedial], [IgnoreModemErrors]
Description Dials a modem. This method is only valid if Reflection is set to use the old modem dialer (UseModemDialerV5 = True). Arguments PhoneNumber Argument type: String Required The phone number to dial. The string can contain any valid modem dialing characters, such as commas (to allow dialing to pause for two seconds per comma) and hyphens and parentheses (used as separators for better readability). The string should not include any AT commands or dialing prefix commands; these settings should be made in the Dialing Options dialog box from the Connection Setup dialog box. Description
Argument Type: String Optional Description to be displayed in the “Dialing In Progress” dialog box. If this option is omitted, only the phone number appears in the dialog box.
InitString
Argument Type: String Optional String to be sent to the modem before dialing. If omitted, Reflection uses the default initialization string configured in the Configure Modem dialog box.
AnswerTimeout
Argument Type: String Optional Specifies the amount of time to wait for the host to confirm the connection. The string is specified in HH:MM:SS.hh format. A time string of "0" causes Reflection to wait forever. If this argument is omitted or is empty (""), the default timeout (60 seconds) is used.
RetryTimes
Argument Type: Integer Optional Specifies the number of times to redial if the number is busy or does not answer. If omitted, Reflection uses the default value (one retry).
RetryInterval
Argument Type: String Optional Specifies the amount of time to wait before redialing. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), the default timeout is used (120 seconds).
SpeakerMode
Argument Type: Enumeration Optional Specifies the speaker mode. The default is rcSpeakerDialing. The possible values are: rcSpeakerOn Modem speaker is always on.
Methods Page 19
rcSpeakerOff Modem speaker is always off. rcSpeakerDialing Modem speaker is on during dialing. SpeakerVolume
Argument Type: Enumeration Optional Specifies the speaker volume. The default is rcSpeakerMedium. The possible values are: rcSpeakerLow Modem speaker volume is low. rcSpeakerMedium Modem speaker volume is medium. rcSpeakerHigh Modem speaker volume is high.
SpeakerOffAfterRedial Argument Type: Boolean Optional If True, the modem speaker is turned off after the first dialing attempt. If False (the default value) or omitted, the modem speaker remains set to the SpeakerMode for each dialing attempt. IgnoreModemErrors Argument Type: Boolean Optional If True, Reflection ignores modem initialization string errors. If False, these errors are displayed in a message box. Example The following procedure shows how to use the Dial method to dial a modem that’s available on a shared modem pool, to which you gain access via a Telnet connection. The procedure first disconnects the current connection (if any), then configures and connects to the shared modem pool using Telnet. Once the connection is open, the procedure waits for a password prompt from the modem pool, asks the user to provide the password using the PasswordBox method, then tries to get the modem’s attention with the AT command. If the modem responds with "OK", the Dial method is used to dial the phone number. The procedure tries three times to get the modem’s attention; if the modem doesn’t respond, the procedure starts again from the top, up to five times. Sub UseDialToConnect () Dim CR As String Dim tries As Integer, retries As Integer Dim gotPrompt As Integer Dim thePassword As String CR = Chr$(rcCR) tryAgain: With Session If .Connected = True Then .Disconnect End If If .Connected = False Then .ConnectionType = "TELNET"
Methods Page 20
.ConnectionSettings = "Host modempool" .Connect End If .Transmit CR If .WaitForString("Password>", 5, rcAllowKeystrokes) = False Then MsgBox("Couldn't get Telnet modem.") Exit Sub End If thePassword = .PasswordBox("Enter password for Telnet modem: ") If thePassword = "" Then Exit Sub Else .Transmit thePassword & CR End If gotPrompt = False For tries = 1 To 3 .Transmit "at" & CR gotPrompt = .WaitForString("OK", 3, rcAllowKeystrokes) If gotPrompt = True Then Exit For End If Next If gotPrompt = False Then retries = retries + 1 If retries = 5 Then MsgBox "Could not establish connection to the Telnet modem." Exit Sub Else Goto tryAgain End If End If .Dial "217-0145", "WRQ Bulletin Board" End With End Sub
Programming with Reflection
Disconnect method Syntax
object.Disconnect
Description Disconnects the current connection and closes the port. This method does not change the value of the connection type (determined by the ConnectionType property) or connection settings (determined by the ConnectionSettings property). A subsequent call to Connect, therefore, reconnects to the most recently established connection.
Methods Page 21
By default, when you close a serial connection (including serial, modem, NASI, EICON, INT-14, and IBMACS connections)no matter whether you close it using the Disconnect method or the Disconnect command in the Connection menu, or by quitting Reflectionthe DTR (data terminal ready) signal is also dropped. In some cases, particularly with modem connections, you may want the DTR signal to remain true even after disconnecting or quitting Reflection; this prevents the modem from hanging up and lets you return to your Reflection session and resume your connection. To avoid dropping the DTR signal when disconnecting, set the ConnectionSettings keyword DropDTROnDisconnect to False. Programming with Reflection
Display method Syntax
object.Display String, [Options]
Description Displays a string in Reflection’s terminal window as though it had been received from the host. Use this method with cautionwhen you send data to the terminal window, the user may not recognize that the data did not come from the host, and may act on the assumption that it did. This can create confusion. Arguments String Argument type: String Required The string to display. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. You can combine both options using addition as shown here: .Display "Hello\r", rcNoTranslation + rcHexData rcNoTranslation Indicates that the string should not be translated from the PC character set into the host character set. rcHexData Indicates that portions of a string that follow a backslash should be interpreted using either hexadecimal code or C-language character conventions. For example, the following statement transmits the fraction symbol ¼ (using the decimal code x0BC) followed by a carriage return (using the \r special character): .Transmit "\x0BC\r", rcHexData
Example The following command displays the word “Hello,” a carriage return/linefeed sequence, and then the word “Goodbye”: Session.Display "Hello" & Chr$(rcCr) & Chr$(rcLF) & "Goodbye"
Methods Page 22
Programming with Reflection
DisplayFile method Syntax
object.DisplayFile Filename, [Options]
Description Displays the specified local file on the screen. If the ReadTabAsSpaces property is True and the rcNoTranslation option is not specified, tab characters in the file are converted to spaces as they are displayed on the screen. The SpacesPerTab property determines into how many spaces each tab is translated. If the ReadCtrlZAsEOF property is True and the rcNoTranslation option is not specified, a Ctrl+Z character in the file is interpreted as an end-of-file character; the display terminates at this point. Arguments Filename Argument Type: String Required Specifies the file to display. Supply complete path information. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. This method has only one option: rcNoTranslation Indicates that the file contains binary data, and should not be translated from the PC character set into the host character set as it is displayed on the screen. Use this option if the file contains characters that are already in the host character set.
Programming with Reflection
DropDTR method Syntax
object.DropDTR
Description Lowers the Data Terminal Ready (DTR) signal for two seconds, but does not disconnect or close the serial port; use the Disconnect method to disconnect from and close the port. This method is relevant for serial connections only.
Methods Page 23
Programming with Reflection
EditScript method Syntax
object.EditScript ScriptName
Description Opens a Reflection Basic script in the Reflection Basic Editor. If an unsaved script is already loaded in the Editor, Reflection prompts you to save it before loading the new script. Arguments ScriptName Argument type: String Required The name of script to edit. If you use an empty string (""), the Editor is launched but no script is loaded. Supply complete path information if the script isn’t on the Reflection Basic path. Programming with Reflection
EnableOnEvent method Syntax
object.EnableOnEvent OnEventNumber, EnableOrDisable
Description Enables or disables specified event commands. Arguments OnEventNumber Argument type: Integer or Enumeration Required Specifies the event number to enable or disable. Use rcAllEvents to enable or disable all defined events. EnableOrDisable
Argument type: Enumeration Required Determines whether the specified events are enabled or disabled: rcEnable Enables the specified event(s). rcDisable Disables the specified event(s).
Programming with Reflection
EvaluateRCLExpression method Syntax
Value = object.EvaluateRCLExpression(Expression, [Options])
Description Evaluates an RCL expression and returns the result of that evaluation. Arguments Expression Argument type: String Required An RCL expression to evaluate. Options
Methods Page 24
Argument Type: Enumeration Optional
Specifies additional, non-default behavior for the method. This method has only one option: rcNoTranslation Specifies that data should not be translated from the PC character set into the host character set. Return Value
Return type: String The returned value is the contents of an RCL variable (such as v1 or v2) or of an RCL string function (such as $SERIAL or $DATE).
Errors rcErrInvalidExpression
The Expression argument is not a valid RCL expression.
Example This example displays the date using the RCL $DATE command: MsgBox Session.EvaluateRCLExpression("$DATE") This statement uses the Date$ statement to get the same results: MsgBox Date$ Programming with Reflection
ExecuteBuiltInFunction method Syntax
object.ExecuteBuiltInFunction FunctionName
Description Executes one of Reflection’s built-in functions. Note: If your procedure exits Reflection after using the ExecuteBuiltInFunction method, Reflection will react as though a user-interface change has been made and prompt for a save of the settings file. To ensure that the exit is accomplished, include a SaveSettings method before the exit. If you’re using AUTOMATION to control Reflection, an alternative solution is to set the Visible property to False before exiting. Arguments FunctionName Argument type: String Required The name of a built-in functions. With built-in functions, you can execute a Reflection menu command (such as EditPaste, which is equivalent to clicking Paste on the Edit menu) or execute a host function (such as HpDeviceModes or VtSendAnswerBack). Errors rcErrInvalidBuiltInFunction
The FunctionName argument is unrecognized or invalid.
Example The following command opens the Save Settings dialog box: Session.ExecuteBuiltInFunction "FileSaveAs"
Methods Page 25
Programming with Reflection
ExecuteRCLCommand method Syntax
object.ExecuteRCLCommand(Command, [Options])
Description Executes an RCL command. If the RCL command fails, the RB error rcErrInvalidRCLCommand is generated. To get the RCL-specific error number, execute the following immediately: rclError = Session.EvaluateRCLExpression("ERROR-CODE") Arguments Command
Options
Argument type: String Required An RCL command to execute. The maximum length of this string is 160 characters. Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There is a single option for this method: rcNoTranslation Indicates that the Command string should not be translated from the PC character set into the host character set.
Example To execute multiple commands, separate them with carriage return/linefeed characters in the command string, using the Chr$ function. For example: Session.ExecuteRCLCommand("DISPLAY 'Hello^M^J" _ & Chr$(rcCR) & Chr$(rcLF) & "DISPLAY 'Goodbye'", _ rcReportErrors)
Programming with Reflection
FindText method Syntax
Found = object.FindText(SearchFor, StartRow, StartColumn, [Options])
Description Searches for a string in display memory. If the string is found, the row location where the string begins is returned to the FoundTextRow property, and the column location where the string begins is returned to the FoundTextColumn property. Spaces at the ends of display lines are not included when searching through the display. Each line in the display is returned with a carriage return/linefeed at the end. Arguments SearchFor Argument type: String Required Specifies the string to search for. The search is case sensitive. StartRow
Methods Page 26
Argument type: Integer Required Specifies the row in display memory where the search is to begin. The row is specified in host addressable coordinates.
To begin the search at the top of the display memory, use the value of the DisplayMemoryTopRow property for this parameter. To begin the search at the top of the current screen, use the value of the ScreenTopRow property. StartColumn
Argument type: Integer Required Specifies the column in display memory in which to start the search. The first column is column 0.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. This method has only one option: rcNoTranslation Indicates that the SearchFor string should not be translated from the PC character set into the host character set.
Return Found
Return type: Boolean True if the SearchFor string is found, or False if the string is not found.
Example This example finds the location of the "Main Level" string in the display memory: Sub FindMainLevel () With Session Dim found As Integer found = Session.FindText("Main Level", .DisplayMemoryTopRow, 0) If found Then MsgBox "String found at row " & .FoundTextRow & _ ", column " & .FoundTextColumn & "." Else MsgBox "String not found." End If End With End Sub
Programming with Reflection
FlashWindow method Syntax
object.FlashWindow Rate
Description Causes the Reflection icon on the taskbar and the title bar of the Reflection window to flash. Flashing stops when Reflection becomes the active window. Use this method to alert the user when a wait has been satisfied. For example, these lines could be used to minimize Reflection during a wait for incoming data from the host (such as e-mail notification), then flash the Reflection icon when the incoming data is received. With Session .WindowState = rcMinimized .WaitForIncomingData .FlashWindow End With
Methods Page 27
Arguments Rate
Argument Type: String Optional Specifies the flash rate using HH:MM:SS.hh format. When this argument is omitted, the flash rate defaults to the Windows cursor blink rate. The following example specifies a flash rate of half a second: Session.FlashWindow "0.5"
Programming with Reflection
FlushPrinter method Syntax
object.FlushPrinter
Description Flushes Reflection’s printer output buffers, sending any pending data to the printer and issuing a page eject command. This method only affects data sent to the printer when ClosePrinterManually is True. Only data from Reflection “print events” (such as logging or printing a copy of display memory) is affected. Data sent to the printer programmatically (for example, using the PrintScreen method) is not affected. Programming with Reflection
ForegroundColor method Syntax
MyForeground = object.ForegroundColor(Attribute)
Description Returns the foreground text color for a particular host attribute. For example, the following statements assign the current value for underlined text to the variable underlineText: Dim underlineText As Integer underlineText = Session.ForegroundColor(rcUnderlineAttribute) Arguments Attribute
Argument type: Enumeration Identifies the host attribute value (such as plain or underlined text). The values are: rcPlainAttribute rcBlinkAttribute rcInverseAttribute rcUnderlineAttribute rcBoldAttribute (for DEC hosts) rcHalfbrightAttribute (for HP hosts) rcFunctionKeys (for HP hosts) These values (except rcPlainAttribute and rcFunctionKeys) can be added together to return color values for combined attributes (such as Bold Inverse and Underline Blink). For example, the following expression returns the foreground color for text with the Inverse Blink attribute: .ForegroundColor(rcInverseAttribue+rcBlinkAttribute)
Methods Page 28
Returns MyForeground
Return type: Enumeration This method returns an integer value between 0 and 15. These values are equal to one of the following predefined constants. (Note: The numeric values of these constants are not related to the position a color occupies in the Color Setup dialog box. To avoid confusion, always refer to colors using the predefined constants.) rcWhite rcGrey rcRed rcBlue rcGreen rcYellow rcCyan rcMagenta rcBlack rcDkGrey rcDkRed rcDkBlue rcDkGreen rcDkYellow rcDkCyan rcDkMagenta
Programming with Reflection
FTPGetCurrentHostDirectory method Syntax
HostDirectory = object.FTPGetCurrentHostDirectory
Description Returns the current host directory used for FTP file transfers. This method is only valid when Reflection is connected to the host FTP server; use FTPStartServer to connect to the server before using this method. Return Value Return type: String The current host directory.
Programming with Reflection
FTPReceiveFile method Syntax
object.FTPReceiveFile LocalFile, RemoteFile, [TransferType], [IfFileExists], [Before], [Since], [Exclude]
Description Transfers one or more files from the host to the PC using FTP (file transfer protocol). Use FTPStartServer to connect to the host server before using this method. Use FTPStopServer to disconnect from the host server after file transfer is complete. Click the Example link below to see a sample macro that uses these methods.
Methods Page 29
Arguments LocalFile
Argument type: String Required Specifies a local file. This string can be empty or can contain just drive and path information, in which case the host file name is used to generate a local file name. This string cannot contain wildcard characters.
RemoteFile
Argument type: String Required Specifies a host file or files to be transferred. This string can contain wildcard characters (to transfer multiple files). The wildcard characters must be appropriate for the host system.
TransferType
Argument type: Enumeration Optional rcASCII Specifies ASCII file transfer. Reflection applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. rcBinary Specifies binary file transfer. Data in the file is not translated as it is transferred.
IfFileExists
Argument type: Enumeration Optional Specifies what to do if the file already exists on the host. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcUpdate Performs the transfer only if the host file is newer than the PC file. rcDelete Deletes (overwrites) the existing file. rcAppend Appends the contents of the host file to the existing PC file. rcRename Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on up to 999. rcSkip Skips the file (the transfer does not take place, but no error results).
Before
Methods Page 30
Argument Type: Date/Time Optional Specifies a date and time. Only host files created or modified before the specified date and time are transferred.
Since
Argument Type: Date/Time Optional Specifies a date and time. Only host files created or modified after the specified date and time are transferred.
Exclude
Argument Type: String Optional Specifies one or more files to be excluded from a wildcard transfer. The file names can include wildcards.
Programming with Reflection
FTPSendFile method Syntax
object.FTPSendFile LocalFile, RemoteFile, [TransferType], [IfFileExists], [Before], [Since], [Exclude]
Description Transfers one or more files from the PC to the host using FTP file transfer protocol. Use FTPStartServer to connect to the host server before using this method. Use FTPStopServer to disconnect from the host server after file transfer is complete. Click the Example link below to see an example. Arguments LocalFile Argument type: String Required Specifies a local file or files to be transferred. This string can contain drive and path information and can contain PC wildcard characters (to transfer multiple files). RemoteFile
Argument type: String Required Specifies a host file name. This string cannot contain wildcard characters. If this string is an empty string (""), each local file name transferred is used to generate a host file name.
TransferType
Argument type: Enumeration Optional rcASCII Specifies ASCII file transfer. If FTPTranslateCharacters is True, Reflection applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. rcBinary Specifies binary file transfer. Data in the file is not translated as it is transferred. rcAutoDetect File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
IfFileExists
Methods Page 31
Argument type: Enumeration Optional
Specifies what to do if the file already exists on the host. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcUpdate Performs the transfer only if the local file is newer than the host file. rcDelete Deletes (overwrites) the existing file. rcRename Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on, up to 999. rcSkip Skips the file (the transfer does not take place, but no error results). Before
Argument Type: Date/Time Optional Specifies a date and time. Only PC files created or modified before the specified date and time are transferred.
Since
Argument Type: Date/Time Optional Specifies a date and time. Only PC files created or modified after the specified date and time are transferred.
Exclude
Argument Type: String Optional Specifies one or more files to be excluded from a wildcard transfer. The file names can include wildcards.
Example This procedure starts the FTP file server, transfers files in both directions, and then disconnects from the server. As the procedure is written, Reflection will use previously set values for FTP User Name and Password if they are configured. If not, you will see the FTP Log In dialog box when you run the procedure. Or, you can edit the procedure to specify FTP User Name and Password programmatically. After transferring all *.txt files in the current folder to the host, the procedure transfers a specific file, “Sample.txt,” to the local computer. If this is not one of the files on the host, an error is returned. The error handler ensures that the FTP server is disconnected. Sub FTPExample() With Session On Error GoTo Handler 'To configure user name and password, 'remove comments from these lines and edit them 'to specify your user name and password. '.FTPUserName = "myUserName"
Methods Page 32
'.FTPPassword = "myPassword" 'Connect to the FTP server. .FTPStartServer 'Send all .txt files in the current folder to the host 'using binary format. Overwrite any existing files. .FTPSendFile "*.txt", "", rcBinary, rcDelete 'Receive a specific file from the host. Ask the user 'what to do if the file already exists on the PC. 'Note: An error is returned if Sample.txt is not on 'the host and the procedure goes to Handler:. .FTPReceiveFile "", "Sample.txt", rcbinary, rcAskUser 'Disconnect from the file server .FTPStopServer Exit Sub 'This error handler is not very helpful, but at least it 'ensures that the FTP server is disconnected if an error occurs. Handler: MsgBox "An FTP file transfer error occurred." .FTPStopServer Exit Sub End With End Sub Programming with Reflection
FTPSetCurrentHostDirectory method Syntax
object.FTPSetCurrentHostDirectory HostDirectory
Description Sets the current host directory used for FTP file transfers. This method is only valid when Reflection is connected to the host FTP server; use FTPStartServer to connect to the server before using this method. Arguments HostDirectory Argument type: String Required The host directory. Programming with Reflection
FTPStartServer method Syntax
object.FTPStartServer [UserName], [Password], [HostName], [Options]
Description Connects to a host server in preparation for FTP file transfers. Use FTPSendFile and FTPReceiveFile to transfer files. Use FTPStopServer to disconnect from the host FTP server. Most menu commands and all toolbar buttons are disabled when Reflection is in server mode.
Methods Page 33
Arguments UserName
Argument type: String Optional Specifies the user name. If this argument is omitted, Reflection uses the current FTP User Name (which can be set using the FTP tab of the File Transfer Setup dialog box, or using the FTPUserName property). If no FTP User Name has been set, Reflection displays the FTP Log In dialog box unless rcNoLoginDialog is specified in the Options argument. If rcNoLoginDialog is specified, FTPStartServer returns an error when UserName is omitted and no FTP User Name has been set. If rcAnonymous is specified in the Options argument, the UserName argument is ignored.
Password
Argument type: String Optional Specifies the FTP password. If this argument is omitted, Reflection uses the current FTP Password (which can be set using the FTP tab in the File Transfer Setup dialog box, or using the FTPPassword property). If no password has been set, Reflection displays the FTP Log In dialog box unless rcNoLoginDialog is specified in the Options argument. If rcNoLoginDialog is specified, FTPStartServer generates an error when Password is omitted and no password has been set.
HostName
Argument type: String Required Specifies the host name or IP address. If this argument is omitted, the current value of FTPHostName is used. If this argument is omitted and no FTP host name has been set, the current host is used.
Options
Argument type: Enumeration Optional Specifies additional, non-default behavior for the method. The possible values are: rcAnonymous Specifies that Reflection should use anonymous FTP when performing this transfer. rcNoLogInDialog Specifies that no FTP Log In dialog should appear if the FTP user name or password is not supplied. You can combine the two options adding these values. For example: .FTPStartServer , , , rcAnonymous+ rcNoLogInDialog
Programming with Reflection
FTPStopServer method Syntax
object.FTPStopServer
Description Disconnects from a host server connected by FTPStartServer.
Methods Page 34
Programming with Reflection
GetAnsiColorRGB method Syntax
ComponentValue = object.GetAnsiColorRGB(Color, WhichValue)
Description Returns values used for display colors when your terminal is set for ANSI emulation, that is when TerminalType is set to either rcANSIBBS or rcANSIUNIX. Each color is defined using different values for three basic color components—red, green, and blue. This method returns the current value for a specific component of a particular color. For example, the following expression returns the current value of the blue component for cyan: Session.GetAnsiColorRGB(rcAnsiCyan, rcBlue) Use SetAnsiColorRGB to change the current color configuration for any color in the palette. Arguments Color Argument type: Enumeration Required Identifies one of the palette colors. Only the first eight colors are available for ANSIBBS terminal emulation (TerminalType = rcANSIBBS). All 16 colors are available for SCO-ANSI terminal emulation (TerminalType = rcANSIUNIX). rcAnsiBlack rcAnsiBlue rcAnsiGreen rcAnsiCyan rcAnsiRed rcAnsiMagenta rcAnsiBrown rcAnsiWhite rcAnsiGrey rcAnsiLtBlue rcAnsiLtGreen rcAnsiLtCyan rcAnsiLtRed rcAnsiLtMagenta rcAnsiYellow rcAnsiLtWhite WhichValue
(SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI)
Argument type: Enumeration Required One of the three color components. The possible values are: rcRed rcGreen rcBlue
Return ComponentValue
Return type: Integer The value for the specified component. This can be any value between 0 and 255 in Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Note: This method is not available in Reflection for HP.
Methods Page 35
Programming with Reflection
GetClipboardText method Syntax
Text = object.GetClipboardText
Description Returns the text that is currently stored in the Windows Clipboard. Return Text Return type: String The current Clipboard text. An empty string is returned if the Clipboard is empty or if it contains something other than text (such as a bitmap). Use the SetClipboardText method to copy text to the Clipboard. Note: This method can return strings up to 32,767 characters long. Longer strings are truncated. Programming with Reflection
GetColorRGB method Syntax
ComponentValue = object.GetColorRGB(Color, WhichValue)
Description Reflection creates displays using a palette of 16 colors. (You can view these colors in the Colors tab of the Display Setup dialog box.) Each color is defined using different values for three basic color components— red, green, and blue. This method returns the current value for a specific component of a particular color. For example, the following expression returns the current value of the blue component for cyan: Session.GetColorRGB(rcCyan, rcBlue) Use SetColorRGB to change the current color configuration for any color in the palette. Arguments Color Argument type: Enumeration Required Identifies one of the colors of the palette. (Note: If adjustments to a color have been made using either the Display Setup dialog box or the SetColorRGB method, a constant, such as rcRed, may no longer identify a red color.) The possible values are: rcWhite rcGrey rcRed rcBlue rcGreen rcYellow rcCyan rcMagenta rcBlack rcDkGrey rcDkRed rcDkBlue rcDkGreen rcDkYellow rcDkCyan rcDkMagenta
Methods Page 36
WhichValue
Argument type: Enumeration Required One of the three color components. The possible values are: rcRed rcGreen rcBlue
Return ComponentValue
Return type: Integer The value for the specified component. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Programming with Reflection
GetCommandGroupProfile method Syntax
IsEnabled = object.GetCommandGroupProfile(CmdGroup)
Description Determines whether a given feature of Reflection or group of commands is enabled (executable) or disabled (not executable). Use the SetCommandGroupProfile method to enable or disable a feature or group of commands. Arguments CmdGroup Argument Type: Enumeration Required Identifies a feature or set of commands. The possible values are: rcSetup Setup commands (that is, all controls in Setup dialog boxes). rcFileTransfer File transfer operations and commands. (If file transfer operations were disabled using either rcFileTransferReceive or rcFileTransferSend as the CmdGroup argument in SetCommandGroupProfile, GetCommandGroupProfile returns rcPartiallyDisabled for rcFileTransfer.) rcFileTransferReceive File transfers to the local PC. rcFileTransferSend File transfers to the host. rcTracing Tracing operations and commands. rcHostDirectory Determines whether a host folder listing can be displayed in the File Transfer dialog box. rcSavePasswords Determines whether passwords are saved with your host connection or connect macro. This affects the LAT and NLAT connections, and passwords that are saved in macros.
Methods Page 37
rcMenus Menu commands. rcVB Affects access to all Visual Basic commands and Reflection Basic commands (host-initiated and locally-initiated). (Note: The value rcRB is equivalent.) rcHost Affects access to Reflection Basic or RCL commands executed from the host (but not commands executed locally). (Note: The values rcRCLHost and rcRBHost are equivalent.) rcVBLocal Affects access to any Visual Basic command and any Reflection Basic commands executed locally (but not from the host). (Note: The value rcRBLocal is equivalent.) rcOLEAutomation Commands that control Reflection through Automation. rcRCL RCL commands (both host-initiated and locally initiated). rcRCLLocal RCL commands executed locally (but not commands executed remotely from the host). Return IsEnabled
Return type: Enumeration This method returns one of the following: rcEnabled All commands in the group are enabled. rcDisabled All commands in the group are disabled. rcPartiallyEnabled Some commands in the group are enabled and some are disabled.
Example This procedure tests to find out if file transfer commands are enabled. A line continuation character (an underscore preceded by a space) is used to break a long line. Sub TransTest () Dim transferEnabled as Integer transferEnabled = Session.GetCommandGroupProfile(rcFileTransfer) If transferEnabled = rcDisabled Then MsgBox "File transfer is disabled. Contact your administrator " & _ "if you need to transfer files." End If End Sub
Methods Page 38
Programming with Reflection
GetCommandProfile method Syntax
IsEnabled = object.GetCommandProfile(CmdName)
Description Determines whether the specified built-in function is enabled (executable) or disabled (not executable). Use the SetCommandProfile method to enable or disable a built-in function. Arguments CmdName Argument Type: String Required The built-in function name. Return IsEnabled
Return Type: Enumeration A value indicating whether the given built-in function is enabled or disabled. It will be one of the following: rcEnabled The function is enabled. rcDisabled The function is disabled.
Example This example prompts for the name of a built-in function and then indicates whether it is enabled or disabled: Sub WhatIsDisabled () Dim quest As Integer, commandName As String commandName = Inputbox$("Enter the name of a built-in function") quest = Session.GetCommandProfile(commandName) If quest = rcEnabled Then MsgBox commandName & " is enabled." Else MsgBox commandName & " is disabled." End If End Sub
Programming with Reflection
GetFileType method Syntax
FileType = object.GetFileType(FileName)
Description Returns a value indicating the file type of a specified file. This method distinguishes file types associated with Reflection products. Other file types are identified as unknown. Arguments FileName Argument type: String Required Specifies the file name. Include complete path information if the file is not in the current folder.
Methods Page 39
Return FileType
Return type: Enumeration A value indicating the file type of the specified file. The possible values are: rcSettings A complete settings file for the current product. rcKeymap A keymap/mouse map-only settings file for the current product. rcToolbar A toolbar-only settings file for the current product. rcColors A color-only settings file for the current product. rcHotspots A hostspots-only settings file for the current product. rcConnection A connection-only settings file for the current product. rcMenuMap A menus-only settings file for the current product. rcRBSource A Reflection Basic script file. rcUnknown None of the above file types.
Example This example uses GetOpenFileName to allow the user to select a file. The dialog box caption says “Select a Reflection settings file,” but all files are listed. GetFileType is used to determine the file type of the selected file. If the file is identified as a Reflection settings file, a message displays the file name. If it is not, a message is displayed saying the file was not a settings file. Sub PickAFileAnyFile () Dim file As String Dim fileType As Integer With Session 'Have user select a file file = .GetOpenFilename(, , _ "Select a Reflection Settings File", "Select") 'Determine the file type fileType = .GetFileType(file) 'Perform different actions based on the file type If fileType = rcSettings Then MsgBox "You selected " & file Else MsgBox "That was not a settings file for this Reflection product" End If End With End Sub
Methods Page 40
Programming with Reflection
GetFolderName method Syntax
FolderName = object.GetFolderName([Title], [Text], [StartInFolder])
Description Opens a dialog box for selecting a folder, and returns the name of an existing folder selected by the user (without actually opening any files or changing the current folder). Arguments Title Argument type: String Optional Specifies the caption to appear in the dialog box title bar. If this argument is omitted, the title “Browse for Folder” is used. Text
Argument type: String Optional Specifies descriptive text to appear in the dialog box. If this argument is omitted the text “Currently selected folder:” is used.
StartInFolder
Argument type: String Optional Specifies the folder which will be selected by default in the dialog box. If this argument is omitted, the Reflection current folder is selected. If the value of this argument does not correspond to an actual folder, the dialog box will match the specified path as closely as possible. For example, if you specify “C:\Folder\Subfolder” and \Subfolder does not exist, the dialog box selects C:\Folder as the starting folder. If \Folder does not exist, the dialog box starts in C:\.
Return FolderName
Return type: String The folder name (including drive and path information) the user selects, or an empty string if the user selects Cancel. If the user selects the root folder of a drive, the return value will include a "\" character (for example "C:\"). If the user selects a subfolder, the return value will not include a "\" character (for example "C:\Program Files"). If you are using this method in a procedure, you will need to append this character as needed. If the user browses to a network drive somewhere in Network Neighborhood, the return string is a UNC-format path name. If the network drive is mapped to a drive letter on the PC, the drive letter is used.
Example This example opens a dialog box using the default title “Browse for Folder.” The Text argument is used to have the text “Use this folder :” appear in the dialog box. The StartInFolder argument is omitted, so the dialog box opens in the current default folder. For this example, the returned value is displayed in a message box. Sub BrowseForFolder () Dim folder As String With Session folder = .GetFolderName(, "Use this folder :") MsgBox "User selected " & folder End With End Sub
Methods Page 41
Programming with Reflection
GetKeymapCommandArgs method Syntax
CommandArguments = object.GetKeymapCommandArgs(Modifiers, Keys)
Description Returns macro data to be passed to a macro (or script arguments to be passed to a Reflection Basic script) that has been mapped to a particular keystroke. Use the SetKeyMap method to map keystrokes and to specify information to be passed to a macro or script. Arguments Modifiers Argument Type: Enumeration Required A keystroke consists of a primary key and one or more optional modifier keysAlt, Ctrl, and Shift. The possible modifier keys are: rcNormalKey rcAltKey rcCtrlKey rcShiftKey To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey. Key
Argument Type: String Required String representing a PC key, such as "K", "F1", or "NumLock".
Return CommandArguments Return type: String The macro data to be passed to a macro (or arguments to be passed to the Reflection Basic script) that is mapped to the specified keystroke. This method returns an empty string for keystrokes mapped to something other than a macro or script, and for keystrokes mapped to macros or scripts with no information passed to them. Programming with Reflection
GetKeyMapCommands method Syntax
Action = object.GetKeyMapCommands(Modifiers, Key)
Description Returns the action assigned to a particular keystroke. Arguments Modifiers Argument Type: Enumeration Required A keystroke consists of a primary key and one or more optional modifier keysAlt, Ctrl, and Shift. The possible modifier keys are: rcNormalKey rcAltKey rcCtrlKey rcShiftKey
Methods Page 42
To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey. Key
Return Action
Argument Type: String Required String representing a PC key, such as "K", "F1", or "NumLock". Return type: String The text of the command associated with the mapped keystroke. This can be a builtin function, a string to transmit, a Visual Basic statement, a Reflection macro, a Reflection Basic script, an RCL command, or an RCL script. Use GetKeyMapCommandType to determine what kind of command is returned.
Example This procedure maps a keystroke, then returns information about the mapping: Sub KeyMapDemo () Dim returnValue1 As String Dim returnValue2 As Integer With Session .SetKeyMap rcCtrlKey, "d" , rcTransmitString, "dir" & Chr$(rcLF) & Chr$(rcCR)" returnValue1 = .GetKeyMapCommands(rcCtrlKey, "d") returnValue2 = .GetKeyMapCommandType(rcCtrlKey, "d") MsgBox "returnValue1 = " & returnValue1 Select Case returnValue2 Case rcNotMapped MsgBox "The keystroke is not mapped." Case rcVBCommand MsgBox "The keystroke is mapped to a VB command." Case rcVBMacro MsgBox "The keystroke is mapped to a VB macro." Case rcBuiltInFunction MsgBox "The keystroke is mapped to a built-in function." Case rcTransmitString MsgBox "The keystroke is mapped to a transmit string." Case other MsgBox "The keystroke is mapped to an undetermined command type." End Select End With End Sub
Programming with Reflection
GetKeyMapCommandType method Syntax
ActionType = object.GetKeyMapCommandType(Modifiers, Key)
Description Returns the type of command associated with the specified keystroke. Arguments Modifiers Argument Type: Enumeration Required
Methods Page 43
A keystroke consists of a primary key and one or more optional modifier keysAlt, Ctrl, and Shift. The possible modifier keys are: rcNormalKey rcAltKey rcCtrlKey rcShiftKey To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey. Key
Argument Type: String Required A string representation of a PC key, such as "K", "F1", or "NumLock".
Return ActionType
Return type: Enumeration A number that indicates the type of action associated with the mapped keystroke. This will be one of the following. See SetKeyMap for details. rcNotMapped rcBuiltInFunction rcTransmitString rcVBCommand rcVBMacro rcRBCommand rcRBScript rcRCLCommand
Programming with Reflection
GetLoginProperty method Syntax
Value = object.GetLoginProperty(Property, [Prompt], [HostUserName], [HostName], [Options])
Description If Reflection Admit One is installed and the AdmitOne property is True, this method finds the specified property in the Admit One database and returns its value. If the property is not found, a dialog box prompts for it and CommitLoginProperties offers to add it. If Admit One is not installed, GetLoginProperty opens a dialog box that prompts for the information and returns the value entered. If AdmitOne property is False, properties created by GetLoginProperty are saved in the Window's registry by CommitLoginProperties (unless the Options argument to that method is set to rcChangesNever). You can view and edit these properties by opening Reflection’s View Settings dialog box and searching for “Login Property”. Passwords are never stored in the registry. Arguments Property Argument type: String Required The name of the property to be looked up (for example “UserName”).
Methods Page 44
Prompt
Argument type: String Optional Specifies the prompt text for the dialog box. If this argument is omitted, a default prompt is displayed using the property name.
HostUserName
Argument type: String Optional Specifies a host user name.
HostName
Argument type: String Optional Specifies a host name. If this argument is omitted, GetLoginProperty uses the hostname from the current connection information.
Options
Argument type: Enumeration Optional Determines whether the returned string is encoded. rcIsPassword This option is required if the property name contains “password”. To transmit an encoded password use the Transmit method with the rcDecodePassword option. When this value is used, the value is not echoed when entered, and is returned in an encoded form, so the rcDecodePassord option must be used when it is transmitted to the host.
Return Value
Return type: String The property returned from either the Single Sign On database, or the dialog box. If rcIsPassword is used, the value is returned in an encoded form. To transmit an encoded password to the host, use the Transmit method with the rcDecodePassword option. An empty string indicates a null property or the user selecting cancel in the dialog box.
Programming with Reflection
GetOpenFilename method Syntax
Filename = object.GetOpenFilename([FileFilter], [FilterIndex], [Title], [ButtonText])
Description Opens a standard Windows dialog box for opening a file and gets the name of an existing file from the user (without actually opening any files). Arguments FileFilter Argument Type: String Optional Specifies one or more file filtering criteria. These are used to fill a Files of type list box in the dialog box, and allow the user to select from different types of files to open. A file filtering criterion has two parts, separated by a comma: A description, such as “Text Files (.txt)” or “Setting Files (*.r2w)”, and a DOS wildcard file filter
Methods Page 45
specification corresponding to that type of file, such as "*.txt" or "*.r2w". You can specify a single file filtering criterion: "Text Files (*.txt),*.txt" Or, multiple file filtering criteria, also separated by commas: "Text Files (*.txt),*.txt,Bitmaps (*.bmp),*.bmp" If this argument is omitted, the default is "All Files (*.*),*.*". FilterIndex
Argument Type: Integer Optional Identifies the default FileFilterthat is, what type of files are listed in the Files of type list box when the dialog box is first opened. Use 1 to specify the first FileFilter, 2 to specify the second FileFilter, and so on.
Title
Argument Type: String Optional Specifies a title for the dialog box. If this argument is omitted, the title is “Open”.
ButtonText
Argument Type: String Optional Specifies the text for the default button in the dialog box. If this argument is omitted, the button text is “Open”.
Return Filename
Return type: String The file name (including drive and path information) the user selects, or an empty string if the user selects Cancel. If you are using this value to create a host file, remember to strip off the drive and path information. Also, you may want to check the case of the file name returned (uppercase or lowercase) and modify it as needed for a host file name.
Example This example creates a dialog box that prompts the user for a settings file. The user can also use the List Files of type list box in the dialog box to display bitmap files or text files. Sub OpenSesame () Dim sesame As String sesame = Session.GetOpenFilename("Settings Files (*.R1W)," & _ "*.R1W,Bitmaps (*.bmp),*.bmp,Text Files (*.txt),*.txt", 1) MsgBox sesame End Sub
Programming with Reflection
GetPassword method Syntax
EncodedPassword = object.GetPassword([Prompt], [HostUserName], [HostName], [Options])
Description If Reflection Admit One is installed, and the AdmitOne property is True, this method returns the password from the Admit One database. If a password is not found in the database, a dialog box prompts for it and CommitLoginProperties offers to add it. If Admit One is not installed, or AdmitOne property is False, GetPassword opens a dialog box that prompts for the password. The value entered in this dialog box is returned.
Methods Page 46
Arguments Prompt
Argument type: String Optional Specifies the prompt text for the dialog box. If this argument is omitted, the default value is “Password for on ” when HostUserName is specified or is in the Admit One database. The default is “Password for :” if no HostUserName is specified. The default is “Password:” if no host is configured.
HostUserName
Argument type: String Optional Specifies a host user name.
HostName
Argument type: String Optional Specifies a host name If this argument is omitted, GetPassword uses the host name from the current connection information.
Options
Optional Omit this argument; it is not currently used.
Return EncodedPassword
Return type: String The password returned from either the Admit One data base, or the dialog box. The password is returned in an encoded form. To transmit an encoded password to the host, use the Transmit method with the rcDecodePassword option. An null string indicates a null password, a missing password, or the user selecting cancel in a dialog box.
Programming with Reflection
GetPropertyInformation method Syntax
PropertyInfo = object.GetPropertyInformation(Name, [Options])
Description Intended primarily for WRQ internal use. It returns information about a specified Reflection property. Name Argument Type: Variant Required Use a string value, such as "ConnectionType," to identify a specific property name. Use an integer value to identify a property or series of properties by number. Information about all properties can be obtained by using integer values for Name in a loop, incrementing the Name value each time until the returned value is an empty string. Note: Do not use integer values in macros if you intend to use these macros with future versions of Reflection. The returned string resulting from passing an integer value may be different in upcoming versions. Options
Methods Page 47
Argument Type: String Optional This argument is not currently used.
Return PropertyInfo
Return type: String A string containing information about the specified property. Note: Exercise caution when using this method, because the exact format of the output string may change in future versions of Reflection.
Programming with Reflection
GetSaveAsFilename method Syntax
Filename = object.GetSaveAsFilename([InitialFilename], [FileFilter], [FilterIndex], [Title], [ButtonText])
Description Opens the standard Save As dialog box and gets a file name from the user without actually saving any files. Arguments InitialFilename Argument Type: String Optional Specifies a suggested file name. If this argument is omitted, no default file name is suggested. FileFilter
Argument Type: String Optional Specifies one or more file filtering criteria. These are used to fill a Files of type list box in the dialog box, and allow the user to select from different types of files to save. A file filtering criterion has two parts, separated by a comma: A description, such as "Text Files (.txt)" or "Setting Files (*.r4w)", and an MS-DOS wildcard file filter specification corresponding to that type of file, such as "*.txt" or "*.r4w". You can specify a single file filtering criterion: "Text Files (*.txt),*.txt" Or, multiple file filtering criteria, separated by commas: "Text Files (*.txt),*.txt, Bitmaps (*.bmp),*.bmp" If this argument is omitted, the default value is "All Files (*.*),*.*".
FilterIndex
Argument Type: Integer Optional Identifies the default FileFilterthat is, what type of file is listed in the Files of type box when the dialog box is first opened. Use 1 to specify the first FileFilter, 2 to specify the second FileFilter, and so on.
Title
Argument Type: String Optional Specifies a title for the dialog box. If this argument is omitted, the title is “Save As”.
ButtonText
Argument Type: String Optional Specifies the text for the default button in the dialog box. If this argument is omitted, the text is either “Save” (in Windows 95 or in Windows NT with the Windows 95 shell) or “OK” (in Windows 3.1 or Windows NT with the Windows 3.1 shell).
Methods Page 48
Return Filename
Return Type: String The file name (including drive and path information) the user selects, or an empty string if the user clicks Cancel.
Example The example for the GetOpenFilename method could easily be modified for use with GetSaveAsFilename. Programming with Reflection
GetSerialStatistics method Syntax
Statistic = object.GetSerialStatistics(WhichStatistic)
Description Returns a statistic for a serial connection. If the connection is not a serial connection, or if there is no connection, GetSerialStatistics returns -1. Statistics are maintained from the time a connection is established, from when the terminal session is reset (with the ResetTerminal method), or from when the Reset button is clicked in the Serial Connection Statistics dialog box. Arguments WhichStatistic Argument Type: Enumeration Required Specifies which statistic to return. The possible values are: rcReceiverOverruns Each time the host computer transmits a character, the datacomm hardware notifies the processor, saying, in effect, “I just received a character.” Reflection must read that character before another one is received; if it doesn’t, a receiver overrun error occurs. rcParityErrors Returns the number of parity errors that have occurred. rcFramingErrors Framing errors often indicate that the baud rate is incorrect, that the cable is bad or too long, or that the UART received a character with the wrong number of stop bits. rcReceiveBufferOverflow Reflection has a buffer where characters received from the host computer are held until they can be processed. If Reflection can’t keep up with the incoming data, the buffer fills up and an overflow occurs. rcBreakDetect A break is an interruption in the transmitting signal. Whenever the UART detects a break (a 200 millisecond signal), it increments this statistic. Return Statistic
Methods Page 49
Return type: Integer The requested statistic if the ConnectionType is a serial connection, or -1 if it is not.
Programming with Reflection
GetText method Syntax
Text = object.GetText(StartRow, StartColumn, EndRow, EndColumn, [Options])
Description Returns a string corresponding to a selection from the terminal window. Arguments StartRow Argument Type: Integer Required Specifies the row in display memory where the string is to begin. Use host addressable coordinates. To begin the search at the top of the display memory, use the value of the DisplayMemoryTopRow property for this parameter. To begin the search at the top of the current screen, use the value of the ScreenTopRow property. StartColumn
Argument Type: Integer Required Specifies the column in display memory where the string is to begin. The first column is column 0.
EndRow
Argument Type: Integer Required Specifies the row in display memory where the string is to end. You can use the DisplayRows property to specify the number of rows in the current display screen.
EndColumn
Argument Type: Integer Required Specifies the column in display memory where the string is to end. You can use the DisplayColumns property to specify the number of columns in the current display screen.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcRectRegion This option indicates that the text returned should be a “rectangular” region; for example: The bold text in this sentence will be returned if rcRectRegion is specified. The default is to return a wrapped region; for example: The bold text in this sentence will be returned if rcRectRegion is not specified. rcNoTranslation Indicates that the returned string should not be translated from the host character set into the PC character set. To combine the two options, use the addition operator (+): rcRectRegion + rcNoTranslation.
Methods Page 50
Return Text
Return type: String The requested text. Spaces at the end of lines are removed. All lines except the last line end with a carriage return/linefeed.
Example This example returns and displays the contents of the current display screen. Sub GetScreenDisplay () With Session Dim Text as string Dim TopRow, LastRow, LastColumn As Integer TopRow = .ScreenTopRow LastRow = TopRow + .DisplayRows LastColumn = .DisplayColumns Text = .GetText(TopRow, 0, LastRow, LastColumn) Msgbox Text End With End Sub Programming with Reflection
Hangup method Syntax
object.Hangup
Description Valid only if Reflection is set to use the old modem dialer (UseModemDialerV5 = True). Hangs up the modem by sending the Hayes “+++” command to get the modem’s attention, followed by the “ATH” hangup command. This method does not guarantee that the modem is actually hung up, and no error is returned if the method fails for any reason. After the modem is hung up, the port remains open; use the Disconnect method to close the port. Arguments None Programming with Reflection
Help method Syntax
object.Help [HelpTopic], [HelpFile]
Description Displays help for the specified help topic. For example, this statement displays this topic: Session.Help "Help method", "Rwinprog.hlp" Arguments HelpTopic
Methods Page 51
Argument Type: String Optional Specifies the index entry of the help topic to display. If this argument is omitted, or the specified entry is not found, the Help Topics window is displayed.
HelpFile
Argument Type: String Optional Specifies the name of the help file to use. If omitted, the Reflection help file (R1win.hlp, R2win.hlp, or R4win.hlp) is used. Reflection help files are installed by default to C:\Program Files\Reflection\Help. These files are registered, so Windows can locate them even if you do not include complete path information. The topic you are looking at now is in Rwinprog.hlp. Descriptive programming information is in Vbrwin.hlp.
Example This example shows how to display help on the WaitForStrings method: Session.Help "WaitForStrings", "RBASIC.HLP"
Programming with Reflection
Host File Attributes and Switches When sending a file to the host, you can use an optional argument to the WRQSendFile method to specify which attributes the file should receive on the host system. If you omit this argument, the file receives default host attributes. You can specify attributes for VMS, HP 3000, or UNIX hosts. In addition, when receiving a file from the host, you can receive the file with its host attributes, specify whether Fortran and Print carriage control characters should be translated, and whether to force block reads. The properties that control these options are WRQTransferWithAttributes, WRQTranslateCCtl, and WRQUseBlockReads. There are also a number of settings you can use to modify the way a file is handled when it is sent or received. These settings are available both as properties and as “switches.” The properties all begin with the letters “WRQ” and remain in effect for all transfers that use the WRQ/Reflection protocol until you change the property or until you exit Reflection without saving your settings. The switches are temporary and are in effect only for the current transfer; to use the switch form of a setting, append the switch you want to the host file’s name in the WRQSendFile or WRQReceiveFile method. There are both VMS switches and HP 3000 switches available. Most host file attributes and switches also have equivalent check boxes in the File Transfer Setup dialog box. Host Attribute Examples The following example shows the WRQSendFile syntax for sending a file to a VMS host, setting the host record size of the file to 256 bytes: Session.WRQSendFile "docfile.txt", "docfile.txt",,,,,,"/size=(256)" The next example shows the WRQSendFile syntax for sending a file to an HP 3000 host, creating a temporary file on the host with 256-byte records: Session.WRQSendFile "docfile.txt", "docfile",,,,,,"temp;recsize=256" The next example shows the WRQSendFile syntax for sending a file to a UNIX host, specifying the user “joant” as the owner of the file: Session.WRQSendFile "docfile.txt", "docfile.txt",,,,,,"-o joant" The multiple commas in the above examples are placeholders for arguments of the WRQSendFile method that are not specified. File Name Switch Examples The following example shows the WRQSendFile syntax for sending a file to a VMS host, submitting the file to the print queue after the transfer is complete:
Methods Page 52
Session.WRQSendFile "docfile.txt", "docfile.txt/S" The next example shows the WRQSendFile syntax for sending a file to an HP 3000 host in Qedit format: Session.WRQSendFile "docfile.txt", "docfile;Q"
Programming with Reflection
HP 3000 Host File Attributes The following table shows the valid HP 3000 host file attributes you can specify in the Attributes argument to the WRQSendFile method. The Attributes argument takes a string value, and therefore must be enclosed in quotation marks. Multiple attributes are separated by a semicolon. Sending HP 3000 attributes is an alternative to explicitly creating file equations for a new file on the host prior to the actual transfer. Attribute Meaning\Syntax Example RECSIZE=n Number of bytes in record is n "RECSIZE=" BLOCKFACTOR=n Blocking factor is n "BLOCKFACTOR=" CODE=n File code is n "CODE=" EXTENTS=n File extent is n "EXTENTS=" ULABELS=n Number of user labels is n "ULABELS=" FILESIZE=n File size (in records) is n "FILESIZE=" ASCII ASCII file "ASCII" CCTL Carriage control "CCTL" TEMP Temporary file "TEMP" MSG Message file "MSG" CIR Circular file "CIR" RIO Relative I/O file "RIO" FORMAT=[F|V|U|S] Record format (Fixed, Variable, Undefined, or Stream) "FORMAT=F"
Methods Page 53
Example A possible WRQSendFile command for transferring a file to an HP 3000 host with attributes is: Session.WRQSendFile "FILE.TXT", "MYFILE", rcLabels,_ ,,,,"TEMP;RECSIZE=256" This creates a temporary binary file on the host, with 256-byte records. Programming with Reflection
HP 3000 File Name Switches The following table shows the valid HP 3000 file name switches you can append to the host name when using the WRQSendFile or WRQReceiveFile method. Most switches are valid for only one direction of transfereither sending or receivingalthough some switches are valid in both directions. Most switches also have an equivalent property you can set to cause the same effect; using a switch affects only the current transfer, whereas using the property affects all subsequent transfers until its value is changed. Switch Equivalent Property Meaning Direction ;F none Used fixed record format. Send ;L WRQTransferWithAttributes Transfer file as Labels. Both (when used with binary transfers) ;O WRQSendSpooled Send file to spooled device. Send ;P none Purge an existing host file before Send creating the new file. ;Q WRQQEditFormat Send file in Qedit format. Send Example The following example shows a possible WRQSendFile command for transferring a file to an HP 3000 host, submitting it to the spool device: Session.WRQSendFile "FILE.TXT", "MYFILE;O"
Programming with Reflection
InputBox method Syntax
Result = object.InputBox(Prompt, [Title], [Default])
Description Opens a dialog box containing a prompt and a text box for user input, and returns the contents of the text box after the user clicks OK. Arguments Prompt Argument Type: String Required A string expression containing the text to be shown in the dialog box. The maximum length of this argument ranges from about 160 to 255 characters, depending on the characters in the prompt. Prompts longer than one line automatically break at the nearest space and wrap to the next line. Title
Methods Page 54
Argument Type: String Optional
Specifies the caption that appears in the dialog box’s title bar. The default value is the name of the Reflection product (“Reflection for HP”, “Reflection for UNIX”, or “Reflection for ReGIS Graphics”). Default
Argument Type: String Optional A string expression that appears in the text box as the default response. The default is an empty string ("").
Return Result
Return type: String If the user presses Enter or clicks the OK button, Result contains the text in the input box. If the user clicks Cancel, Result contains an empty string.
Example Use a variable to capture what the user types in the input box. For example: Dim userLogin As String userLogin = Session.InputBox("Please Enter Your Login Name","Login")
Programming with Reflection
KermitReceiveFile method Syntax
object.KermitReceiveFile LocalFile, RemoteFile, [TransferType], [IfFileExists]
Description Transfers one or more files from a remote computer running a Kermit program to the local computer, using the Kermit file transfer protocol. Arguments LocalFile Argument Type: String Required Specifies a local file. This string can contain drive and path information. It can also be just a folder name, in which case the remote file name is used to generate a local file name. This string cannot contain wildcard characters. If this string is empty (""), the remote file name is used to generate a local file name. RemoteFile
Argument Type: String Required Specifies a file on the remote system. This string can contain wildcard characters. If this string is empty (""), the file name must be specified by the remote Kermit program.
TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. If this argument is omitted, the default is rcBinary. The rcBinary option is generally appropriate for most transfers, including transfers from bulletin boards. Use rcASCII when you’re sure you want characters translated. The possible values are: rcASCII Specifies an ASCII file transfer. If the KermitTranslateCharacters property is set to True, the, the following translations are performed:
Methods Page 55
•
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If KermitTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl+Z character may still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary Specifies a binary file transfer. Data in the file is not translated as it is transferred. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the received file already exists on the PC. If this argument is omitted and the local file exists, the transfer fails (equivalent to rcCancel). The possible values are: rcAskUser Prompts the user to specify what to do. rcCancel Stops the transfer. rcDelete Deletes (overwrites) the existing file. rcAppend Appends the data to the existing file. rcRename Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on, up to 999.
Programming with Reflection
KermitSendFile method Syntax
object.KermitSendFile LocalFile, RemoteFile, [TransferType]
Description Transfers a file from the local computer to the remote system using the Kermit file transfer protocol. There is no IfFileExists option for this method because that aspect of the transfer is controlled by the remote system. Arguments LocalFile Argument Type: String Required Specifies a local file. This string can contain wildcard characters. RemoteFile
Methods Page 56
Argument Type: String Required
Specifies a file on the remote system. This string cannot contain wildcard characters. If this string is empty, the local file name is used to generate a remote file name. TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcBinary. The rcBinary option is generally appropriate for most transfers, including transfers to bulletin boards. Use rcASCII when you’re sure you want characters translated. The possible values are: rcASCII Specifies an ASCII file transfer. If the KermitTranslateCharacters property is set to True, the following translations are performed: •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If KermitTranslateCharacters is set to False, carriage return/linefeed sequences may still be translated to record separator characters (if the ConvertEOLToSeparator property is set to True), and a Ctrl+Z character may still be read as an end-of-file indicator (if the ReadCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary Specifies a binary file transfer. Data in the file is not translated as it is transferred. rcAutoDetect File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Programming with Reflection
KermitStartServer method Syntax
object.KermitStartServer
Description Starts a remote Kermit program in server mode. The command used to start the server is defined by the KermitServerStartupCommand property. If that command fails to start the remote Kermit program, this method will still set the local flag indicating that the remote program is in server mode.
Methods Page 57
Programming with Reflection
KermitStopServer method Syntax
object.KermitStopServer [Logoff]
Description Instructs a remote Kermit program running in server mode to shut down. Arguments Logoff Argument Type: Enumeration Optional Specifies whether this method logs off from the remote computer, in addition to shutting down the server Kermit program. The values are: rcNoLogoff KermitStopServer does not log off the remote server when shutting down the server Kermit program. This is the default action if no Logoff argument is included. rcLogoff KermitStopServer does log off the remote server when shutting down the server Kermit program. Programming with Reflection
LockProfile method Syntax
object.LockProfile AllowUnlock, [Password]
Description Locks the current command profile, disallowing calls to SetCommandProfile and SetCommandGroupProfile. Arguments AllowUnlock Argument Type: Boolean Required Specifies whether a subsequent call to UnlockProfile is allowed. If True, the second argument (Password) is required. If False, the second argument is ignored. Password
Argument Type: String Optional Specifies a password. Must be supplied if AllowUnlock is True. The same password must be used in subsequent calls to UnlockProfile.
Example This example disables file transfer commands, locks the profile with a password, and then saves the settings file so that the lock remains in effect when Reflection is restarted. The only way to cancel the lock is with the UnlockProfile method. Sub DisableFileTransfer () Session.SetCommandGroupProfile rcFileTransfer, rcDisabled Session.LockProfile True, "salami" Session.SaveSettings "Settings.r1w" End Sub
Methods Page 58
Programming with Reflection
MsgBox method Syntax
Result = object.MsgBox(Message, [Type], [Caption])
Description Displays a message in a dialog box. Once the user has selected a command button in the dialog box, this method returns an integer indicating which button was selected. This method works much like the MsgBox function, but is more versatile because it can be used to return a button number to other programming environments that communicate with Reflection. Arguments Message Argument Type: String Required A string expression containing the message to be shown in the dialog box. The maximum length of prompt ranges from about 160 to 255 characters, depending on the widths of the characters used. Prompts longer than one line automatically break at the nearest space and wrap to the next line. Type
Argument Type: Integer Optional Specifies which icons and buttons are displayed in the dialog box. Select a value from each of three groups—the Button group, the Icons group, and the Default group, as shown in the following table. Then add the selected value from each group to compute the Type value. Value Group 1 − Buttons 0 1 2 3 4 5 Group 2 − Icons 16 32 48 64 Group 3 − Default 0 256 512
Description OK only OK, Cancel Abort, Retry, Ignore Yes, No, Cancel Yes, No Retry, Cancel Critical Message (STOP) Warning Query (?) Warning Message (!) Information Message (i) First button Second button Third button
For example, to specify that the message box should have three buttons—Yes, No, and Cancel—select the appropriate value for that set of buttons (3). To specify that the Information icon should appear in the message box use the appropriate Icon value (64). Finally, to select the Yes button as the default button, use the appropriate Default value (0). Then add all three values to compute the Type value (67).
Methods Page 59
If the Type argument is omitted, the message box displays a single OK button. Caption
Argument Type: String Optional Specifies the caption that appears in the dialog box’s title bar. The default value is the name of the Reflection product (“Reflection for HP”, “Reflection for UNIX”, or “Reflection for ReGIS Graphics”).
Return Result
Return type: Integer The number returned indicates which button the user clicks in the message box: Value 1 2 3 4 5 6 7
User Clicks OK Cancel Abort Retry Ignore Yes No
Programming with Reflection
NewSession method Syntax
object.NewSession [SessionType], [SettingsFile]
Description Opens a new Reflection window (session). For example, this command opens a new Reflection for HP session using the specified settings file: Session.NewSession rcReflection1, "C:\Mypath\Myfile.r1w" If you want to be able to control the new session from a macro or using Automation , use CreateObject instead of NewSession. Arguments SessionType Argument Type: Enumeration Optional Specifies what type of session to create. If omitted, the new session is the same type as the current session. Only session types corresponding to Reflection products available on your PC or file server can be used. The possible values are: rcConnectionWizard Start the Connection Wizard. rcReflection1 Create a new instance of Reflection for HP. rcReflection2 Create a new instance of Reflection for UNIX and Digital (VT emulation). rcReflection4 Create a new instance of Reflection for ReGIS Graphics (VT graphics emulation).
Methods Page 60
rcReflectionIBM Create a new instance of Reflection for IBM. rcReflectionX Create a new instance of Reflection X. rcFTPClient Create a new instance of the Reflection FTP client application (supplied with all of the Reflection connectivity products listed above). SettingsFile
Argument Type: String Optional Specifies a settings file to be opened into the new window. If this argument is omitted, or if it’s an empty string (""), a new Untitled session is created.
Programming with Reflection
OnEvent method Syntax
object.OnEvent EvNumber, Event, CommandType, Commands, Enable, AfterEvent, [String], [Row], [Column], [Key], [CommandArguments]
Description Defines commands to be executed when a specified event occurs during a Reflection session. Events defined with this command are equivalent to events added using Reflection’s Event Setup dialog box. Arguments EvNumber Argument type: Integer or Enumeration Required An index number that determines the location of this event on the list of defined events. Use 1 to add a new event to the top of the list. Use rcNextEvent to add the event to the end of the list. The EventDefined property returns the number of the most recently defined event. Note: If two or more items on the list of defined events are triggered by the same event, Reflection executes the commands in the order that the events appear in the list, starting with the event closest to the top of the list. Event
Argument type: Enumeration Required Identifies the event which will trigger the commands specified the Commands argument. The possible values are: rcSilence Defines an event as the absence of activity (data from the host) for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format. rcKbdEnabled Defines an event as the keyboard being unlocked for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format.
Methods Page 61
rcEvConnected A connection has been made to a host. If a connect macro is configured, this event will occur after the connect macro has executed. rcEvDisconnected Defines an event as a host connection becoming disconnected. If a disconnect macro is configured, this event will occur after the disconnect macro has executed. rcEnterPos Defines an event as the positioning of the cursor at the specified screen coordinates. Use the Row and Column arguments to specify coordinates. For the event to occur, the cursor must be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time. rcExitPos Defines an event as the positioning of the cursor at any location on the screen other than specified coordinates. Use the Row and Column arguments to specify coordinates. For the event to occur, the cursor must have previously been at the specified coordinates, and now must not be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time. rcCommString Defines an event as the reception of the specified string from the host. Use the String argument to specify the string. rcDisplayString Defines an event as the specified string appearing at the specified coordinates in the terminal window. Use the String argument to specify the string. Use Row and Column to specify coordinates. To specify any row or column, use rcAnyRow and/or rcAnyCol for Row and Column. rcTimeOfDay Defines an event as the current time matching the specified clock time. Use the String argument to specify the time of day in HH:MM:SS.hh format using a 24-hour clock (00:00:00-23:59:59) or express time as an Automation Date/Time value. rcTime Defines an event as the passage of the specified amount of time from when the event is defined. Use the String argument to specify the interval of time in HH:MM:SS.hh format. rcTerminalKeystroke Defines an event as the transmission of the specified terminal key to the host. The Key argument defines the host function. rcReflectionStart This event occurs when you start Reflection. For this event to occur, you must save your settings file and use this settings file to start Reflection.
Methods Page 62
rcReflectionExit This event occurs when you exit Reflection. This event occurs no matter how Reflection is shut down. If Reflection is configured to Exit on Disconnect, this event occurs after this disconnect, and before Reflection goes away. If an On Exit command has been configured via RCL, this event will occur before the RCL command is executed. Any of the available methods, such as File, Exit, Quit, System Menu, will cause this event to occur. Note: You can define an action for this event using CancelExitEvent if you want to be able to cancel the exit. rcLoadSettingsFile This event occurs when you open a settings file. For this event to occur, the event must be configured, then saved to a settings file. When you open this settings file, the event occurs after the settings have been loaded but before the connection is made (if the settings file is configured to make a connection). Use the String argument to specify the name and path of the file. rcBlockModeEnter The terminal has entered block mode. rcBlockModeExit The terminal has exited block mode. rcFileTransferDone A file transfer has successfully completed. CommandType
Argument type: Enumeration Required Specifies what sort of command to attach to the event. The possible values are: rcBuiltInFunction Maps the event to one or more built-in functions. rcTransmitString Maps the event to a string that is transmitted to the host when the event occurs. The string is assumed to be in the Windows character set, and is translated into the appropriate host character set as it is transmitted. Note: Use the Commands argument to specify the string to transmit. rcVBCommand Maps the keystroke to a single Visual Basic statement. This statement can include Visual Basic functions and statements and/or Reflection methods and propertiers. Use doubled quotation marks for string values within literal strings. rcVBMacro Maps the keystroke to a Reflection macro. Use the Commands argument to specify the macro’s name. You can pass additional information to the MacroData property using CommandArguments. rcRBCommand Maps the event to a single Reflection Basic statement.
Methods Page 63
rcRBScript Maps the event to a Reflection Basic script. Use the Commands argument to specify the script’s file name. Supply complete path information if the script isn’t on the Reflection Basic path. You can pass arguments to the script using the optional CommandArguments. Commands
Argument Type: String Required The action(s) to be taken when the event specified by the Event argument occurs. Depending on the value of CommandType this can be a a built-in function, a string to transmit, a Visual Basic statement, a Reflection macro, a Reflection Basic script, an RCL command, or an RCL script.
Enable
Argument type: Enumeration Required Specifies whether Event is enabled or disabled: rcEnable This event is enabled. If the event occurs, it will trigger the associated commands. rcDisable This event is not enabled. If the event occurs, it will not trigger the associated commands.
AfterEvent
Argument type: Enumeration Required Specifies what happens after Event occurs: rcEventDisable After the event occurs, it is still defined, but is disabled. If the event occurs again, it will not trigger the associated commands. rcEventReenable After the event occurs, it is still enabled. If the event occurs again, it continues to trigger the associated commands.
String
Argument Type: String Optional Specifies the string that defines string-oriented events. This argument is only relevant when the value you use for Event requires a string—that is, when Event is rcLoadSettingsFile, rcCommString, rcDisplayString, rcTimeOfDay, rcTime, rcSilence, or rcKbdEnabled.
Row
Argument type: Integer or Enumeration Optional Specifies the row location for screen events. This value is relative to the current screen; the first row on screen is row 1. This argument is relevant when Event is rcEnterPos, rcExitPos, or rcDisplayString. When Event is rcDisplayString, you can use rcAnyRow to indicate that the event can occur at any row location.
Column
Argument type: Integer or Enumeration Optional Specifies the column location for screen events. The left-most column is column 1. This argument is relevant when Event is rcEnterPos, rcExitPos, or rcDisplayString. When Event is rcDisplayString, you can use rcAnyCol to indicate that the event can occur at any column location.
Methods Page 64
Key
Argument Type: Enumeration Optional Specifies a terminal key constant when EventType is rcTerminalKeystroke. For a complete list of terminal key constants, open the Reflection Type library in the object browser and look under TerminalKeys. To determine the appropriate constant for a particular keystroke, use the Reflection Keyboard Setup dialog box. When you click on a key in the terminal keyboard, you’ll see an identifier, such as VtF8 or HPF2, at the bottom of the dialog box. The terminal key constant is this identifier preceded by "rc" and followed by "Key", so the terminal key constant for VtF8 is rcVtF8Key.
CommandArguments
Argument Type: String Optional This argument is valid when CommandType is rcVBMacro or rcRBScript. Use it to specify additional information to be passed to the macro or script.
Programming with Reflection
OpenSettings method Syntax
object.OpenSettings Filename, [Type]
Description Opens a settings file or activates a group of settings from a settings file. For example, this statement opens the toolbar settings in the specified UNIX and Digital settings file: Session.OpenSettings "C:\Mypath\Myset.r2w", rcToolbar Arguments File name
Type
Argument Type: String Required Specifies the path and file name for the settings file. Argument Type: Enumeration Optional Use this argument to activate only some settings in a complete settings file. For example, this command will activate only the color settings in the specified file: Session.OpenSettings "MyFile.r2w", rcColors If this argument is omitted, the default is rcSettings. Use only one constant value for this argument. You cannot add two values. Only rcSettings changes all existing settings. If you use one of the other options, all existing settings remain unchanged except those specified. The possible values are: rcSettings Loads the specified settings file, including all settings and macros. You must be disconnected to use this value. Note: This value is not available if you are using OpenSettings in a Reflection macro. It is available if you use this method on Reflection’s command line, in a Reflection Basic script, or if you are using Automation to control Reflection from another application. rcColors Activates just the color settings in the file, and ignores all other settings.
Methods Page 65
rcConnection Activates just the connection settings in the file, and ignores all other settings. rcHotspots Activates just the hotspot settings in the file, and ignores all other settings. rcKeymap Activates just the keymap (keyboard and mouse map) settings in the file, and ignores all other settings. rcMenuMap Activates just the menu settings in the file, and ignores all other settings. rcToolbar Activates just the toolbar settings in the file, and ignores all other settings.
Programming with Reflection
OpenSettingsExtended method Syntax
object.OpenSettingsExtended FileName, [Type], [Options]
Description Opens a settings file or activates a group of settings from a settings file. For example, this statement opens the specified Reflection for UNIX and Digital settings file, without making a connection: Session.OpenSettings "C:\Mypath\Myset.r2w", rcSettings, rcNoConnect Arguments Filename
Type
Argument Type: String Required Specifies the path and file name for the settings file. Argument Type: Enumeration Optional Identifies what settings to open. If this argument is omitted, the default is rcSettings. Use only one constant value for this argument. You cannot add two values. Only rcSettings changes all existing settings. If you use one of the other options, all existing settings remain unchanged except those specified. The possible values are: rcSettings Opens a complete settings file. This activates all of the settings in the file. rcColors Activates just the color settings in the file, and ignores all other settings. rcConnection Activates just the connection settings in the file, and ignores all other settings. rcHotspots Activates just the hotspot settings in the file, and ignores all other settings. rcKeymap Activates just the keymap (keyboard and mouse map) settings in the file, and ignores all other settings.
Methods Page 66
rcMenuMap Activates just the menu settings in the file, and ignores all other settings. rcToolbar Activates just the toolbar settings in the file, and ignores all other settings. Options
Argument Type: Enumeration Optional This argument has an effect only if you are opening a complete or partial settings file that configures a connection. If this argument is omitted, Reflection will automatically make the connection. Use the following value for this argument if you want to open the settings file without making the connection. rcNoConnect Opens the specified settings file without making a connection.
Examples This command opens the specified settings file, including all of its settings, and makes the configured connection automatically. Session.OpenSettingsExtended "c:\mypath\myset.r2w" This command configures Reflection to include the connection settings in the specified file, but does not make the connection: Session.OpenSettingsExtended "c:\mypath\myset.r2w", rcConnection, rcNoConnect
Programming with Reflection
PasswordBox method Syntax
Result = object.PasswordBox(Prompt, [Title], [Default])
Description Opens a dialog box containing a prompt and a text box for user input, and returns the contents of the text box after the user clicks OK. As the user types in the text box, characters are echoed as asterisks. The user cannot type special non-printing characters in the password box. So if your host password includes any such characters, the PasswordBox method will not work. Arguments Prompt Argument Type: String Required A string expression containing the text to be shown in the dialog box. The maximum length of this value ranges from about 160 to 255 characters. Prompts longer than one line automatically break at the nearest space and wrap to the next line. Title
Argument Type: String Optional Specifies the caption that appears in the dialog box’s title bar. The default value is the name of the Reflection product (“Reflection for HP”, “Reflection for UNIX and Digital”, or “Reflection for ReGIS Graphics”).
Default
Argument Type: String Optional
Methods Page 67
A string expression that appears in the text box as the default response. The string is not displayed in the dialog box; a string of asterisks equivalent in length to the actual string is displayed. It’s generally appropriate to omit this argument. The default is an empty string (""). Return Result
Return type: String If the user presses Enter or clicks the OK button, Result contains the text in the input box. If the user clicks Cancel, Result contains Default.
Example Use a variable to capture what the user types in the password box. For example: Dim pass As String pass = Session.PasswordBox("Please Enter Your Password","Password",)
Programming with Reflection
Paste method Syntax
object.Paste
Description Copies data from the Clipboard to the cursor location in the terminal window. Example This example sets a value for the Clipboard text and pastes it to the current cursor location. You should be connected when you run this procedure. Sub SetClipboardTextAndPasteIt () With Session .SetClipboardText "Test" .Paste End With End Sub
Programming with Reflection
PlaySound method Syntax
object.PlaySound SoundFile, [Asynchronous]
Description Plays a wave sound file. Arguments SoundFile Argument Type: String Required Specifies the path and name of a .wav sound file. An error is generated if the file doesn’t exist or can’t be found. Asynchronous
Methods Page 68
Argument Type: Boolean Optional
If this argument is True, the sound plays asynchronously, which means PlaySound returns immediately, and the procedure continues before the sound has completed. If this value is False, the sound plays synchronously, which means PlaySound waits until the sound has finished before returning. If this argument is omitted, the default value is False.
Programming with Reflection
Print method Syntax
object.Print Range, [Copies]
Description Prints the contents of display memory. If the ClosePrinterManually property is True, calling the FlushPrinter method before and after each call to the Print method is recommended. This way, each job starts on a new page. Arguments Range Argument Type: Enumeration Required The possible values are: rcSelection Prints the current selection. rcScreen Prints the current screen in display memory. rcAll Prints all of display memory (including the current screen). Copies
Argument Type: Integer Optional Specifies the number of copies to print. If this argument is omitted, one copy is printed.
Programming with Reflection
PrintFile method Syntax
object.PrintFile Filename
Description Prints the specified file, using Reflection’s built-in printing support. All related printing properties (such as PrinterFontName and PrinterRows) are applied to the printed output. If the ClosePrinterManually property is set to True, then the FlushPrinter method should be called, after the PrintFile method, to ensure that the printer prints the file. Arguments Filename Argument Type: String Required Specifies the file to print. Supply complete path information.
Methods Page 69
Programming with Reflection
PrintScreen method Syntax
object.PrintScreen Range, [Copies]
Description Prints the contents of display memory. If the ClosePrinterManually property is True, calling the FlushPrinter method before and after each call to the PrintScreen method is recommended. This way, each job starts on a new page. Note: This method is equivalent to the Print method. Use this method to avoid potential conflicts with Visual Basic Print commands. Arguments Range Argument Type: Enumeration Required The possible values are: rcSelection Prints the current selection. rcScreen Prints the current screen in display memory. rcAll Prints all of display memory (including the current screen). Copies
Argument Type: Integer Optional Specifies the number of copies to print. If this argument is omitted, one copy is printed.
Programming with Reflection
PrintString method Syntax
object.PrintString String
Description Prints the specified string, using Reflection’s built-in printing support. All related printing properties (such as PrinterFontName and PrinterRows) are applied to the printed output. If the ClosePrinterManually property is set to True, then the FlushPrinter method should be called, after the PrintString method, to ensure that the printer prints the string. Arguments File name Argument Type: String Required Specifies the string to print.
Methods Page 70
Programming with Reflection
PropertyIsModifiable method Syntax
Modifiable = object.PropertyIsModifiable(PropertyName)
Description Returns a value indicating whether a given property can be modified. Use SetPropertyProfile to enable or disable the ability to modify a property. Arguments PropertyName Argument Type: String Required Specifies the name of the property. Return Modifiable
Return type: Boolean True if the property can be changed. False if it cannot.
Example Sub IsDisplayRowsModifiable () With Session 'Dimension an integer for the return value Dim changeable As Integer 'Find out if the Display Rows property is modifiable changeable = .PropertyIsModifiable("DisplayRows") 'Display the results If changeable Then MsgBox "That property can be modified." Else MsgBox "You can't change that property." End If End With End Sub Programming with Reflection
Quit method Syntax
object.Quit
Description Exits Reflection, terminating the current procedure. Notes: When the Quit method is used to exit, Reflection displays a Confirmation dialog box (allowing the user to save changes) if changes have been made to settings and both SaveChanges = rcChangesAskUser and Visible = True. When the Quit method is used to exit while a connection exists, no Confirmation dialog box (checking to see if the user wants to end the session) appears regardless of the current value of ConfirmExit.
Methods Page 71
Programming with Reflection
RaiseControlEvent method Syntax
object.RaiseControlEvent [Param1], [Param2]
Description This method is only relevant if you are using Reflection as an ActiveX control. RaiseControlEvent provides information to the ActiveX control about actions that occur in a Reflection session. To use this method: 1 Map a Reflection feature (an event, toolbar, keystroke, hotspot, menu, or mouse click) to RaiseControlEvent. 2 Handle the event in the application or web page using the ActiveX control’s OnReflectionEvent event. ClickHere for more information about using Reflection as an ActiveX control. Note: This information is available if you included the System Administrator Online Help when you installed Reflection. Arguments Param1 Argument Type: Integer Optional Sends numeric information to the ActiveX control. For example, you might use this argument to identify different events by number. The value of this argument is passed to the first argument of the control’s OnReflectionEvent event. Param2
Argument Type: String Optional Sends string information to the ActiveX control. For example, you might use this argument to pass information describing the action that called the RaiseControlEvent method. The value of this argument is passed to the second argument of the control’s OnReflectionEvent event.
Programming with Reflection
ReadChars method Syntax
Chars = object.ReadChars(Count, [Timeout], [Options])
Description Reads the specified number of characters from the host. If this method times out before the specified number of characters is received, no error is generated. The return value contains all characters received before the timeout occurred. You can determine if a timeout occurred by comparing the length of the return string with the Count argument. When reading incoming data from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments Count Argument Type: Integer Required The number of characters to read. If this argument is set to 0, no error results and an empty string is returned. Timeout
Methods Page 72
Argument Type: String Optional The amount of time to wait for the specified number of characters to be received.
The string is specified in HH:MM:SS.hh format. If this argument is omitted or is an empty string (""), Reflection waits until the characters are received. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcNoTranslation Specifies that the characters being received are binary data and should not be translated from the host character set into the PC character set. rcNoDisplay Specifies that incoming characters should not be displayed in the terminal window. To specify both options, use the addition operator: rcNoTranslation + rcNoDisplay.
Return Chars
Return type: String The characters read from the host. The number of characters in the return string is the value of Count, unless a timeout occurred.
Programming with Reflection
ReadLine method Syntax
LineRead = object.ReadLine([Timeout], [Options], [SawEndOfLine])
Description Reads a line of data from the host until a linefeed character (ASCII decimal 10) is received. Carriage return/ linefeed sequences are stripped out of the returned string. If this method times out before the end-of-line (linefeed) is received, no error is generated. The return value contains those characters that were received before the timeout. If you’re using the ReadLine method to read incoming data from an external application (such as standalone Visual Basic), set the ProcessDatacomm property to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments Timeout Argument Type: String Optional Specifies the amount of time to wait for a linefeed to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits forever if a linefeed is not received. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcNoTranslation Indicates that the string should not be translated from the host character set into the PC character set.
Methods Page 73
rcNoDisplay Specifies that incoming characters should not be displayed in the terminal window. To combine the two options, use the addition operator: rcNoTranslation + rcNoDisplay. SawEndOfLine
Return LineRead
Argument Type: Boolean Optional Receives True if the end-of-line (linefeed) character was received before the timeout occurred, and False otherwise. Return type: String The line read from the host (not including carriage return/linefeed characters).
Programming with Reflection
ReadUntil method Syntax
Chars = object.ReadUntil(UntilChars, [Timeout], [Options], [WhichTerminator])
Description Reads characters from the host until one of the specified terminator characters is received. The terminator character is not included in the returned string. If this method times out before one of the terminator characters is received, no error is generated. The return value contains any characters received before the timeout occurred. The WhichTerminator argument can be used to determine if a timeout occurred (if WhichTerminator is an empty string, a timeout occurred). If you’re using the ReadUntil method to read incoming datacomm from an external application (such as stand-alone Visual Basic), you should set the ProcessDatacomm property to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments UntilChars Argument Type: String Required Specifies one or more characters, any one of which can terminate the read operation. Use the Chr$ function to specify binary values (such as CR and DC1). For example: Terminators = Chr$(rcCR) + Chr$(rcDC1) Timeout
Argument Type: String Optional Specifies the amount of time to wait for the specified terminator characters to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits forever if none of the terminators is received.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method:
Methods Page 74
rcNoTranslation Indicates that the string should not be translated from the host character set into the PC character set. rcNoDisplay Specifies that incoming characters should not be displayed in the terminal window. To combine the two options, use the addition operator: rcNoTranslation + rcNoDisplay. WhichTerminator
Return Chars
Argument Type: String Optional Receives the terminator (a single character) that ended the read. If a timeout occurs, an empty string is returned in this variable. Return type: String The characters read from the host (not including the read terminator character).
Errors rcErrInvalidTerminator
The UntilChars list was empty ("").
Programming with Reflection
RemoveEvent method Syntax
object.RemoveEvent Event
Description Deletes an event defined with the DefineEvent method. Arguments Event Argument type: Integer Required Specifies the number assigned (with the DefineEvent method) to the event that is to be deleted.
Programming with Reflection
RemoveOnEvent method Syntax
object.RemoveOnEvent Event
Description Removes the specified on event definition(s). Events of this type are defined with the OnEvent method. Use EnableOnEvent to disable or enable an event without removing it from the list of events. Arguments Event Argument type: Integer or Enumeration Required Specifies the on event number to remove. Use rcAllEvents to remove all defined on events.
Methods Page 75
Programming with Reflection
ResetEvent method Syntax
object.ResetEvent Event
Description Resets an event back to its initial state. Use this method if you want to be sure that WaitEvent and CheckEvent aren’t automatically satisfied by any previous occurrence of this event. Arguments Event Argument type: Integer Required Specifies the number assigned to the event with DefineEvent .
Programming with Reflection
ResetTerminal method Syntax
object.ResetTerminal ResetMode
Description Executes a terminal reset. Arguments ResetMode Argument Type: Enumeration Required Use one of the following values: rcSoftReset Performs a soft reset of the terminal. In Reflection for HP, this is equivalent to clicking Soft Reset on the Connection menu’s cascading Reset menu. In Reflection for UNIX and Digital (VT emulation) and Reflection for ReGIS Graphics (VT graphics emulation), this is equivalent to clicking Terminal on the Connection menu’s cascading Reset menu. rcHardReset Performs a hard reset of the terminal. In Reflection for HP, this is equivalent to clicking Hard Reset on the Connection menu’s cascading Reset menu. In Reflection for UNIX and Digital (VT emulation) and Reflection for ReGIS Graphics (VT graphics emulation), this is equivalent to clicking Recall Last Setup on the Reset menu. rcSerialStats Resets the serial connection statistics (receiver overruns, parity errors, framing errors, and so forth) to zero.
Methods Page 76
Example This example resets the terminal. The first line suppresses the beep that usually accompanies this action. Note: Resetting the terminal has the effect of restoring Bell to the default value of True. This means that if you execute subsequent ResetTerminal commands, you must reset Bell to False if you don’t want a beep. Sub ResetWithoutBeep () Session.Bell = False Session.ResetTerminal rcHardReset End Sub
Programming with Reflection
RestoreDefaults method Syntax
object.RestoreDefaults SettingType
Description Restores a group of Reflection settings to their default values. For example, to restore the default colors: Session.RestoreDefaults rcColors Arguments SettingType
Argument Type: Enumeration Required Specifies what kind of settings to restore. The possible values are: rcSettings Restores all Reflection settings to default values and removes all macros. Note: This value is not available if you are using RestoreDefaults in a Reflection macro. It is available if you use this method on Reflection’s command line, in a Reflection Basic script, or if you are using Automation to control Reflection from another application. rcColors Restores the default colors. rcConnection Restores the default connection settings. If Reflection is connected to a host, Reflection will first disconnect from the host, and then restore the default connection settings. rcHotspots Restores the default hotspot configuration. rcKeymap Restores the default keyboard and mouse map, and removes all scan code definitions. rcMenuMap Restores just the menu settings in the file, and ignores all other settings. rcProfile Enables any features that have been disabled using the SetCommandGroupProfile method. rcToolbar Restores the default toolbar configuration
Methods Page 77
Programming with Reflection
ResumeConnection method Syntax
object.ResumeConnection ConnectionID
Description Resumes a previously suspended connection (suspend connections with the SuspendConnection method). Only sessions that were established and suspended in the same copy of Reflection can be resumed. Resuming a connection updates the value of the ConnectionType and ConnectionSettings properties in accordance with the newly resumed connection. Arguments ConnectionID Argument Type: Long Required Identifies the connection to resume. Obtain this from the SuspendConnection method.
Programming with Reflection
RunExternalMacro method Syntax
object.RunExternalMacro FileName, MacroName, [MacroData]
Description Runs a macro that is not in the current settings file. For example, the following statement runs a macro called InitialSetup in the specified Reflection for HP settings file: Session.RunExternalMacro "C:\Mypath\Myfile.r1w", "InitialSetup" This method is useful for running a macro that you only need to use once. By using this method, you can run the macro without adding a permanent reference to the file that contains it. Arguments FileName Argument type: String Required The path and name of the file that contains the macro you want to run. This must be a settings file for the Reflection product you are using. An error is returned if you specify an invalid or nonexistent file. MacroName
Argument type: String Required The macro you want to run. An error is returned if the macro does not exist.
MacroData
Argument type: String Optional Sets the value of the MacroData property.
Methods Page 78
Programming with Reflection
RunMacro method Syntax
object.RunMacro MacroName, [MacroData]
Description Runs a macro. For example, the following statement runs the FirstLogin macro and sets MacroData to "Joe". Session.FirstLogin "AskUser", "Joe" Arguments MacroName
Argument type: String Required Specifies the name of the macro to run. An error occurs if there is no macro of this name in the current settings file or in any referenced files. This value can be up to 255 characters long. If macros of the same name are in both your settings and a referenced file, use both the project name and the macro name to identify the macro. Place a period between the project and maco name. For example "SharedMacros.Login" identifies the "Login" macro in the "SharedMacros" settings file.
MacroData
Argument type: String Optional Specifies information to be passed to the MacroData property. This value can be up to 255 characters long.
Note: Because each macro is a public procedure within your project, you can also run macros by calling the macro procedure. The procedure name is the same as the macro name. For example, each of the following statements will run a macro named DoStuff. (Look up Call statement in the Visual Basic Editor’s online help for information about calling procedures.) Call DoStuff DoStuff Use RunMacro when you want to pass information to MacroData, or when you want to use a string expression to identify the name of the macro. String expressions can be created at run time as shown here: Session.RunMacro "macro" & Str$(1)
Programming with Reflection
RunScript method Syntax
object.RunScript ScriptName, [ScriptArguments]
Description Runs a Reflection Basic script. For example: Session.RunScript "C:\Mypath\Logon.rbs" Arguments ScriptName
Methods Page 79
Argument Type: String Required
Identifies the script to run. Reflection can locate a script without complete path information if the script is in a designated Script Folder, or is located in the Reflection Basic path . Use the ScriptFolder property to designate a Script Folder. If you have a designated Script Folder, Reflection searches this folder for a script immediately after searching the current working folder, and before searching the User folder. ScriptArguments
Argument Type: String Optional This argument is for passing command line arguments to the script. The arguments are available within the script using the Command$ function
Note When you use RunScript to “chain” several scripts, you may receive a message saying that too many scripts are running. To avoid this, you can run scripts by calling the Main subroutine using a Declare statement. To call the Main subroutine in a script other than the current script, use the “Alias” option to rename the subroutine in the current script. Programming with Reflection
SaveDisplayMemory method Syntax
object.SaveDisplayMemory Filename, [IfFileExists], [Options]
Description Saves the contents of display memory to a file. If the WriteSpacesAsTab property is True and the rcNoTranslation option is not specified, multiple space characters are converted to tabs as they are written to disk according to the current value of the SpacesPerTab property. If the WriteCtrlZAsEOF property is True and the rcNoTranslation option is not specified, a Ctrl-Z character is appended to the end of the file as it is written. If the DeleteTrailingSpaces property is True and the rcNoTranslation option is not specified, spaces at the end of lines are not written to the disk. Arguments Filename Argument Type: String Required Specifies the file to which display memory is to be written. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the file already exists. If this argument is omitted, the default is rcCancel. The possible values are: rcCancel Generates an error if the file exists. rcOverwrite Overwrites the existing file. rcAppend Appends to the existing file.
Options
Methods Page 80
Argument Type: Enumeration Optional
Specifies additional, non-default behavior for the method. This method has only one option: rcNoTranslation Indicates that the contents of display memory should be saved as binary data, and should not be translated from the host character set into the PC character set. Programming with Reflection
SaveSettings method Syntax
object.SaveSettings Filename, [Type], [IfFileExists]
Description Save the current settings to a file. For example, this statement saves a settings file called Test.r2w to the current directory, overwriting any existing files of the same name. The file extension indicates that this is a Reflection for UNIX and Digital settings file. Session.SaveSettings "Test.r2w", rcSettings, rcOverwrite Arguments Filename
Argument Type: String Required Specifies a name for the settings file. Use one of the following extensions if you want the file to appear in Reflection’s Open Settings dialog box: Extension .r1w .r2w .r4w .rkm .rtb .rcc .rhs .rmu
Settings Type Complete Reflection for HP settings file Complete Reflection for UNIX and Digital settings file Complete Reflection for ReGIS Graphics settings file Keyboard and mouse settings Toolbar settings Color settings Hotspot and hotlist settings Menu settings
.rco
Connection settings
The file is saved to the current directory unless you provide path information. Type
Argument Type: Enumeration Optional Specifies what type of settings to save. The default is rcSettings. The possible values are: rcSettings Save all Reflection settings. rcColors Save the color settings.
Methods Page 81
rcConnection Save the connection settings. rcHotspots Save the hotspot settings. rcKeymap Save the keyboard mapping settings. rcMenuMap Save the menu settings. rcToolbar Save the toolbar settings. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the file exists. The default is rcCancel. The possible values are: rcCancel Generates an error if the file already exists. rcAskUser Prompts the user to either cancel or overwrite the file. rcOverwrite Overwrites the existing file.
Errors rcErrOperationFailed
This error is returned if the settings cannot be saved for any reason, including user cancellation.
Example This example saves all of the current settings to the current settings file, overwriting the existing file. The name of the current settings file is returned by the SettingsFile property. Sub SaveThisSession () With Session .SaveSettings .SettingsFile, rcSettings, rcOverwrite End With End Sub
Methods Page 82
Programming with Reflection
SelectText method Syntax
object.SelectText StartRow, StartCol, EndRow, EndCol, [SelectionType]
Description Selects a region of display memory. To reset the current selection (if any exists), call this method with StartRow larger than EndRow, or StartCol larger than EndCol. For example, SelectText(1, 1, 0, 0). Arguments StartRow Argument Type: Integer Required Specifies the row in display memory where the selection starts. The row is specified in host addressable coordinates. StartCol
Argument Type: Integer Required Specifies the column where the selection starts.
EndRow
Argument Type: Integer Required Specifies the row where the selection ends.
EndCol
Argument Type: Integer Required Specifies the column where the selection ends.
SelectionType
Argument Type: Enumeration Optional Specifies how the selection is to be made. The possible values are: rcRectRegion This option indicates that the text selected should be a “rectangular” region; for example: The bold text in this sentence will be selected if rcRectRegion is specified. rcWrappedRegion The default is to select a wrapped region; for example: The bold text in this sentence will be selected if rcWrappedRegion is specified. The default option is rcWrappedRegion.
Methods Page 83
Programming with Reflection
SetAnsiColorRGB method Syntax
object.SetAnsiColorRGB Color, Red, Green, Blue
Description Adjusts the appearance of ANSI display colors. This method is only valid when your terminal is set for ANSI emulation, that is when TerminalType is set to either rcANSIBBS or rcANSIUNIX. (To adjust the display colors for any other terminal type use SetColorRGB .) Changes you make to colors with this command affect colors displayed by a host program. For example, if you change the blue color, your new color will be used whenever a host program displays blue. Color adjustment is made by assigning values to the three basic color components—red, green, and blue. For example, the following statement redefines black, and makes it dark grey by using new, greater values for each of the three color components. (By default, black is defined by using zero for each of the three components.) Executing this command changes the default ANSI background color. Session.SetAnsiColorRGB rcAnsiBlack, 20, 20, 20 Restoring color defaults with RestoreDefaluts returns the black color to its original definition: Session.RestoreDefaults rcColors Arguments Color
Argument type: Enumeration Required The color being adjusted. Only the first eight colors are availabe for ANSI-BBS terminal emulation (TerminalType = rcANSIBBS). All 16 colors are available for SCO-ANSI terminal emulation (TerminalType = rcANSIUNIX). rcAnsiBlack rcAnsiBlue rcAnsiGreen rcAnsiCyan rcAnsiRed rcAnsiMagenta rcAnsiBrown rcAnsiWhite rcAnsiGrey rcAnsiLtBlue rcAnsiLtGreen rcAnsiLtCyan rcAnsiLtRed rcAnsiLtMagenta rcAnsiYellow rcAnsiLtWhite
(SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI) (SCO-ANSI)
Red
Argument type: Integer Required An integer value indicating the degree of red saturation you want. This can be any value between 0 and 255 in Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Green
Argument type: Integer Required
Methods Page 84
An integer value indicating the degree of green saturation you want. This can be any value between 0 and 255 in Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics. Blue
Argument type: Integer Required An integer value indicating the degree of blue saturation you want. This can be any value between 0 and 255 in Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Note: This method is not available in Reflection for HP. Programming with Reflection
SetClipboardText method Syntax
object.SetClipboardText ClipboardText
Description Copies a string to the Clipboard. Arguments ClipboardText Argument Type: String Required A string to copy to the Clipboard. Use an empty string ("") to clear the Clipboard. Programming with Reflection
SetColorMap method Syntax
object.SetColorMap Attribute, Foreground, Background
Description Assigns colors for screen display. Arguments Attribute Argument type: Enumeration Required The host attribute (such as plain or underlined text) to be mapped. The values are: rcPlainAttribute rcBlinkAttribute rcInverseAttribute rcUnderlineAttribute rcBoldAttribute (for DEC hosts) rcHalfbrightAttribute (for HP hosts) rcFunctionKeys (for HP hosts) These values (except rcPlainAttribute and rcFunctionKeys) can be added together to configure colors for combined attributes, such as Bold Inverse and Underline Blink. (You can see samples of text with combined attributes by selecting Edit All Attributes on the Colors tab in the Display Setup dialog box.) For example, the following configures inverse blinking text to appear as grey text on a blue background:
Methods Page 85
.SetColorMap rcInverseAttribute+rcBlinkAttribute, rcGrey, rcBlue Foreground
Argument type: Enumeration Required The text (foreground) color being assigned. The possible values are: rcWhite rcGrey rcRed rcBlue rcGreen rcYellow rcCyan rcMagenta rcBlack rcDkGrey rcDkRed rcDkBlue rcDkGreen rcDkYellow rcDkCyan rcDkMagenta
Background
Argument type: Enumeration Required The background color being assigned. The possible values are the same as for Foreground.
Programming with Reflection
SetColorRGB method Syntax
object.SetColorRGB Color, Red, Green, Blue
Description Reflection creates displays using a palette of 16 colors. (You can view these colors on the Colors tab in the Display Setup dialog box.) This method adjusts the appearance of a specified color from the palette. Color adjustment is made by assigning a value each of three basic color components—red, green, and blue. For example, the following statement redefines red and makes it black, by specifying zero for all color components. (After Reflection executes this command, you will see two black tiles in the Text and Background areas on the Color tab in the Display Setup dialog box—the original black tile, and the one that had originally been red.) Session.SetColorRGB rcRed, 0, 0, 0 Restoring color defaults with RestoreDefaluts returns the red color to its original definition: Session.RestoreDefaults rcColors Changes you make to a color affect the appearance of any host attributes configured to use that color. To configure host attribute colors programmatically, use the SetColorMap method. (Changes you make to colors using SetColorRGB also affect text configured using the Color tab in the Display Setup dialog box.)
Methods Page 86
Arguments Color
Argument type: Enumeration Required The color being adjusted. (Note that changes you make using SetColorRGB may mean that the constant rcRed is no longer associated with a red color.) The possible values are: rcWhite rcGrey rcRed rcBlue rcGreen rcYellow rcCyan rcMagenta rcBlack rcDkGrey rcDkRed rcDkBlue rcDkGreen rcDkYellow rcDkCyan rcDkMagenta
Red
Argument type: Integer Required An integer value indicating the degree of red saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Green
Argument type: Integer Required An integer value indicating the degree of green saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Blue
Argument type: Integer Required An integer value indicating the degree of blue saturation you want. This can be any value between 0 and 255 in Reflection for HP or Reflection for UNIX and Digital. It can be any value between 0 and 100 in Reflection for ReGIS Graphics.
Note: This method is not valid if your terminal type is set for ANSI emulation (TerminalType is set to either rcANSIBBS or rcANSIUNIX). For ANSI terminal emulation, use SetAnsiColorRGB to configure your colors. Example This example uses GetColorRGB to return the current color settings for magenta. SetColorMap assigns magenta to the background display so you can view this color. SetColorRGB is used to modify the magenta color. Sub ModifyMagenta () 'Declare variables for color coponents Dim magentaRed As Integer Dim magentaGreen As Integer Dim magentaBlue As Integer With Session
Methods Page 87
'Restore the default colors .RestoreDefaults rcColors 'Get the defaults color values for magenta magentaRed = .GetColorRGB(rcMagenta, rcRed) magentaGreen = .GetColorRGB(rcMagenta, rcGreen) magentaBlue = .GetColorRGB(rcMagenta, rcBlue) 'Set plain text to black text on a magenta background 'And pause to view the results .SetColorMap rcPlainAttribute, rcBlack, rcMagenta .MsgBox "Default Magenta" 'Change the color components for magenta, decreasing the 'red value by 20 and using default green and blue values .SetColorRGB rcMagenta, magentaRed -20, magentaGreen, magentaBlue .MsgBox "Edited Magenta" End With End Sub
Programming with Reflection
SetCommandGroupProfile method Syntax
object.SetCommandGroupProfile CmdGroup, IsEnabled
Description Specifies whether a given Reflection feature or group of commands is enabled (executable) or disabled (not executable). A call to this method will fail if the specified feature or command group has been locked by a call to the LockProfile method. For example, the following statement disables all file transfers: Session.SetCommandGroupProfile rcFileTransfer, rcDisabled Arguments CmdGroup
Argument Type: Enumeration Required Identifies the group of commands to enable or disable. The possible values are: rcSetup Setup commands. This option affects all controls in the Setup dialog boxes. Note: Disabling these items removes them from the Reflection Setup menu. rcFileTransfer Disables all file transfer operations and commands. Using this value disables the file transfer buttons in the File Transfer dialog box, and returns an error if file transfer is initiated programmatically. rcFileTransferReceive Disables file transfers to the local PC. Using this value disables the button in the File Transfer dialog box that initiates file transfer to the local PC, and returns an error if file transfer is initiated programmatically.
Methods Page 88
rcFileTransferSend Disables file transfers to the host. Using this value disables the button in the File Transfer dialog box that initiates file transfer to the host, and returns an error if file transfer is initiated programmatically. rcTracing Affects access to tracing operations and commands. This value affects Tracing commands on Reflection menus, tracing in Reflection macros, and tracing done programmatically from external applications using Automation. rcHostDirectory Specifies whether a host folder listing can be displayed in the File Transfer dialog box. rcSavePasswords Specifies whether passwords are saved with your host connection or connect macro. This affects the LAT and NLAT connections, and passwords that are saved in macros. When this value is disabled, the SavePasswords property cannot be set to True. rcMenus Affects all menu commands that are part of Reflection’s default menus (including the context menu that appears when you right-click). Commands that are part of the default menus are affected even if you have moved or renamed (or both) the menu items. Custom menu items added using the Menu Setup dialog box are not affected. Note: Disabled menu items are removed from Reflection. rcVB Affects access to all Visual Basic commands and Reflection Basic commands (host-initiated and locally-initiated). Note: The value rcRB is equivalent. Disabling these items removes them from the Reflection Macro menu. rcHost Affects access to Reflection Basic or RCL commands executed from the host (but not commands executed locally). (Note: The values rcRCLHost and rcRBHost are equivalent to this value.) rcVBLocal Affects access to any Visual Basic command and any Reflection Basic commands executed locally (but not from the host). Note: Disabling these items removes them from the Reflection Macro menu. The value rcRBLocal is equivalent. rcOLEAutomation Affects access to commands that control Reflection’s methods and properties through Automation. rcRCL Affects access to RCL commands (both host-initiated and locally initiated). rcRCLHost Affects access to RCL commands executed remotely from the host (but not commands executed locally).
Methods Page 89
rcRCLLocal Affects access to RCL commands executed locally (but not commands executed remotely from the host). IsEnabled
Argument Type: Enumeration Required Specifies whether the given command group is enabled or disabled. The possible values are: rcEnabled The command group is enabled. rcDisabled The command group is disabled.
Programming with Reflection
SetCommandProfile method Syntax
object.SetCommandProfile CmdName, IsEnabled
Description Specifies whether the selected built-in function is enabled (executable) or disabled (not executable). Disabled menu commands are removed from the Reflection menus. For example, this statement removes the Visual Basic Editor item from the macros menu: Session.SetCommandProfile "VisualBasicEditor", rcDisabled Arguments CmdName
IsEnabled
Argument Type: String Required The built-in function name. Argument Type: Enumeration Required Specifies whether the given function is to be enabled or disabled. The possible values are: rcEnabled The function is enabled. rcDisabled The function is disabled.
Programming with Reflection
SetKeyMap method Syntax
object.SetKeyMap Modifiers, Key, CommandType, Commands, [CommandArguments]
Description Maps a PC keystroke to an action. The action is determined by the CommandType and Commands arguments. For example, this command maps the F4 key to transmit the string "quit": .SetKeyMap rcNormalKey, "F4", rcTransmitString, "quit"
Methods Page 90
This command maps the Alt+Z keystroke combination to run a macro called “Test”, and passes a value of "x" to the MacroData property: .SetKeyMap rcAltKey, "z", rcVBMacro, "test", "x" This command maps Alt+F5 to two Help menu commands, first the display of the Reflection About box, then opening the Help contents: SetKeyMap rcAltKey, "F5", rcBuiltInFunction, "HelpAboutReflection HelpContents" Arguments Modifiers
Argument Type: Enumeration Required A keystroke consists of a primary key and may also include one or more modifier keys—Alt, Ctrl, and Shift. If you are mapping to an unmodified keystroke, use rcNormalKey for this argument. The possible modifier keys are: rcNormalKey No modifier. rcAltKey The Alt key. rcCtrlKey The Control key. rcShiftKey The Shift key. To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey.
Key
Argument Type: String Required A string representing a PC key, such as "K", "F1", or "NumLock".
CommandType
Argument Type: Enumeration Required Specifies what sort of command to attach to the keystroke. The possible values are: rcBuiltInFunction Maps the keystroke to one or more built-in functions. rcTransmitString Maps the keystroke to a string that is transmitted to the host when the keystroke is pressed. The string is assumed to be in the Windows character set, and is translated into the appropriate host character set as it is transmitted. rcDefaultMap Resets the keystroke to its default mapping. If you use this option, the final Commands argument must be an empty string. For example: Session.SetKeyMap rcNormalKey, "F1", rcDefaultMap,_ ""
Methods Page 91
rcVBCommand Maps the keystroke to a single Visual Basic statement. This statement can include Visual Basic functions and statements and/or Reflection methods and properties. Use doubled quotation marks for string values within literal strings, for example: .SetKeyMap rcAltKey, "F1", rcVBCommand, "MsgBox_ ""Hello""" Note: This value is equivalent to rcRBCommand, which was used in earlier versions of Reflection. rcVBMacro Maps the keystroke to a Reflection macro. Use the Commands argument to specify the macro’s name. You can pass additional information to the MacroData property using CommandArguments. Note: If the macro is not present in the current settings file or a referenced file, you will see an error when you press the specified keystroke combination. rcRBScript Maps the keystroke to a Reflection Basic script. Use the Commands argument to specify the script’s path and file name. You can pass arguments to the script using CommandArguments. rcRCLCommand Maps the keystroke to an RCL command or script. Commands
Argument Type: String Required Specifies the action to perform when the key is pressed. Depending on the value of CommandType this can be a a built-in function, a string to transmit, a Visual Basic statement, a Reflection macro, a Reflection Basic script, an RCL command, or an RCL script.
CommandArguments
Argument Type: String Optional This argument is valid when CommandType is rcVBMacro or rcRBScript. Use it to specify additional information to be passed to the macro or script.
Programming with Reflection
SetMouseMap method Syntax
object.SetMouseMap Modifiers, Chord, CommandType, Commands, [CommandArguments]
Description Maps a mouse chord to an action. The action is determined by the CommandType and Commands arguments. For example, the following command modifies the mouse setup so that pressing Alt while right-clicking displays the online help index: .SetMouseMap rcAltKey, "RightBtn", rcBuiltInFunction, "HelpSearch" This statement sends “Quit” to the host when the Control key (Ctrl) is depressed while the right mouse button is double-clicked:
Methods Page 92
.SetMouseMap rcCtrlKey, "RightBtn_DblClk", rcTransmitString, "Quit" Arguments Modifiers
Argument Type: Enumeration Required A mouse chord consists of a button click (or double-click) and may also include one or more modifier keysAlt, Ctrl, and Shift. If you are mapping to an unmodified mouse chord, use rcNormalKey for this argument. The possible modifier keys are: rcNormalKey rcAltKey rcCtrlKey rcShiftKey
No modifier. The Alt key. The Control key. The Shift key.
To specify multiple modifier keys, use the addition operator (+). For example: rcAltKey + rcCtrlKey. Chord
Argument Type: String Required A string identifying a mouse chord. Use one of the following: “LeftBtn” “MiddleBtn” “RightBtn” “LeftBtn_DblClk” “MiddleBtn_DblClk” “RightBtn_DblClk”
CommandType
Left button click Middle button click Right button click Left button double-click Middle button double-click Right button double-click
Argument Type: Enumeration Required Specifies what sort of command to attach to the keystroke. The possible values are: rcBuiltInFunction Maps the mouse chord to one or more built-in functions. rcTransmitString Maps the mouse chord to a string that is transmitted to the host. The string is assumed to be in the Windows character set, and is translated into the appropriate host character set as it is transmitted. rcDefaultMap Resets the mouse chord to its default mapping. If you use this option, the Commands argument must be an empty string. For example: SetMouseMap rcNormalKey, "LeftBtn", rcDefaultMap, "" rcVBCommand Maps the mouse chord to a single Visual Basic statement. This statement can include Visual Basic functions and statements and/or Reflection methods and propertiers. Use doubled quotation marks for string values within literal strings, for example: SetMouseMap rcAltKey, "LeftBtn", rcVBCommand, "MsgBox ""Hello"""
Methods Page 93
Note: This value is equivalent to rcRBCommand, which was used in earlier versions of Reflection. rcVBMacro Maps the mouse chord to a Reflection macro. Use the Commands argument to specify the macro’s name. You can pass additional information to the MacroData property using CommandArguments. Note: If the macro is not present in the current settings file or a referenced file, you will see an error when you use the specified mouse chord. rcRBScript Maps the mouse chord to a Reflection Basic script. Use the Commands argument to specify the script’s path and file name. You can pass arguments to the script using CommandArguments. Commands
Argument Type: String Required Specifies the action to perform when the mouse chord is pressed. Depending on the value of CommandType this can be a a built-in function, a string to transmit, a Visual Basic statement, a Reflection macro, a Reflection Basic script, an RCL command, or an RCL script.
CommandArguments Argument Type: String Optional This argument is valid when CommandType is rcVBMacro or rcRBScript. Use it to specify additional information to be passed to the macro or script. Note: You can map a mouse chord to no action using the “Nothing” Built-in function. For example: .SetMouseMap rcNormalKey, "RightBtn", rcBuiltinFunction, "Nothing"
Programming with Reflection
SetPropertyProfile method Syntax
object.SetPropertyProfile PropertyName, IsEnabled
Description Determines whether a given property is modifiable. Values for properties that are disabled with this method cannot be changed programmatically or using Reflection’s dialog boxes. Use the PropertyIsModifiable method to determine if a property is disabled. Arguments PropertyName Argument Type: String Required Specifies the name of the property. IsEnabled
Argument Type: Boolean Required Specifies whether the named property is enabled. Use True to enable the property, or False to disable.
Example This procedure disables the ShowTerminalFrame property. When an attempt is made to modify this property, an error is returned. After this procedure runs, the Terminal frame check box (on the Options tab in the Display Setup dialog box) is also disabled.
Methods Page 94
Sub DisableShowTerminalFrame With Session 'This command disables the ShowTerminalFrame property .SetPropertyProfile "ShowTerminalFrame", False 'Because ShowTerminalFrame is disabled, this line generates 'an error .ShowTerminalFrame = True End With End Sub Programming with Reflection
SetScanCodeName method Syntax
object.SetScanCodeName ScanType, ScanCode, ScanName
Description Assigns a name to a key’s scan code. This name can then be used to map the key, with SetKeyMap. You only need to use SetScanCodeName if you’re mapping a key on a non-standard keyboardthat is, a keyboard with key names that differ from those on a standard keyboard, or a keyboard whose keys generate scan codes that differ from those generated by a standard keyboard. If you have an IBM PC or XT keyboard, an IBM PC/AT keyboard, an IBM Enhanced 101/102 key keyboard, or a keyboard that matches the key layout of any of these keyboards, you shouldn’t ever need to use SetScanCodeName. Arguments ScanType Argument Type: Enumeration Required Specifies the type of scan code generated by the key. Use one of the following: rcExtendedScanCode An extended scan code is one that starts with E0. When you run the KEYMON utility (supplied with Reflection) to determine your scan code, the first line of output (when you press a key) may look like this: Interrupt 9 scan code: E0h,224d If the first characters after the colon are E0, use rcExtendedScanCode. rcExtendedE1ScanCode Like rcExtendedScanCode, except the scan code starts with E1 instead of E0. rcNormalScanCode If the scan code does not start with E0 or E1, use this value. ScanCode
Argument Type: Integer Required Specifies the decimal value of the scan code. When you run KEYMON and then press a key, it returns three or more lines of information about the key. Most keys return just three lines of data. For example, if you press the m key, this is KEYMON’s response: Interrupt 9 scan code: 32h, 50d Interrupt 16 returns: AH=32h, 60d AL=6Dh, 109d Interrupt 9 scan code: B2h,178d The number preceding the letter d on the first line (that is, 50) is the decimal value of the scan code.
Methods Page 95
ScanName
Argument Type: String Required This string is a name that you make up. The obvious name to use is the name of the key in question, but Reflection will accept any alphanumeric string. This name can then be used with SetKeyMap (as the Key string) to remap this key.
Programming with Reflection
Shell method Syntax
object.Shell Application, [CommandLine], [WindowState], [Wait]
Description Launches an application, or opens a file in an already running application. You can use this method to start an application using the name of an executable file (*.exe, *.com), a file name associated with a particular application (*.doc, *.bmp, *.txt, etc.), or a text string associated with a particular application (such as http or ftp). This method returns an error if Reflection cannot locate a file specified in the Application argument, or if the file is not associated with an application. Arguments Application Argument type: String Required A string that identifies an application. The string can be: •
The name (or complete path) of an executable file. For example, this command launches a new session of Reflection for HP using the name of the executable file: Session.Shell "R1win.exe"
•
The name (or complete path) of a file associated with a particular application. Depending on the application, the Shell command may open a file into an existing copy of the application or it may launch a new copy. For example, this command launches a new session of Reflection for HP using the name of a settings file: Session.Shell "My Settings File.r1w"
•
A text string associated with a particular application. For example, this command locates the web page with the specified URL, launching your browser if necessary: Session.Shell "http://www.wrq.com/"
CommandLine
Argument type: String Optional Use this optional string to specify command line arguments. For example to start Reflection for UNIX and Digital and open a settings file using the /S command line switch: Session.Shell "C:\Program Files\Reflection\R2win.exe", _ "/S ""C:\Program Files\Reflection\MyFile.r2w"""
WindowState
Argument type: Enumeration Optional Specifies the window state for running the application. If you omit this argument, the application uses the default window size.
Methods Page 96
rcMaximized Run the application in a maximized window. rcMinimized Run the application in a minimized window. rcNormal Run the application using the current default size. Wait
Argument Type: Boolean Optional Specifies whether the procedure should wait until an application launched by the Shell method is terminated. If this argument is False or if you omit the argument, the procedure will continue running. If it is True, procedure execution pauses on the Shell command until the launched application is closed. The Shell command does not wait for an application to close if Shell opens a document file into an already running copy of an application.
Note: To use the Shell method to run a DOS command, use the name of the command shell program for your operating system as the Application argument, and the DOS command for the CommandLine argument. The command shell program name is Cmd.exe in Windows NT 4.0. The following command will create a new folder in a machine using Windows NT 4.0: Session.Shell "Cmd.exe", "md ""Test Folder"" " Use a /k switch if you want the DOS window to remain open after the command is completed: Session.Shell "Cmd.exe", "/k dir" The command shell program for Windows 95 is Command.com. The following command will list the files in the current folder. The /k switch is used to keep the DOS window open after the command is completed. Use /c if you want to close the DOS window after the command is completed. You must use one of these switches if you are running under Windows 95. Session.Shell "Command.com", "/k dir"
Programming with Reflection
StartRecording method Syntax
object.StartRecording
Description Starts the Reflection recorder. If the recorder is already running, this method is ignored, and does not generate an error. Note: If you attempt to exit Reflection using the Exit command on the File menu while recording is in progress, the recorder adds the Quit command to the recorded script and opens a dialog box indicating that you must stop recording to exit. Executing the Quit method (from the command line or by calling a script containing this command) closes Reflection without saving the recorded script.
Methods Page 97
Programming with Reflection
StartRecordingExtended method Syntax
object.StartRecordingExtended [Options]
Description Starts the Reflection recorder and supports recording with prompts and silent recording. Use recording with prompts when you want to create a login macro that can be used by different users. When you start recording normally, your user name is entered as text when you record a login macro, and you need to edit the macro if you want it to be work for other users. When you use the recording with prompt otpion, Reflection will display a dialog box when you are recording a macro and you respond to a host prompt. You can use this dialog box to select any of the following options: • Sent the text as you enter it. (This is what happens during normal recording.) • Prompt the user the first time the macro is run using GetLoginProperty. After this initial run, if Admit One is installed, Reflection will get the user name from the Admit One data base. • Ask the user every time the macro is run. (This option uses the InputBox$ funtion to ask for the user name.) • Send the current Windows user name. (This option uses the PCUserName property to return the user name.) Note: Recording with prompts does not affect password prompts. Reflection always creates a macro that prompts for passwords unless the Save Passwords setting is selected (SavePasswords = True), in which case the password is recorded in encrypted form. Use this syntax for recording with prompts: Session.StartRecordingExtended rcWithPrompts When silent recording is selected, the camera icon appears on the taskbar but the recording toolbar is not displayed. If you exit Reflection while silent recording is in progress, Reflection closes without saving the recorded commands. This option is equivalent to StartRecordingSilently. Use this syntax for silent recording: Session.StartRecordingExtended rcSilently Arguments Options
Argument type: Enumeration Optional rcWithPrompts Start recording that can automatically create appropriate dialog boxes when you enter text in response to a host prompts. rcSilently Start silent recording.
Methods Page 98
Programming with Reflection
StartRecordingSilently method Syntax
object.StartRecordingSilently [Options]
Description Starts the Reflection recorder. When this method is used to start recording, the camera icon appears on the taskbar but the recording toolbar is not displayed. If you exit Reflection while recording is in progress, Reflection closes without saving the recorded commands. Arguments Options This optional argument is not currently used.
Programming with Reflection
StartTrace method Syntax
object.StartTrace Filename, [IfFileExists], [TraceFormat]
Description Starts capturing data coming from the host to a disk file. Data being transmitted to the host can also be captured. The captured data includes all escape sequences and control codes, but does not include flow control, such as Xon/Xoff characters. The data is captured in binary format and is not translated in any way. Arguments Filename Argument Type: String Required Specifies the file to which data is written. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the file already exists. The default is rcCancel. The possible values are: rcCancel Generates an error if the file exists. rcOverwrite Overwrites the existing file. rcAppend Appends trace data to the existing file.
TraceFormat
Argument Type: Enumeration Optional Specifies what kind of trace to perform. The default is rcTraceDefault. The possible values are: rcTraceDefault Captures both incoming and outgoing data. The traced data does not include timing information. rcTraceEvents Captures all communications activity, keystrokes, commands, and menu selections. The information is recorded in a proprietary binary format, and must be processed (using the ProcesEventTrace built-in function) to create a readable ASCII file.
Methods Page 99
rcTraceTimed Captures both incoming and outgoing data, and includes information about when data moved between the PC and the host, in HH:MM:SS.hh notation. rcTraceIncomingOnly Captures incoming data only. This option does not format the data in any way, and does not include timing information. Programming with Reflection
StatusBox method Syntax
object.StatusBox Text, [Options]
Description Opens a dialog box that can be used to provide information to the user during macro execution. You can open only one dialog box for each Reflection session. This box remains visible until the CloseStatusBox method is used. You can update the dialog box message by calling StatusBox repeatedly using different values for the Text argument. You can use the Options argument to add a title bar to the dialog box. This title bar allows the user to reposition the box on screen. You cannot include text within the title bar. For example: .StatusBox "Please Wait", rcStatusBoxTitleBar Arguments Text
Options
Argument type: String Required The message to appear in the dialog box. This string can be up to 256 characters long; however the dialog box is a fixed size, and long messages may be truncated. Argument type: Enumeration Optional Use this argument to include a title bar. When this argument is omitted, the dialog box contains no title bar. rcStatusBoxTitleBar Include a title bar in the dialog box.
Example This example displays a status box that changes during a wait. Because a title bar is included, the status box can be moved during the wait. Sub DisplayStatusDialogBox () Dim i as Integer With Session 'Display a status box, updating the text during a wait. For i = 1 to 10 .StatusBox "Seconds remaining: " & str$(11 - i), rcStatusBoxTitleBar .Wait "1", rcAllowKeystrokes Next i 'Close the Status Box. .CloseStatusBox End With End Sub
Methods Page 100
Programming with Reflection
StopMacro method Syntax
object.StopMacro
Description Stops a currently running macro. This method is not useful within a macro. Stop or End Sub is recommended for terminating a macro. StopMacro is provided primarily for mapping to Reflection features, such as keys and toolbar buttons, and for use in external applications (like stand-alone Visual Basic). Programming with Reflection
StopRecording method Syntax
object.StopRecording Filename, Target, [IfFileExists]
Description Stops recording and creates a Reflection Basic script. If the recorder is already stopped, this method returns without generating an error. Arguments Filename Argument Type: String Required Specifies the name of the Reflection Basic script file to be created. Target
Argument Type: Enumeration Required Specifies the language in which actions are to be recorded. The possible values are: rcRBSource Saves the actions as Reflection Basic commands. rcVBSource Saves the actions as Visual Basic commands. rcRCLSource Saves the actions as RCL commands.
IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the file already exists. The possible values are: rcCancel Generates an error if the file already exists. rcOverwrite Overwrites (replaces) the existing file If this argument is omitted, the default value (rcCancel) is used.
Methods Page 101
Programming with Reflection
StopRecordingMacro method Syntax
object.StopRecordingMacro Destination, [Name], [Description], [Options]
Description Stops recording in Reflection and saves recorded commands to a macro or to the Clipboard. The following statement stops macro recording and saves the recorded commands to a macro named “MyMacro” with no description: Session.StopRecordingMacro rcMacro, "MyMacro" Note: Use SaveSettings to save the settings file containing the macro. Arguments Destination
Argument type: Enumeration Required Specifies the destination of the recorded code. rcMacro Save the recorded actions as a macro in the current Reflection session. You must specify a Name if you use rcMacro. Note: Macros are not saved until you save your settings file. You can use SaveSettings to save settings files programmatically. rcClipboard Copy the recorded actions to the Clipboard. You must specify a Name if you use this value. rcDiscard Discard the recorded macro.
Name
Argument type: String Optional This argument is required if Destination is either rcMacro or rcClipboard. If Destination is rcMacro, Name specifies the macro name. If Destination is rcClipboard, Name specifies the procedure name.
Description
Argument type: String Optional This argument is relevant only when Destination is rcMacro. Use this for the macro description. This string can be up to 260 characters long.
Options
Optional Omit this argument; it is not currently used.
Methods Page 102
Programming with Reflection
StopScript method Syntax
object.StopScript
Description Stops a currently running Reflection Basic script. This method is not useful within a macro. Stop or End Sub is recommended for terminating a script. StopScript is provided primarily for mapping to keys and buttons, and for use in external applications (like stand-alone Visual Basic). Note: This method also interrupts a currently running macro, and is equivalent to the newer StopMacro method. Programming with Reflection
StopTrace method Syntax
object.StopTrace
Description Stops capturing incoming host data to a file and closes the trace file. Programming with Reflection
SuspendConnection method Syntax
ConnectionID = object.SuspendConnection
Description Suspends the current host connection (so that it can be resumed later with ResumeConnection). Return ConnectionID Return type: Long A numeric identifier for the suspended connection that can be used to later resume the connection. Programming with Reflection
Transmit method Syntax
object.Transmit String, [Options]
Description Transmits a string to the host. Arguments String Argument Type: String Required Specifies the string to transmit. Options
Methods Page 103
Argument Type: Enumeration Optional Specifies additional behavior for the method. You can combine two or more options using addition as shown here: .Transmit "Hello", rcNoTranslation + rcIgnoreBlockMode
rcNoTranslation Indicates that the string should not be translated from the PC character set into the host character set. rcIgnoreBlockMode Indicates that keyboard text should be transmitted even if Reflection is in block mode. Without this option, transmitted data goes into display memory when Reflection is in block mode. rcDecodePassword Use rcDecodePassword to transmit encoded passwords to the host. Passwords are encoded when they are recorded by the Reflection recorder to ensure that they cannot be read in the source code of the recorded procedure. (The recorder records passwords only when SavePasswords is True.) Encoded passwords are also returned by the GetPassword method. Note: This option is ignored if you are transmitting a password that is not encoded. rcHexData Indicates that portions of a string that follow a backslash should be interpreted using either hexadecimal code or C-language character conventions. For example, the following statement displays the fraction symbol ¼ (using the decimal code x0BC), followed by a carriage return (using the \r special character). .Display "\x0BC\r", rcHexData
Programming with Reflection
TransmitFile method Syntax
object.TransmitFile Filename, [PauseTime], [PromptChar], [Options]
Description Transmits the specified file to the host. If the ReadTabAsSpaces property is True and the rcNoTranslation option is not specified, tab characters in the file are converted to spaces as they are transmitted to the host. If the ReadCtrlZAsEOF property is True and the rcNoTranslation option is not specified, a Ctrl+Z character in the file will terminate the method. Arguments Filename Argument Type: String Required The name of the file to transmit. Supply complete path information if the file isn’t on the Reflection Basic path. PauseTime
Methods Page 104
Argument Type: String Optional Specifies the amount of time to pause between each line of the file, in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection does not pause between lines (though it may wait for PromptChar if one is specified).
PromptChar
Argument Type: String Optional Specifies a character Reflection is to wait for between lines of the file. If this argument is omitted, Reflection does not wait for a prompt character between lines (though it may pause if a PauseTime is specified).
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcNoTranslation Indicates that the file contains binary data, and should not be translated from the PC character set into the host character set. Use this option if the file contains characters that are already in the host character set. rcNoDisplay Specifies that incoming characters should not be displayed in the terminal window while waiting for the PromptChar or for PauseTime at the end of a line. If both of the PauseTime and PromptChar arguments are omitted, this option has no effect (the method does not read incoming data from the host). To combine the two options, use the addition operator: rcNoTranslation + rcNoDisplay.
Programming with Reflection
TransmitTerminalKey method Syntax
object.TransmitTerminalKey KeyID
Description Simulates the pressing of a terminal key. Arguments KeyID Argument Type: Enumeration Required A terminal key constant. For a list of terminal key constants, open the Reflection Type library in the object browser and look under TerminalKeys. Note: You can use the recorder to determine the appropriate constant for any particular keystroke, or use the Reflection Keyboard Setup dialog box. When you click on a key in the terminal keyboard, you’ll see an identifier, such as VtF8 or HPF2, at the bottom of the dialog box. The terminal key constant is this identifier preceded by "rc" and followed by "Key", for example so the VtF8 key is identified by rcVtF8. Programming with Reflection
UNIX Host File Attributes The following table shows the valid UNIX host file attributes you can specify in the Attributes argument to the WRQSendFile method. The Attributes argument takes a string value, and therefore must be enclosed in quotation marks. Multiple attributes are separated by a space.
Methods Page 105
Attribute -m
Value 4000 2000 1000 0400 0200 0100 0040 0020 0010 0004 0002 0001
-o
-g
Meaning\Syntax Example Sets the “mode” value. Set user ID on execution. Set group ID on execution. Sticky bit. Owner has read permission. Owner has write permission. Owner has execute permission. Group has read permission. Group has write permission. Group has execute permission. Others have read permission. Others have write permission. Others have execute permission. "-m 0777" gives the owner, group, and others read, write, and execute permissions. Specifies the owner for the file. The value specified must correspond to a valid login name or user ID in the specified group. "-o joant" Specifies the group of the file’s owner. The value specified must correspond to a valid group name or group ID on the UNIX host. "-g users"
The mode value is determined by adding the values for the permissions you want to assign. For example, because “Owner has read permission" has a value of 0400 and “Owner has write permission” has a value of 0200, you would specify a mode value of 0600 (the sum of the two modes) to assign read and write permission to the owner of the file. To assign read, write, and execute permission for the owner, add 0400, 0200, and 0100 to get 0700. To assign full permissions for owner, read and write permissions for the group, and read and write permissions for others, add all relevant values, for a mode value of 0766. The default mode setting is 0644 (read and write permission for the owner, read permission only for group and others). The default owner is the person logged in when the file is created or transferred to the host; the default group is the owner’s login group. Adding the “Set user ID on execution” value (4000) to the mode value when transferring an executable file specifies that the owner’s permissions should determine access when the file is run, rather than the permissions of the person running the program. Adding the “Set group ID on execution” value (2000) specifies that the permissions of the login group of the person running the file should determine access as the file is running. See chmod (1) in your UNIX documentation for more information. Example The following example shows a possible WRQSendFile command for transferring a file to a UNIX host, with joant as the owner and users as the group. Read and write permissions are assigned for both the owner and the group: Session.WRQSendFile "FILE.TXT", "FILE.TXT", rcASCII,,_ ,,,"-m 0660 -o joant -g users"
Methods Page 106
Programming with Reflection
UnlockProfile method Syntax
Unlocked = object.UnlockProfile Password
Description Unlocks the current command profile, allowing calls to SetCommandProfile and SetCommandGroupProfile. Arguments Password Argument Type: String Required String argument specifying the password used in a previous call to LockProfile. Return Unlocked
Return type: Boolean True if the Password argument was correct and the command profile was unlocked; False otherwise.
Programming with Reflection
VMS File Name Switches The following table shows the valid VMS file name switches you can append to the host name when using the WRQSendFile or WRQReceiveFile method. Most switches are valid for only one direction of transfereither sending or receivingalthough some switches are valid in both directions. Most switches also have an equivalent property you can set to cause the same effect; using a switch affects only the current transfer, whereas using the property affects all subsequent transfers until its value is changed. Switch Equivalent Property Meaning Direction /A none Update maximum record length; valid Send for ASCII transfers only/. /B WRQUseBlockReads Force block mode reads; valid for Receive binary transfers only. /C WRQSubmitBatch Submit file to batch queue. Send /D WRQPreserveCounts Determines whether record byte countsBoth are transferred with data; valid for binary transfers only. /F none Create file with fixed-length records; Send valid for binary transfers only. /I WRQTransferWithAttribute Transfer file as image format. Both s (binary transfers) /K WRQKeepFile Keep file sent to batch or print queue. Send /L none Compatibility switch for old VAXLINK Send protocol; valid for binary transfers only. /P WRQTranslateCCtl Translate Print/Fortran carriage Receive control. /S WRQSubmitPrint Submit file to printer queue. Send /T WRQTranslateCCtl Throw away Print/Fortran carriage Receive control. /V none Force variable-length records. Send
Methods Page 107
Example The following example shows a possible WRQSendFile command for transferring a file to a VMS host, submitting it to the print queue and keeping the file afterwards: Session.WRQSendFile "FILE.TXT", "FILE.TXT/S/K", rcASCII Programming with Reflection
VMS Host File Attributes The following table shows the valid VMS host file attributes you can specify in the Attributes argument to the WRQSendFile method. The Attributes argument takes a string value, and therefore must be enclosed in quotation marks. Multiple attributes are separated by a space. Attribute OWNER_UIC
Values
Meaning/Syntax Example UIC for alternate owner of file. "/OWNER_UIC=[1,1]" "/OWNER_UIC=FRED"
PROTECTION
SYSTEM, OWNER, GROUP, WORLD
Alternate protection for destination fileR(ead), W(rite) E(xecute), and D(elete) protection can be specified for SYSTEM, OWNER, GROUP, and WORLD. "/PROTECTION=(GROUP:RWE,WORLD:WE)"
ALLOCATION
Number of blocks initially allocated for the file at the time of creation. By default, or if you specify a value of 0, the entire file is preallocated. "/ALLOCATION=(10)"
OPTIONS
BEST_TRY_CONTIGUOUS CONTIGUOUS
ATTRIBUTES
CARRIAGE_RETURN FORTRAN NONE PRINT BLOCK_SPAN NOBLOCK_SPAN
FORMAT
FIXED STREAM STREAM_CR STREAM_LF
Methods Page 108
Create contiguous file if possible. Create contiguous file; transfer fails if not possible. "/OPTIONS=(CONTIGUOUS)"
Carriage-return carriage control. FORTRAN carriage control. No carriage control. Print carriage control. Records are allowed to cross block boundaries. Records are not allowed to cross block boundaries. "/ATTRIBUTES=(FORTRAN)" Fixed-size record format. Stream record format. Stream carriage return record format. Stream linefeed record format.
UNDEFINED VARIABLE VFC
SIZE
Undefined record format. Variable-length record format. Variable-length with fixed-length control records. Required with /ATTRIBUTES=(PRINT). Set DISABLETRANSLATION to YES if you’re using this option to create host ASCII files. "/FORMAT=(VFC)" Maximum record size. "/SIZE=(100)"
For ASCII file transfers to a VMS host, the following defaults apply: • variable-length records • carriage-return carriage control • no maximum record length • default file protection For BINARY and IMAGE transfers to a VMS host, the following defaults apply: • fixed-length records • no carriage control • 512-byte records • default file protection Example A possible WRQSendFile command for transferring a file to a VMS host with attributes is: Session.WRQSendFile "FILE.TXT", "FILE.TXT", rcBinary,_ ,,,,"/OPTIONS=(CONTIGUOUS) /FORMAT=(FIXED) /SIZE=(256)" These attributes create a fixed-format contiguous binary file with 256-byte records. Programming with Reflection
Wait method Syntax
object.Wait HowLong, [Options]
Description Waits for the specified period of time. Incoming data is processed during the wait. When waiting from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. The following statement instructs Reflection to wait for 30 seconds, allowing keystrokes during the wait: Session.Wait "30", rcAllowKeystrokes Arguments HowLong
Methods Page 109
Argument Type: String Required Specifies the amount of time to wait. The string is specified in HH:MM:SS.hh format.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. The possible values are: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming characters should not be displayed in Reflection’s terminal window during the wait. You can combine the two options using the addition operator (+): rcAllowKeystrokes + rcNoDisplay.
Programming with Reflection
WaitEvent method Syntax
Event = object.WaitEvent(Timeout, [Options] )
Description Waits for any of the defined events to occur. Events are defined with the DefineEvent method. The procedure containing the command is paused until the wait expires or is satisfied. Arguments TimeOut Argument type: String Required Specifies an interval of time in HH:MM:SS.hh format. If this interval elapses before any events occur, the method returns zero (0). Options
Argument type: Enumeration Optional Specifies additional, non-default behavior for the method. There is one option for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.
Return Event
Return type: Integer Returns the number assigned (with DefineEvent) to an event that has occurred. If no events are satisfied before the timeout period elapses, the return value is 0.
Note: When a wait is satisfied, the status of the event is reset. Until the event is removed (using RemoveEvent or ClearEvents ) it will be satisfied again after this point when the conditions of the defined event have once again been met. You can use WaitEventNumber to wait for a specific defined event.
Methods Page 110
Programming with Reflection
WaitEventNumber method Syntax
Found = object.WaitEventNumber(Event, TimeOut, [Options])
Description Waits for the occurrence of the specified event, defined with the DefineEvent method. The procedure containing the command is paused until the wait expires or is satisfied. Arguments Event Argument type: Integer Required The event for which to check. The event number is assigned by the Event argument of DefineEvent. TimeOut
Argument type: String Required Specifies an interval of time in HH:MM:SS.hh format. If this interval elapses before any events occur, an error occurs.
Options
Argument type: Enumeration Optional Specifies additional, non-default behavior for the method. There is one option for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.
Return Found
Return type: Boolean True if the specified event was satisfied, or False if the event was not satisfied before the method timed out.
Note: When a wait is satisfied, the status of the event is reset. Until the event is removed (using RemoveEvent or ClearEvents ) it will be satisfied again after this point when the conditions of the defined event have once again been met.
Programming with Reflection
WaitForCall method Syntax
object.WaitForCall [Description], [InitString]
Description Initializes the modem to automatically answer an incoming call and opens a status dialog box until a connection has been established. This method does not check to see whether a modem is actually connected to the serial port; it simply transmits the Hayes “AT” command to get the modem’s attention, then transmits the “ATS0=1” command to place the modem in answer mode. If the command fails for any reason, no error is returned. The procedure continues to the next statement only after the status box is dismissed (either because the modem established a connection, the user canceled, or the dialog box timed out). Arguments Description Argument Type: String Optional Specifies a message to be displayed in the Waiting for Call dialog box.
Methods Page 111
InitString
Argument Type: String Optional Specifies an initialization string to be sent to the modem before waiting. If this argument is omitted, Reflection uses the default initialization string configured for the modem.
Programming with Reflection
WaitForEvent method Syntax
Found = object.WaitForEvent(EventType, Timeout, [String], [Row], [Column], [Key], [Options])
Description Begins a wait that is satisfied by the occurrence of the specified event. The procedure containing the command is paused until the wait expires or is satisfied. Use the Options argument to allow keystrokes during the wait. Arguments EventType Argument type: Enumeration Required The event to wait for. The values are: rcSilence Defines an event as the absence of activity (data from the host) for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format. rcKbdEnabled Defines an event as the keyboard being unlocked for the specified duration. Use the String argument to specify an interval of time in HH:MM:SS.hh format. rcEvConnected Defines an event as a host connection being established. No additional arguments are needed for this event type. rcEvDisconnected Defines an event as a host connection becoming disconnected. No additional arguments are needed for this event type. rcEnterPos Defines an event as the positioning of the cursor at the specified screen coordinates, specified by the Row and Column arguments. For the event to occur, the cursor must be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time. rcExitPos Defines an event as the positioning of the cursor at any location on the screen other than specified coordinates. Use the Row and Column arguments to specify coordinates. For the event to occur, the cursor must have previously been at the coordinates, and now must not be at the specified coordinates. To specify any row or column, use the value rcAnyRow or rcAnyCol, but not both at the same time.
Methods Page 112
rcCommString Defines an event as the reception of the specified string from the host. Use the String argument to specify the string. rcDisplayString Defines an event as the specified string appearing at the specified row and column coordinates in the terminal window. Use the String argument to specify the string. Use Row and Column to specify coordinates. To specify any row or column, use rcAnyRow and/or rcAnyCol for Row and Column. rcTimeOfDay Defines an event as the current time matching the specified clock time. Use the String argument to specify the time of day in HH:MM:SS.hh format using a 24-hour clock (00:00:00-23:59:59). rcTime Defines an event as the passage of the specified amount of time from when the event is defined. Use the String argument to specify the interval of time in HH:MM:SS.hh format. rcBlockModeEnter The terminal has entered block mode. No additional arguments are needed for this event type. rcBlockModeExit The terminal has exited block mode. No additional arguments are needed for this event type. rcFileTransferDone A file transfer has successfully completed. No additional arguments are needed for this event type. rcTerminalKeystroke Defines an event as the transmission of the specified terminal key to the host. The Key argument defines the host function. The Key argument defines the host function. Note: Use the Options argument to allow keystrokes during the wait. TimeOut
Argument type: String Required Specifies an interval of time in HH:MM:SS.hh format. The wait terminates if this amount of time passes without the specified event occurring. If this method times out, an error is returned—use of an error handler is recommended.
String
Argument type: String Optional Specifies the string that defines string-oriented events. Use this argument when the value you use for EventType requires a string—that is, when EventType is rcSilence, rcKbdEnabled, rcCommString, rcDisplayString, rcTimeOfDay, or rcTime.
Row
Argument type: Integer or Enumeration Optional Specifies the row location for screen events. Use a row number to specify a particular row, or use rcAnyRow to specify that the event can occur at any row location. Use this argument when EventType is rcEnterPos, rcExitPos, or rcDisplayString.
Methods Page 113
Column
Argument type: Integer or Enumeration Optional Specifies the column location for screen events. Use a column number to specify a particular column, or use rcAnyCol to specify that the event can occur at any column location. This argument is relevant when EventType is rcEnterPos, rcExitPos, or rcDisplayString.
Key
Argument Type: Enumeration Optional Specifies a terminal key constant when EventType is rcTerminalKeystroke. For a complete list of terminal key constants, open the Reflection Type library in the object browser and look under TerminalKeys. To determine the appropriate constant for a particular keystroke, use the Reflection Keyboard Setup dialog box. When you click on a key in the terminal keyboard, you’ll see an identifier, such as VtF8 or HPF2, at the bottom of the dialog box. The terminal key constant is this identifier preceded by “rc” and followed by “Key”, so the terminal key constant for VtF8 is rcVtF8Key.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There is one option for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.
Return Found
Return type: Boolean True if the specified event was satisfied, or False if the event was not satisfied before the method timed out. If no Timeout is specified, this method cannot return False.
Programming with Reflection
WaitForHostTrigger method Syntax
Found = object.WaitForHostTrigger([Timeout], [Options])
Description In Reflection for HP, this method waits for the host input prompt (trigger) character. An HP 3000 sends a DC1 character to indicate that it is ready for input. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, there is no actual wait (that is, this method has no effect). Incoming data is processed during the wait. This method returns True immediately if there is no HostTriggerCharacter configured or if a host trigger character has been received since the last carriage return was sent to the host. WaitForHostTrigger actually waits for a host prompt only if all of the following conditions are met: • The method is being executed in Reflection HP. • A host prompt character has been configured (for example, with the HostTriggerCharacter property). • The host trigger has not been disabled (for example, with the Inhibit Handshake property). • At least one host prompt character has been received. • A carriage return has been sent since the last host prompt character has been received. If any of these conditions is not met, WaitForHostTrigger returns True immediately. In addition, this method is not satisfied by a host trigger character that is used to satisfy a status request.
Methods Page 114
When waiting from an external application (like stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments Timeout Argument Type: String Optional Specifies the amount of time to wait for the host trigger character to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is an empty string (""), Reflection waits forever if the trigger character is not received. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming characters should not be displayed in the terminal window. You can combine the two options using the addition operator (+): rcAllowKeystrokes + rcNoDisplay.
Return Found
Return type: Boolean True if the host input trigger is received, or False if the host input trigger is not received before the method times out. If no Timeout is specified, this method cannot return False.
Programming with Reflection
WaitForIncomingData method Syntax
Found = object.WaitForIncomingData([Timeout], [Options])
Description Waits until data is received from the host. Timeout Argument Type: String Optional Specifies the amount of time to wait for data from the host. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is an empty string (""), Reflection continues to wait throughout the current session. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There is only one available option: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.
Methods Page 115
Return Found
Return type: Boolean True if host data is received, or False if the method times out before any host data is received. If no Timeout is specified, this method cannot return False.
Note: The same incoming data that satisfies WaitForIncomingData will also satisfy subsequent wait commands such as WaitForString or WaitForStrings. In the following example, if the word “hello” is received by the host, the initial character “h” will satisfy WaitForIncomingData and will also be seen by WaitForSting, so both actions will be performed. .WaitForIncomingData .WaitForString "hello" Example In this example, Reflection will run minimized until data is received from the host, at which time the Reflection window will return to its normal size and become the active window: Sub WaitMinimized () With Session .WindowState = rcMinimized .WaitForIncomingData, rcAllowKeystrokes .WindowState = rcNormal .Activate End With End Sub
Programming with Reflection
WaitForSilence method Syntax
Found = object.WaitForSilence(SilenceTime, [Timeout], [Options])
Description Wait for a specified period of datacomm “silence” (no incoming characters). When waiting from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments SilenceTime Argument Type: String Required Specifies the interval of datacomm silence to wait for. The string is specified in HH:MM:SS.hh format. If SilenceTime is 0, this method returns immediately, with Found set to True. Timeout
Methods Page 116
Argument Type: String Optional Specifies the amount of time to wait for the period of datacomm silence. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is an empty string (""), Reflection waits forever if a sufficiently long period of silence does not occur.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming datacomm characters should not be displayed in the terminal window during the wait. You can combine the two options using the addition operator (+): rcAllowKeystrokes + rcNoDisplay.
Return Found
Return type: Boolean This method returns True if the specified period of datacomm silence was observed, or False if datacomm silence was not observed before the Timeout expired. If no Timeout is specified, this method cannot return False.
Programming with Reflection
WaitForString method Syntax
Found =
object.WaitForString(String, [Timeout], [Options])
Description Waits for a specified string to be received from the host. When waiting from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments String Argument Type: String Required The string for which to wait. Reflection considers case (the incidence of uppercase and lowercase letters) in testing incoming data for a matching string. If String is an empty string (""), this method returns immediately without reading incoming data. Timeout
Argument Type: String Optional Specifies the amount of time to wait for the string to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits forever if the string is not received.
Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are three options for this method. You can combine two or more options using addition as shown here: .WaitForString "Hello", , rcAllowKeystrokes +_ rcNoDisplay rcAllowKeystrokes
Methods Page 117
Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming datacomm characters should not be displayed in the terminal window during the wait. rcNoTranslation Specifies that the string contains binary data. Binary data is matched exactly as it is received from the host without any host-to-PC character translation. rcHexData Indicates that portions of a string that follow a backslash should be interpreted using either hexadecimal code or C-language character conventions. For example, the following statement waits for the fraction symbol ¼ (specified using the decimal code x0BC) followed by a carriage return (specified using the \r special character): .WaitForString "\x0BC\r", rcHexData Return Found
Return type: Boolean True if the specified string was received from the host, or False if the string was not received before the method timed out. If no Timeout is specified, this method cannot return False.
Programming with Reflection
WaitForStrings method Syntax
WhichString = object.WaitForStrings(StringsArray, [Timeout], [Options])
Description Waits for any one of two or more strings to be received from the host. While waiting from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Because this method uses an array, you cannot use it from Visual Basic version 3.0, which does not support the passing of arrays. Arguments StringsArray Argument Type: String array Required Specifies one or more strings for which to wait. Reflection considers case (the incidence of uppercase and lowercase letters) in testing incoming data for a matching string. Timeout
Argument Type: String Optional Specifies the amount of time to wait for one of the specified strings to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits forever if none of the strings is received.
Options
Argument Type: Enumeration Optional
Methods Page 118
Specifies additional, non-default behavior for the method. There are three options for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming datacomm characters should not be displayed in the terminal window. rcNoTranslation Specifies that the StringsArray parameter contains binary data. Binary data is matched exactly as it is received from the host without performing host-toPC character set translation. You can combine two or more options using the addition operator (+). For example: rcAllowKeystrokes + rcNoDisplay. Return WhichString
Return type: Integer A number indicating which item in the StringsArray array was found. If the first item is found, 1 is returned; if the second item is found, 2 is returned; and so on. If none of the strings are received before the Timeout time expires, False (0) is returned. If no Timeout is specified, this method cannot return False.
Example This example waits 10 seconds for "Username", "Password", or "Disconnected" to be received from the host. Sub WaitDemo () Dim array(1 to 3) As String array(1) = "Username" array(2) = "Password" array(3) = "Disconnected" Select Case Session.WaitForStrings(array, ":10", _ rcAllowKeystrokes) Case 1: MsgBox "Username" & " found." Case 2: MsgBox "Password"& " found." Case 3: MsgBox "Disconnected"& " found." Case Else ' Timed out End Select End Sub
Methods Page 119
Programming with Reflection
WaitUntil method Syntax
object.WaitUntil DateTime, [Options]
Description Waits until a specific date and time. Incoming data is processed during the wait. When waiting from an external application (such as stand-alone Visual Basic), the ProcessDatacomm property should be set to False to prevent Reflection from reading and processing characters between calls to Reflection methods. Arguments DateTime Argument Type: Date/Time Required Specifies when the wait should end. If you specify a time but not a date, Reflection Basic assumes the current date. If you supply a time without a date, Reflection Basic waits until the specified time on the current day. If the time has already passed, the wait is satisfied immediately—it does not wait until the specified time on the following day. You can use a “date literal” as the value for this argument. A date literal is enclosed in pound signs (#) and can be in any “human-readable” format. For example: #January 1, 1997 10:00# #1/1/97 23:13# #10:15am# If you don’t specify a date, Reflection Basic assumes the current date. Options
Argument Type: Enumeration Optional Specifies additional, non-default behavior for the method. There are two options for this method: rcAllowKeystrokes Specifies that the user is allowed to enter keystrokes in the terminal window during the wait. rcNoDisplay Specifies that incoming datacomm characters should not be displayed in the terminal window during the wait.
Example The following example prompts for a date and time, and then waits until that date and time: Sub WaitForDateAndTime () Dim datum As String datum = InputBox$("Current time is " & Time & _ ". Enter a time and date to wait until:") Session.WaitUntil CVDate(datum), rcAllowKeystrokes Print "Time's up!" End Sub
Methods Page 120
Programming with Reflection
WRQReceiveFile method Syntax
object.WRQReceiveFile LocalFile, RemoteFile, [TransferType], [IfFileExists], [Before], [Since], [Exclude]
Description Transfers one or more files from the host to the PC using the WRQ/Reflection file transfer protocol. For example, the following command transfers the “Beach.bmp” file to the “C:\Windows” folder in the local PC. The transfer type is binary and if there are existing files with the same name on the PC, Reflection opens a dialog box that asks the user what action to take. Session.WRQReceiveFile "C:\Windows", "Beach.bmp", rcBinary, rcAskUser Arguments LocalFile
Argument Type: String Required Specifies a local file. This string can be empty or can contain just drive and path information, in which case the host file name is used to generate a local file name. This string cannot contain wildcard characters.
RemoteFile
Argument Type: String Required Specifies a host file. This string can contain wildcard characters (to transfer multiple files). The wildcard characters must be appropriate for the host system. You can also append “switches” to the host file name to modify the way the file is handled during the transfer.
TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default value is rcASCII. The possible values are: rcASCII ASCII file transfer. Applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. rcBinary Binary file transfer. Data in the file is not translated as it is transferred. rcImage Image/Labels transfer (rcLabels is a valid synonym).
IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the received file already exists on the PC. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcUpdate Performs the transfer only if the host file is newer than the PC file.
Methods Page 121
rcDelete Deletes (overwrites) the existing file. rcAppend Appends the contents of the host file to the existing PC file. rcRename Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on, up to 999. rcSkip Skips the file (the transfer does not take place, but no error is returned). Before
Argument Type: Date/Time Optional Specifies a date and time. Only host files created or modified before the specified date and time are transferred.
Since
Argument Type: Date/Time Optional Specifies a date and time. Only host files created or modified after the specified date and time are transferred.
Exclude
Argument Type: String Optional Specifies one or more files to be excluded from a wildcard transfer. The file names can include wildcards.
Programming with Reflection
WRQSendFile method Syntax
object.WRQSendFile LocalFile, RemoteFile, [TransferType], [IfFileExists], [Before], [Since], [Exclude], [Attributes]
Description Transfers one or more files from the PC to the host using the WRQ/Reflection file transfer protocol. For example, the following command transfers all *.doc files in the current folder to the host the same names on the host. The transfer type is binary and any existing files on the host will be overwritten. Session.WRQSendFile "*.doc", "", rcBinary, rcDelete Arguments LocalFile
RemoteFile
Methods Page 122
Argument Type: String Required Specifies a local file. This string can contain PC wildcard characters (to transfer multiple files). Argument Type: String Required Specifies a host file. This string cannot contain wildcard characters. If this string is an empty string (""), the local file name is used to generate the host file name. You can also append “switches” to the host file name to modify the way the file is handled during the transfer.
TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcASCII. The possible values are: rcASCII ASCII file transfer. Applies the ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box) to the data in the file as it is transferred. rcBinary Binary file transfer. Data in the file is not translated as it is transferred. rcImage Host to host Image/Labels transfer (rcLabels is a valid synonym). rcAutoDetect File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList TransferAutoDetectImageLabelsExtensionList TransferAutoDetectScanExtensionList
IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the file already exists on the host. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcUpdate Performs the transfers only if the local file is newer than the host file. rcDelete Deletes (overwrites) the existing file. For VMS host files, this option purges all earlier instances of the same file. For HP host files, this option performs a file purge any host file of the same name. rcOverwrite For transfers to an HP host, rcOverwrite replaces the data in a file, but doesn’t change the file’s attributes (characteristics). This can be a problem in overwriting a smaller file with a larger one, because the rcOverwrite option will not allocate new records to accommodate the additional data. Use rcDelete in such cases. For transfers to a VMS host, rcOverwrite replaces only the most recent instance of the file on the host (use rcDelete to delete all earlier instances of the file).
Methods Page 123
rcAppend Appends the contents of the PC file to the existing host file. rcRename Renames the file being transferred. The existing file retains the original name. The last three characters of the file being transferred are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on, up to 999. rcSkip Skips the file (the transfer does not take place, but no error is returned). Before
Argument Type: Date/Time Optional Specifies a date and time. Only PC files created or modified before the specified date and time are transferred.
Since
Argument Type: Date/Time Optional Specifies a date and time. Only PC files created or modified after the specified date and time are transferred.
Exclude
Argument Type: String Optional Specifies one or more files to be excluded from a wildcard transfer. The file names can include wildcards.
Attributes
Argument Type: String Optional Specifies host file attributes to be used. If this argument is omitted, default host file attributes are used.
Programming with Reflection
WRQStartServer method Syntax
object.WRQStartServer
Description Starts the WRQ/Reflection protocol host server in preparation for multiple file transfers. Most menu commands and all toolbar buttons are disabled when Reflection is in server mode. Programming with Reflection
WRQStopServer method Syntax
object.WRQStopServer
Description Stops the WRQ/Reflection protocol host server started by WRQStartServer.
Methods Page 124
Programming with Reflection
XmodemReceiveFile method Syntax
object.XmodemReceiveFile LocalFile, [TransferType], [IfFileExists]
Description Transfers a file from the host to the PC, using the Xmodem file transfer protocol. Arguments LocalFile Argument Type: String Required Specifies the local file name to use for the file. This string can contain drive and path information. This string cannot contain wildcard characters. TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcBinary. The possible values are: rcASCII Specifies an ASCII file transfer. If the XmodemTranslateCharacters property is set to True, the following translations are performed: •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If XmodemTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl+Z character may still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary Binary file transfer. Data in the file is not translated as it is transferred. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the sent file already exists on the PC. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcDelete Deletes (overwrites) the existing file. rcAppend Appends the contents of the host file to the existing PC file.
Methods Page 125
Programming with Reflection
XmodemSendFile method Syntax
object.XmodemSendFile LocalFile, [TransferType]
Description Transfers a file from the PC to the host, using the Xmodem file transfer protocol. Arguments LocalFile Argument Type: String Required Specifies a local file. This string cannot contain wildcard characters. TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcBinary. The possible values are: rcASCII Specifies an ASCII file transfer. If the XmodemTranslateCharacters property is set to True, the following translations are performed: •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If XmodemTranslateCharacters is set to False, carriage return/linefeed sequences may still be translated to record separator characters (if the ConvertEOLToSeparator property is set to True), and a Ctrl+Z character may still be read as an end-of-file indicator (if the ReadCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary Binary file transfer. Data in the file is not translated as it is transferred. rcAutoDetect File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Methods Page 126
Programming with Reflection
ZmodemReceiveFile method Syntax
object.ZmodemReceiveFile LocalFile, [RemoteFile], [TransferType], [IfFileExists]
Description Transfers one or more files from the host to the PC, using the Zmodem file transfer protocol. Arguments LocalFile Argument Type: String Required Specifies the local file name to use for the file. This string can contain drive and path information. It can also be just a folder name or an empty string, in which case the host file name is used to generate a local file name. This string cannot contain wildcard characters. RemoteFile
Argument Type: String Optional The host file name. In most situations, the host determines the host file name and you can omit this argument; if you specify a name, it will be ignored.
TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcBinary. The possible values are: rcASCII Specifies an ASCII file transfer. If the ZmodemTranslateCharacters property is set to True, the following translations are performed: •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If ZmodemTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl+Z character may still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary Binary file transfer. Data in the file is not translated as it is transferred. IfFileExists
Argument Type: Enumeration Optional Specifies what to do if the sent file already exists on the PC. The default is rcCancel. The possible values are: rcAskUser Prompts the user to specify what should be done. rcCancel Stops the transfer. rcDelete Deletes (overwrites) the existing file.
Methods Page 127
rcAppend Appends the data to the existing file. rcRename Renames the file being transferred if a file of the same name already exists on the destination system. The last three characters of the existing file’s name are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on, up to 999. rcResume Resumes a canceled receive. If the file already exists on the PC, Reflection assumes it is there as the result of an aborted transfer. Reflection therefore resumes the transfer at the point of interruption. rcUpdate Performs the transfers only if the host file is newer than the PC file. rcUseRemote Uses the IfFileExists option specified by the remote system. If the remote system doesn’t specify an IfFileExists , this option is equivalent to rcCancel. Programming with Reflection
ZmodemSendFile method Syntax
object.ZmodemSendFile LocalFile, RemoteFile, [TransferType]
Description Transfers one or more files from the PC to the host, using the Zmodem file transfer protocol. Arguments LocalFile Argument Type: String Required Specifies a local file. This string can contain wildcard characters (to send multiple files). RemoteFile
Argument Type: String Required Specifies a host file. This string cannot contain wildcard characters. If this string is empty or contains a path but no file name, the local file name is used to generate a host filename.
TransferType
Argument Type: Enumeration Optional Specifies what type of file is being transferred. The default is rcBinary. The possible values are: rcASCII Specifies an ASCII file transfer. If the ZmodemTranslateCharacters property is set to True, the following translations are performed:
Methods Page 128
•
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If ZmodemTranslateCharacters is set to False, carriage return/linefeed sequences may still be translated to record separator characters (if the ConvertEOLToSeparator property is set to True), and a Ctrl+Z character may still be read as an end-of-file indicator (if the ReadCtrlZAsEOF property is set to True), but no other translations are performed. rcAutoDetect File transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList rcBinary Binary file transfer. Data in the file is not translated as it is transferred.
Methods Page 129
Programming with Reflection
AdmitOne property Syntax Works with Data type
object.AdmitOne object.AdmitOne = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether support for using the Reflection Admit One data base is included in recorded login macros. When this property is True, recorded macros use the GetPassword method to get the user password, and include the CommitLoginProperties method, which updates the Admit One data base. When this property is False, recorded macros use the PasswordBox method to get the user password. Notes Macros recorded when this property is True work correctly whether or not Reflection Admit One has been installed. This property affects Reflection Basic scripts as well as Visual Basic macros. Values The default value is True. Programming with Reflection
AllowJIS property Syntax Works with Data type
object.AllowJIS object.AllowJIS = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether JIS escape sequences are allowed when other host character sets are selected. When this property is False, Reflection will display JIS characters only when a JIS mode (JIS 1978, JIS 1983, JIS 1990, or JIS Katakana) is selected. When it is True, JIS escape sequences are allowed when other Japanese characters sets (such as EUC or SJIS) are selected. Values The default value is False. Programming with Reflection
AllowLegacyComm property Syntax Works with Data type
object.AllowLegacyComm object.AllowLegacyComm = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection supports connections using older Reflection LAT products.
Properties Page 130
Notes: The value of this setting is changed from the factory default if older LAT products were detected during Setup. The value of this property is saved in the registry. Changing this property affects all subsequent instances of the current Reflection product. Values The default value is rcLegacyCommNever. rcLegacyCommAsNeeded Reflection executes connections using the older Reflection communications engine as needed. rcLegacyCommNever
Reflection never uses the older communications engine.
Programming with Reflection
AllowMacroInterrupt property Syntax Works with Data type
object.AllowMacroInterrupt object.AllowMacroInterrupt = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the macro execution can be interrupted. Setting this property to False prevents users from interrupting macros (that is, it disables the Stop Macro command on the Macro menu, as well as the Quit and StopMacro methods). For example, the following statement disables the Stop Macro command: Session.AllowMacroInterrupt = False Values The default value is True. The value of this property is not saved to a settings file. Programming with Reflection
AllowScriptInterrupt property Syntax Works with Data type
object.AllowScriptInterrupt object.AllowScriptInterrupt = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a ReflectionBasic script (or macro) can be interrupted. Setting this property to False prevents users from interrupting scripts (that is, it disables the Stop Script command on the Script menu, as well as the Quit and StopScript methods). Note: This property is equivalent to AllowMacroInterrupt. Values The default value is True. The value of this property is not saved to a settings file.
Properties Page 131
Programming with Reflection
AnsiScreenColor property Syntax Works with Data type
object.AnsiScreenColor object.AnsiScreenColor = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the default background color for the terminal screen in ANSI color mode (that is, when the UseAnsiColor property is set to True). This property does not affect color for the Reflection Setup screens, which retain their configured Reflection colors. Values The default value is rcBlack. rcBlack rcBlue rcCya rcGreen rcMagenta rcRed rcWhite rcYellow
Programming with Reflection
AnswerBack property Syntax Works with Data type
object.AnswerBack object.AnswerBack = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the string that is sent to the host when Reflection receives an Enq character from the host. When EnqAck is set to True, Reflection sends an Ack character in response to an Enq from the host, and the value of AnswerBack is ignored. This property is relevant only when the EnqAck property is set to False. In Reflection for HP, this property is relevant only in VT emulation mode. Values The default value is "". The string cannot be more than 30 characters long.
Properties Page 132
Programming with Reflection
Application property Syntax Works with Data type
object.Application HP, UNIX and Digital, and ReGIS Graphics Object
Description Returns the Reflection Session object. This property is identical to the Parent property. Values This property is read-only. Programming with Reflection
AsianCharReset property Syntax Works with Data type
object.AsianCharReset object.AsianCharReset = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection allows control characters and escape sequences between double-byte character sequences. This property is relevant only when emulating an HP terminal in Reflection for HP, and when double-byte characters are present in the terminal window. When this property is set to True, Reflection allows control characters and escape sequences between double-byte character sequences. This is necessary for applications such as Oracle that, for example, put cursor positioning between a double-byte character sequence. Values The default value is True. Programming with Reflection
AsianKeyboardInterpreter property Syntax Works with Data type
object.AsianKeyboardInterpreter object.AsianKeyboardInterpreter = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) how cursor movement is interpreted when doublebyte characters are present in the terminal window. When this property is set to False, cursor movement keystrokes interpret a double-byte character as two characters. So, for example, it is necessary to press Backspace twice to backspace through a double-byte character. When this property is set to True, cursor movement keystrokes interpret a double-byte character as a single character. HP 9000s and UNIX hosts typically can accommodate double-byte characters, so it isn’t necessary to set this property to True for such hosts. Values The default value is False.
Properties Page 133
Programming with Reflection
AutoAnswerback property Syntax Works with Data type
object.AutoAnswerback object.AutoAnswerback = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the answerback message (set with the AnswerBack property) is automatically sent to the host after a communications line connection. Values The default value is False. Programming with Reflection
AutoFontSize property Syntax Works with Data type
object.AutoFontSize object.AutoFontSize = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection should automatically scale the screen font size to match the current window size (so that all rows and columns are visible). When this property is set to False, the terminal window may either be clipped or displayed with a border to accommodate certain font sizes. Values The default value is True. Programming with Reflection
AutoFormFeed property Syntax Works with Data type
object.AutoFormFeed object.AutoFormFeed = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether an automatic formfeed is performed when any portion of display memory is printed. Values The default value is True.
Properties Page 134
Programming with Reflection
AutoKeyboardLock property Syntax Works with Data type
object.AutoKeyboardLock object.AutoKeyboardLock = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the keyboard is locked after certain transmissions to the host, pending an escape sequence from the host to unlock it. Equivalent to the HP escape sequences {bmc Esc.bmp}&k1K (when AutoKeyboardLock is True) and {bmc Esc.bmp}&k0K (when AutoKeyboardLock is False). Values The default value is False. The value of this property is not saved to a settings file. Programming with Reflection
AutoLinefeed property Syntax Works with Data type
object.AutoLinefeed object.AutoLinefeed = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection appends a linefeed character ({bmc Lf.bmp}) to each transmitted or received carriage return character ({bmc Cr.bmp}). Most hosts echo both a carriage return and a linefeed when you press Return, so in remote mode it isn’t usually appropriate to add another linefeed. In local mode, however, a carriage return does not execute a linefeed automatically, so you may want to set AutoLinefeed to True. Values The default value is False. Programming with Reflection
AutoRepeat property Syntax Works with Data type
object.AutoRepeat object.AutoRepeat = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether keys repeat when you hold them down. The Shift, Enter, and Ctrl keys never auto repeat. Values The default value is True.
Properties Page 135
Programming with Reflection
AutoScroll property Syntax Works with Data type
object.AutoScroll object.AutoScroll = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Auto Scroll is on. This property is valid for Wyse, DG, and ADDS terminal emulation. When this property is True, a linefeed on the last line of the screen causes a new blank line to be created and the rest of the screen to be scrolled up one line. Values The default is True. Programming with Reflection
Bell property Syntax Works with Data type
object.Bell object.Bell = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a bell sounds when the ASCII bell character (decimal 7) is transmitted from the keyboard or received from the host. Values The default value is True. Example When you run the following procedure the PC bell sounds. Change the “True” to “False” and the bell doesn’t sound. Sub RingBell Session.Bell = True Session.Display Chr$(rcBEL) End Sub
Programming with Reflection
BlinkCharacters property Syntax Works with Data type
object.BlinkCharacters object.BlinkCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether characters configured to blink in the terminal window actually do blink.
Properties Page 136
Values The default value is True. Programming with Reflection
BlockMode property Syntax Works with Data type
object.BlockMode object.BlockMode = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection is in HP block mode. Typically this property is set by the host rather than by the user. Values The default value is False. Programming with Reflection
BlockTerminator property Syntax Works with Data type
object.BlockTerminator object.BlockTerminator = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) a block terminator character to be transmitted at the end of each block data transmission. Values The default value for Reflection for HP is the record separator character, represented as Chr$(rcRS). The default value for Reflection for UNIX and Digital and Reflection for ReGIS Graphics is Chr$(rcSUB). Only ANSI characters with values from 0 to 31 are valid for this property. Use a characters to designate one of these characters. Programming with Reflection
BlockTransferUnit property Syntax Works with Data type
object.BlockTransferUnit object.BlockTransferUnit = Value HP Enumeration
Description If Reflection is operating in block mode, a block of one or more characters is transmitted when you press Enter or when the host requests a block transfer from terminal memory. This property returns (first syntax line) or specifies (second syntax line) how much data Reflection transmits on each block transfer.
Properties Page 137
Values The default value is rcLine. rcLine Data is transmitted one line at a time, or one field at a time in format mode. rcPage
Data is transmitted one page at a time.
Programming with Reflection
BoldCharacters property Syntax Works with Data type
object.BoldCharacters object.BoldCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether characters with the bold attribute are actually displayed in the terminal window as bold. In Reflection for HP, this property is relevant only in VT emulation mode. Values The default value is False. Programming with Reflection
BreakEnabled property Syntax Works with Data type
object.BreakEnabled object.BreakEnabled = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a break can be transmitted to the host computer. This property affects breaks transmitted from the keyboard, and does not affect breaks transmitted programmatically (for example, with the Break method). Values The default value is True. Programming with Reflection
BreakLength property Syntax Works with Data type
object.BreakLength object.BreakLength = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the length (in milliseconds) of the break signal. Use the Break method to transmit a Break signal to the host.
Properties Page 138
Values The default value is 200 in Reflection for HP, and 275 in Reflection for UNIX and Digital and Reflection for ReGIS Graphics. The range of values is 0-9999. Programming with Reflection
BypassPrinterDriver property Syntax Works with Data type
object.BypassPrinterDriver object.BypassPrinterDriver = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether raw data is sent directly to your printer, bypassing the Windows printing interface. When this property is True, output is sent directly to your printer. When it is False, output is sent to the currently selected printer driver. If you’re bypassing Windows printing to a PostScript printer, the results may not be as you expect. PostScript printers are controlled by PostScript commands, which are typically sent to the printer from a PostScript printer driver. When you bypass this driver, one of two things will happen: • Some printers have built-in PostScript codes that are used when no driver can be found; so your output prints in the font determined by the printer’s defaults. • If your printer depends on the driver for PostScript codes, then nothing (not even a blank page) will be printed when you click this check box. Values The default value is False. Programming with Reflection
CapsLock property Syntax Works with Data type
object.CapsLock object.CapsLock = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the CapsLock keyboard function is in effect. When this property is True, pressing any letter key transmits the uppercase version of the letter to the host. While the CapsLockMode property is True, the CapsLock property is automatically set to False. Values The default value depends on the current system-wide CapsLock setting. The value of this property is not saved to a settings file. Note By default, Reflection uses the current system-wide setting for CapsLock . If want to have Reflection control the CapsLock state, use the GlobalCapsLock property.
Properties Page 139
Programming with Reflection
CapsLockMode property Syntax Works with Data type
object.CapsLockMode object.CapsLockMode = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether characters produced from the keyboard are limited to Teletype-compatible codes: • No lowercase alphabetic characters are generated. All alphabetic keys appear as if they are shifted. • The ~ (tilde) and ` (grave accent) are disabled. • The characters {, |, and } are converted to the characters [, \, and ]. While the CapsLockMode property is True, the CapsLock property is automatically set to False. Values The default value is False. Programming with Reflection
Caption property Syntax Works with Data type
object.Caption object.Caption = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the text that appears on the Reflection title bar and is used to identify Reflection in Windows Task Manager. For example, to set the title bar text to “Telnet to Tate”, use this command: Session.Caption = "Telnet to Tate" Setting this property to an empty string resets the caption to its default value, which consists of the name of the Reflection product plus the name of the settings file (or “Untitled” if there is no current settings file). Various special characters can be included in this string: Character Displays &c Connected or Not Connected &d The date &f The settings file name (or Untitled if there is no current settings file) &h The host name &i Instance number of Reflection &n The name of the Reflection product &r Reflection &s The host name and the connection type &t The connection type &v Product version number
Properties Page 140
&&
Ampersand (that is, use two && to produce one &)
So, for example, if you set the Caption property to “&f - &s - &c”, your title bar might look like this: My settings.r2w - Myhost via Telnet - Connected If you need to use quotation marks within the string, use two sets instead of one. For example: Session.Caption = "Temp Connection to ""Maki""" Values The default value is “&f - &n” (settings file name, product name). The string can be up to 64 characters long. Programming with Reflection
ClosePrinterManually property Syntax Works with Data type
object.ClosePrinterManually object.ClosePrinterManually = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the printer is automatically flushed after printing. When this property is set to False, the printer is automatically closed after a print operation and after a host application turns off the print logging mode. But if your host application turns the logging mode on and off repeatedly, causing many more page breaks in the output than are desired, set ClosePrinterManually to True and remember to call the FlushPrinter method after a print operation. Values The default value is False. Programming with Reflection
CodePage property Syntax Works with Data type
object.CodePage HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the current DOS code page. Values This property is read-only.
Properties Page 141
Programming with Reflection
ColumnsPerScroll property Syntax Works with Data type
object.ColumnsPerScroll object.ColumnsPerScroll = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of columns, or character positions, to be rolled right or left during one horizontal scrolling operation with Ctrl+Left or Ctrl+Right. In Reflection for HP, this property only applies when the RightMargin property is set to a value greater than 80. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, this property only applies when RightMargin is greater than 80 and you are operating in graphics mode without a 132-column adapter. Values The default value for Reflection for HP in HP emulation mode is 1. The default value for Reflection for UNIX and Digital and Reflection for ReGIS Graphics, and for Reflection for HP in VT emulation mode, is 10. The range of values is 0-80. Programming with Reflection
CommandLineSwitches property Syntax Works with Data type
object.CommandLineSwitches HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the startup command line switches used to launch Reflection. The returned string includes everything following the name of the Reflection executable file. For example, if Reflection was started with the following command line: "C:\Program Files\Reflection\R1win.exe" /S Setfile.r1w /RBS Logon.rbs The returned value for CommandLineSwitches will be: /S Setfile.r1w /RBS Logon.rbs Values This property is read-only. Programming with Reflection
CompensateFrameSpaces property Syntax Works with Data type
object.CompensateFrameSpaces object.CompensateFrameSpaces = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) how Reflection handles spaces when aligning data on screen. This property is relevant for Thai character set support only; change the value of this property only if you are using the Thai version of Windows.
Properties Page 142
If Reflection is using a proportional font, this property specifies the number of spaces after which text characters are realigned to display on monospaced boundaries. For example, if the terminal window is displaying two columns of data with at least three spaces between columns on any particular line, setting this property to 3 ensures that the second column of data is properly left-justified on the screen. Values The default value is 2. The range of values is 0-510. Programming with Reflection
CompressBlankLines property Syntax Works with Data type
object.CompressBlankLines object.CompressBlankLines = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how Reflection handles blank lines in display memory. When this property is True, Reflection compresses multiple blank lines in display memory into a single blank line. This property only affects lines that have scrolled off the screen. Values The default value is False. Programming with Reflection
ConcatenateWrappedLines property Syntax Works with Data type
object.ConcatenateWrappedLines object.ConcatenateWrappedLines = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) how Reflection handles long lines when the contents of display memory is saved to a file, printed, or copied to the Clipboard. When this property is set to False, lines more than 80 characters long are automatically wrapped. Some programs wrap lines that aren’t logically concatenated, regardless of the value of this property. The default value (False) is appropriate for printers and printer drivers that support wide printing. Set this property to True for the following operations: • Copying a portion of display memory to the Clipboard • Printing a portion of display memory • Saving a portion of display memory to a file with the SaveDisplayMemory method Values The default value is False.
Properties Page 143
Programming with Reflection
ConfigurationLocked property Syntax Works with Data type
object.ConfigurationLocked object.ConfigurationLocked = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the Connection Setup command is available. Setting this property to True disables Connection Setup. This is equivalent to the HP escape sequences {bmc Esc.bmp}&q1L (ConfigurationLocked = True) and {bmc Esc.bmp}&q0L (ConfigurationLocked = False). Values The default value is False. Note: You can use SetPropertyProfile if you don’t want this property to be modifiable in the View Settings dialog. Programming with Reflection
ConfirmExit property Syntax Works with Data type
object.ConfirmExit object.ConfirmExit = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a dialog box appears when a user attempts to exit Reflection when Reflection is connected to a host. Note When the Quit method is used to exit, Reflection always closes without displaying a dialog box, regardless of the value of ConfirmExit. Values The default value is True. Programming with Reflection
Connected property Syntax Works with Data type
object.Connected HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns a value indicating whether Reflection is connected. This property is True if a host connection exists or if a port is open. Values This property is read-only.
Properties Page 144
Programming with Reflection
ConnectionError property Syntax Works with Data type
object.ConnectionError HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns an error number describing the specific cause of the most recent general connection failure (when the last returned error has the value rcErrConnectionError). If no connection failure has occurred, this property returns zero. Use ConnectionErrorMessage to retrieve the error message. Use this property to retrieve information only when the last returned error equals rcErrConnectionError; if you use ConnectionError for errors other than rcErrConnectionError, you will be retrieving information that is not valid for the current error condition. Values This property is read-only. Programming with Reflection
ConnectionErrorMessage property Syntax Works with Data type
object.ConnectionErrorMessage HP, UNIX and Digital, and ReGIS Graphics String
Description Returns a text string describing the specific cause of the most recent general connection failure (when the last returned error has the value rcErrConnectionError). If no connection failure has occurred, this property returns an empty string. The connection error message strings are stored internally in the connection library module of Reflection and cannot be changed. Use this property to retrieve information only when the last returned error equals rcErrConnectionError; if you use ConnectionErrorMessage for errors other than rcErrConnectionError, you will be retrieving information that is not valid for the current error condition. Values This property is read-only. Programming with Reflection
ConnectionID property Syntax Works with Data type
object.ConnectionID HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a Long integer that uniquely identifies the current connection. This value can be used with the ResumeConnection method to resume a suspended connection. Values This property is read-only.
Properties Page 145
Programming with Reflection
ConnectionIndicator property Syntax Works with Data type
object.ConnectionIndicator object.ConnectionIndicator = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which modem status line, if any, to monitor. If the selected line (pin) is in a true state, an icon appears in the terminal window’s status bar. You may want to have Reflection indicate the state of relevant RS-232 lines. Some modems can be configured to force these lines to a “true” state; in this case, the icon has little meaning. The factory settings for a Hayes Smartmodem cause it to always set the Data Carrier Detect (DCD) signal to a true state. Values The default value is rcNone. rcNone No modem status line is monitored. rcDCD
The Data Carrier Detect line is monitored.
rcDSR
The RS-232 Data Set Ready signal (pin 6) is monitored.
rcCTS
The RS-232 Clear To Send signal (pin 5) is monitored.
Programming with Reflection
ConnectionSettings property Syntax Works with Data type
object.ConnectionSettings object.ConnectionSettings = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (see the Note below) or specifies (second syntax line) the connection settings for the current connection type. The value consists of alternating “keyword tokens” and “value tokens.” The keyword token identifies a setting; the value token specifies a value for the setting. Keyword tokens need not be specified in any specific order. For example, in the statement: Session.ConnectionSettings = "Parity 7/Even" the keyword Parity is given a value of 7/Even. Different keyword/value pairs are relevant for different connection types. The entire configuration string must be enclosed in quotation marks. If a value token contains double quotation marks or a backslash character, you must precede that character with a backslash character. If a value token contains spaces, the token must be enclosed in single quotes or in two sets of quotation marks; for example: Session.ConnectionSettings = "ConnectMacroData 'a b c'" or Session.ConnectionSettings = "ConnectMacroData ""a b c"" "
Properties Page 146
For any given connection type, the complete ConnectionSettings string can be quite lengthy. For example, the connection settings string for a Telnet connection might look like this: CheckParity False Parity 8/NONE CharDelay 0 Host "" TelnetPort 23 TelnetBreak False TelnetBinary False TelnetLFAfterCR False TelnetInitOptionNegotiation True TelnetTermType VT220 SettingsFile "" TelnetEcho Auto TelnetUseEmulatorTermType False TelnetSetWindowSize True TelnetLinemode Never UseSOCKS False TelnetTrace False ExitAllowed True ExitOnDisconnect False UseThreadedIO True ConnectMacro "" ConnectMacroData "" ConnectionName "" You usually do not need to specify an entire configuration string in order to establish a connection. Instead, you need only specify the keyword and value tokens for the settings you need to specify explicitly; current values are used for the keywords you do not specify. For example, if you want to change only the setting for allowing an exit while connected, you could use this statement: Session.ConnectionSettings = "ExitAllowed False" All other settings for the current connection type remain unchanged. If you specify a keyword token that’s not relevant for the connection type, Reflection generates an error. Likewise, if the value you assign to the ConnectionSettings property contains any invalid keyword or value tokens, Reflection stops reading the string at the invalid token and returns an error. Your macro should contain an error-handling routine to trap and deal with the error (by displaying a message box, for example). Note If you want to return the value of a single keyword token, use the ConnectionSetting method. Values The default value varies depending on your connection type. If you change the connection type, the keyword/value pairs of the ConnectionSettings property are restored to the defaults for that type. Example In the following example, a Telnet connection is configured. An input box is used to prompt for the host name. Sub TelnetConnection Dim whatHost As String With Session If .Connected = True Then MsgBox("You already have an open connection.") Else .ConnectionType = "Telnet" whatHost = InputBox$("Host to connect to:", "Host Name") If whatHost "" Then .ConnectionSettings = "host " & whatHost .Connect End If End If End With End Sub
Properties Page 147
Programming with Reflection
ConnectionType property Syntax Works with Data type
object.ConnectionType object.ConnectionType = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the connection type. The values are BEST-NETWORK, TELNET, LAT, VT-MGR, BAPI, HP-NSVT, HP-TELNET, IBM-ACS, INT-14, U.B., CTERM, NASI, EICON, NLAT, NONE, DEMONSTRATION, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, and MODEM. (These strings are not case-sensitive.) For example: Session.ConnectionType = "BEST-NETWORK" When you use this property to set a connection type, all connection settings for that type (that is, all settings you can configure with the ConnectionSettings property) are reset to their default values. If you’re writing a procedure that manipulates the current data connection settings, you may want to determine the current connection type with this property before making changes to the connection settings. After determining the current connection type, you can use the ConnectionSetting method to retrieve the value of a single connection keyword token, or the ConnectionSettings property to retrieve or set any or all of the connection keyword tokens. If a connection is already active and you try to set the connection type, a runtime error results. You should either trap the error with an error-handing routine, or use the Connected property to first determine if a connection is active. Values The default value is "BEST-NETWORK". Example In the following example, the connection type is retrieved and displayed in a message box. Sub GetConnectionType () Dim how As String how = Session.ConnectionType "The current connection type is " & how End Sub
Programming with Reflection
ConvertEOLToSeparator property Syntax Works with Data type
object.ConvertEOLToSeparator object.ConvertEOLToSeparator = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property applies to ASCII transfers to the host. It returns (first syntax line) or specifies (second syntax line) whether Reflection instructs the WRQ file transfer host program to generate a new record every time it receives the carriage return/linefeed sequence from Reflection. The equivalent property for transfers from
Properties Page 148
the host is ConvertSeparatorToEOL, which determines whether Reflection generates a new line at the end of each record it receives from the host during an ASCII transfer. Values The default value is True. Programming with Reflection
ConvertISO7ToRoman8 property Syntax Works with Data type
object.ConvertISO7ToRoman8 object.ConvertISO7ToRoman8 = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether ISO-7 characters are converted to Roman 8 characters in files you receive. This property is relevant only for ASCII file transfers. Values The default value is False. Programming with Reflection
ConvertMCSToNRC property Syntax Works with Data type
object.ConvertMCSToNRC object.ConvertMCSToNRC = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Multinational Character Set (MCS) characters are converted to National Replacement Set (NRC) characters in files you send. This property is relevant only for ASCII file transfers. Values The default value is False. Programming with Reflection
ConvertNRCToMCS property Syntax Works with Data type
object.ConvertNRCToMCS object.ConvertNRCToMCS = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether National Replacement Set (NRC) characters are converted to Multinational Character Set (MCS) characters in files you receive. This property is relevant only for ASCII file transfers. Values The default value is False.
Properties Page 149
Programming with Reflection
ConvertRoman8ToISO7 property Syntax Works with Data type
object.ConvertRoman8ToISO7 object.ConvertRoman8ToISO7 = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Roman 8 characters are converted to ISO7 characters in files you send. This property is relevant only for ASCII file transfers. Values The default value is False. Programming with Reflection
ConvertSeparatorToEOL property Syntax Works with Data type
object.ConvertSeparatorToEOL object.ConvertSeparatorToEOL = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how Reflection handles line separators during ASCII file transfers. Setting this property to True tells Reflection to generate a new line at the end of each record it receives from the host during an ASCII transfer. The equivalent property for ASCII transfers to the host is ConvertEOLToSeparator, which determines whether the host generates a new record every time it receives the carriage return/linefeed sequence from Reflection. Values The default value is True. Programming with Reflection
CopyGraphicsBackground property Syntax Works with Data type
object.CopyGraphicsBackground object.CopyGraphicsBackground = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether bitmaps copied to the Clipboard are edited so the background color is set to white, and all near-white colors are set to black. This is useful for pasting graphic images into word processing documents. Values The default value is True.
Properties Page 150
Programming with Reflection
CopyGraphicsVGAColors property Syntax Works with Data type
object.CopyGraphicsVGAColors object.CopyGraphicsVGAColors = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether bitmaps copied to the Clipboard are dithered to standard VGA colors. (The dithering options are controlled by the ImageDither property.) This is useful for pasting graphic images into Windows applications that are not palette-aware (for example, Windows Paintbrush). Values The default value is False. Programming with Reflection
CreateShortcut property Syntax Works with Data type
object.CreateShortcut object.CreateShortcut = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection automatically creates a shortcut whenever you save a settings file. The shortcut can be used to launch Reflection and open your saved settings. Use the ShortcutFolder property to specify what folder the shortcut is saved to. Values The default value is True. Note Changing the value of this property in one instance of Reflection will affect any instance of Reflection that you run, and will also affect these Reflection products: Reflection for HP Reflection for UNIX and Digital Reflection for ReGIS Graphics
Programming with Reflection
CursorBlink property Syntax Works with Data type
object.CursorBlink object.CursorBlink = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description By default, the cursor (whether a block or underline) blinks. This property returns (first syntax line) or specifies (second syntax line) whether or not the cursor blinks. The blinking speed is twice per second.
Properties Page 151
Values The default value is True. Programming with Reflection
CursorColumn property Syntax Works with Data type
object.CursorColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the column containing the cursor in the terminal window, relative to the left edge of the screen. The number is zero-based (the first column is column 0). Values This property is read-only. Programming with Reflection
CursorRow property Syntax Works with Data type
object.CursorRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the current cursor row in the terminal window, relative to the top of the screen, in host-addressable coordinates. Values This property is read-only. Programming with Reflection
CursorShape property Syntax Works with Data type
object.CursorShape object.CursorShape = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the shape of the text cursor. Values The default is rcBlock. rcUnderline The cursor is an underline. rcBlock
Properties Page 152
The cursor is a rectangle.
Programming with Reflection
CursorVisible property Syntax Works with Data type
object.CursorVisible object.CursorVisible = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the cursor is visible in the terminal window (assuming it’s in the part of display memory visible on the screen). Values The default value is True. Programming with Reflection
DAResponse property Syntax Works with Data type
object.DAResponse object.DAResponse = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how Reflection responds to a primary device attribute request from the host (usually at login). This value is independent of the value for TerminalType. For a list of the actual replies that are sent for each value, see the Reflection Terminal Reference, available in electronic format as a PDF (Portable Document Format) file on the Reflection product CD. In Reflection for HP, this property is relevant only in VT emulation mode. Values In Reflection for HP, the default is rcVT220. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. rcVT80 (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT100 rcVT100J (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT101 rcVT102 rcVT102J (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT220 rcVT220J (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT240 (Reflection for ReGIS Graphics only) rcVT240J (Reflection for ReGIS Graphics only) rcVT241 (Reflection for ReGIS Graphics only) rcVT282 (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT286 (Reflection for ReGIS Graphics only) rcVT320 (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) rcVT330 (Reflection for ReGIS Graphics only)
Properties Page 153
rcVT340 rcVT382 rcVT420 rcWRQID
(Reflection for ReGIS Graphics only) (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only)
Programming with Reflection
DataStreamTranslation property Syntax Works with Data type
object.DataStreamTranslation object.DataStreamTranslation = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection translates characters from the host to the PC, and vice versa, using the current translation table. Note: You can specify the translation table using Reflection’s Translation Table dialog box. Look up Translation tables in the main Reflection Help index for more information. Values The default value is False. For Unisys T27 emulation, the default setting is True. Programming with Reflection
DCD property Syntax Works with Data type
object.DCD HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns True if the data carrier signal is high. Relevant only for serial connections. Values This property is read-only. Programming with Reflection
DDEServerEnable property Syntax Works with Data type
object.DDEServerEnable object.DDEServerEnable = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection can act as a DDE server. Setting this property to False terminates any existing advise-links between Reflection (acting as the DDE server) and other DDE applications (acting as DDE clients) and makes it impossible for other applications to initiate new DDE conversations with Reflection.
Properties Page 154
This is a DDE server property—that is, a property relevant for DDE conversations initiated by other applications. Values The default value is True. Programming with Reflection
DDEServerName property Syntax Works with Data type
object.DDEServerName object.DDEServerName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description This property returns (first syntax line) or specifies (second syntax line) the application name that Reflection will respond to when receiving a DDE initiate message from a DDE client. You need only change the value for this property if you are running two copies of the same Reflection product and you want to be able to specify which copy responds to which DDE initiate messages. This is a DDE server property—that is, a property relevant for DDE conversations initiated by other applications. Values The default value is “R1WIN” in Reflection for HP, “R2WIN” in Reflection for UNIX and Digital, and “R4WIN” in Reflection for ReGIS Graphics. This string can be up to 31 characters long. Programming with Reflection
DDETimeout property Syntax Works with Data type
object.DDETimeout object.DDETimeout = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description After sending certain DDE messages, Reflection waits for an acknowledgment message from the other application in a conversation. This property returns (first syntax line) or specifies (second syntax line) how many seconds Reflection waits for an acknowledgment from the other application after sending a DDE message. If no message is received within the specified time, an error results. Values The default value is 5. The range of values is 0-255.
Properties Page 155
Programming with Reflection
DefaultPrinter property Syntax Works with Data type
object.DefaultPrinter object.DefaultPrinter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the default printer to which Reflection should send printer output. Assigning a default printer with this property has no effect on the default printer used by other Windows applications. The default printer string consists of the printer name, driver, and port as shown in these examples: Session.DefaultPrinter = "HP LaserJet 4,WINSPOOL,\\Mynet\Myprint" Session.DefaultPrinter = "Epson AP-4000,WINSPOOL,LPT1:" You can use the macro recorder to help you determine the correct string for your system by recording your actions as you select the name of the printer you want to use in the Print Setup dialog box. Note To force Reflection to always use the default printer specified in Windows Control Panel, set this property to an empty string. These commands make this change and save it to the current settings file: Session.DefaultPrinter = "" Session.SaveSettings Session.SettingsFile This can be useful, for example, for a system administrator who is creating one settings file to distribute to many users. Since users are probably not all printing to the same printer, setting DefaultPrinter to an empty string forces Reflection to look for each user’s individual default printer; this reduces the risk of printing failure. Values The default value is determined by printer selected in Reflection’s Print Setup dialog box. Programming with Reflection
DefaultScriptLanguage property Syntax Works with Data type
object.DefaultScriptLanguage object.DefaultScriptLanguage = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the file type that is listed by default in the Run Script and Edit Script dialog boxes. Note: Starting with version 7.0, this property has no effect on the command line, or on dialog boxes uses for mapping Reflection features such as toolbars and keystrokes. Values The default value is rcRB. rcRB List Reflection Basic scripts. rcRCL
Properties Page 156
List RCL scripts.
Programming with Reflection
DeleteTrailingSpaces property Syntax Works with Data type
object.DeleteTrailingSpaces object.DeleteTrailingSpaces = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property returns (first syntax line) or specifies (second syntax line) how Reflection handles trailing spaces during ASCII file transfers. Most text processing programs use delimited lines and paragraphs, and thus do not need blanks preceding a delimiter. Deleting trailing spaces during a file transfer can save a great deal of disk space. This property is relevant during ASCII file transfers from the host and for logging or copying to disk. Values The default value is True. Programming with Reflection
DestructiveBackspace property Syntax Works with Data type
object.DestructiveBackspace object.DestructiveBackspace = Value HP Boolean
Description This property returns (first syntax line) or specifies (second syntax line) whether Reflection erases characters when the Backspace key is pressed. When this property is set to True, backspacing over typed characters automatically erases them. Values The default value is False. Programming with Reflection
DigitalLA210PrinterEmulation property Syntax Works with Data type
object.DigitalLA210PrinterEmulation object.DigitalLA210PrinterEmulation = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection translates data to emulate a Digital LA210 printer when a passthrough method of printing, such as printer controller mode, is being used. When this property is True, Reflection controls escape sequences for the LA210 that determine the number of columns and rows per page. Reflection intercepts the escape sequences and updates the number of rows and columns for the page to be printed. The font size is updated accordingly. If your host software understands PC printers, leave this property set to False. This property applies to VT emulation only. It is not relevant if the BypassPrinterDriver property is True, or if the PrintToFile property has been set to something other than an empty string.
Properties Page 157
Values The default value is False. Programming with Reflection
DisplayColumns property Syntax Works with Data type
object.DisplayColumns object.DisplayColumns = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of columns displayed in the terminal window. For example, to change the number of display columns to 132: Session.DisplayColumns = 132 Values The default value is 80. The range of values is 80-999. To display more than 132 columns, Reflection for HP must be configured to emulate an HP700/92 or HP700/94 terminal (that is, the value of the TerminalType property must be either rcHP70092 or rcHP70094). Notes When PrinterColumnsTiedToDisplay is True (the default value), changing the value of DisplayColumns automatically changes the value of the PrinterColumns property. Programming with Reflection
DisplayEnabled property Syntax Works with Data type
object.DisplayEnabled object.DisplayEnabled = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection displays characters received from the host during the execution of any of the following methods: ReadChars , ReadLine, ReadUntil, WaitForHostTrigger, WaitForString, WaitForStrings, Wait, WaitForSilence, and WaitUntil. Setting DisplayEnabled to False is the same as specifying the rcNoDisplay option for these methods. This property only affects the display while a macro is running. Values The default value is True. Programming with Reflection
DisplayMemoryBlocks property Syntax Works with Data type
Properties Page 158
object.DisplayMemoryBlocks object.DisplayMemoryBlocks = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of 8K blocks allocated to display memory. Display memory contains both the information visible on the display and information that has scrolled off the display. It is a log of what has recently been sent from the host to the PC. This property determines the amount of memory you want to allocate to display memory. The default value is for 9 blocks of 8 kilobytes each, or 72K of display memory. The number of bytes you are currently using is calculated on each character of text; you’ll have more “pages” of display memory when your text lines do not run all the way out to the right margin. The default value holds approximately 25 pages of display memory when each line is exactly 80 characters long. Decreasing the size of display memory causes Reflection to clear or reset the contents of display memory. Increasing the size of display memory does not modify the contents of display memory. Values The default value is 9. The range of values is 9-254. Programming with Reflection
DisplayMemoryTopRow property Syntax Works with Data type
object.DisplayMemoryTopRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the index of the top row of display memory using host-addressable coordinates. Values This property is read-only. Programming with Reflection
DisplayRows property Syntax Works with Data type
object.DisplayRows object.DisplayRows = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of lines in each page of display memory. The host can position the cursor and write characters on any row in the specified range. Values The default value is 24. The range of values 24-144. Note In Reflection for HP, the value of DisplayRows determines the number of lines visible on screen. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the WindowRows property determines the number of lines visible on screen. Changing the value of WindowRows automatically sets DisplayRows to the same value, but changing the value of DisplayRows has no effect on WindowRows. If WindowRows is larger than DisplayRows, the unused part of the terminal window will be blank. If
Properties Page 159
WindowRows is smaller than DisplayRows, only a portion of each display page will be visible on screen, and you will need to scroll to the view the entire display page. Changing row dimensions in the Screen tab of the Display Setup dialog box automatically sets both DisplayRows and WindowRows to the new value. Programming with Reflection
DrawingOptimization property Syntax Works with Data type
object.DrawingOptimization object.DrawingOptimization = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses drawing optimization features to control the timing of changes to the screen display. Use the default value for the best performance with most host applications. With some host applications, you may observe a delay in character display when DrawingOptimization is True. Change this property to False to have Reflection update the screen display after each character is typed. Values The default value is True. Programming with Reflection
ElfAtochemEmulation property Syntax Works with Data type
object.ElfAtochemEmulation object.ElfAtochemEmulation = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Elf Autochem terminal emulation is enabled. Values The default value is False. Programming with Reflection
EndOfLineWrap property Syntax Works with Data type
Properties Page 160
object.EndOfLineWrap object.EndOfLineWrap = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property returns (first syntax line) or specifies (second syntax line) what happens when typing reaches the end of a line. When this property is set to True, Reflection automatically inserts a carriage return and a linefeed when the cursor reaches the right margin. When the value is False, the cursor is not automatically advanced when it reaches the right margin—as you type additional characters, each character overwrites the previous character until you move the cursor. Values The default value is True in Reflection for HP and False in Reflection for UNIX and Digital and Reflection for ReGIS Graphics. Programming with Reflection
EnqAck property Syntax Works with Data type
object.EnqAck object.EnqAck = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses a form of handshaking called Enq/Ack (ENQuire/ACKnowledge). HP 3000, HP 1000, and IBM TSO host computers use Enq/Ack handshaking to prevent the terminal (Reflection) from falling too far behind the host system and losing data. EnqAck pacing works as follows: whenever the host system has a block of more than 80 characters to send, it sends 80 characters and an ASCII Enq character, and then stops transmitting. When Reflection has processed all of the characters preceding the Enq, it sends an ASCII Ack character, which tells the host that Reflection has caught up and is ready for more data. Values The default value is True for Reflection for HP and False for Reflection for UNIX and Digital and Reflection for ReGIS Graphics. Programming with Reflection
EventDefined property Syntax Works with Data type
object.EventDefined HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the event ID number of the last event defined using DefineEvent, or the event index number of the last event defined using OnEvent. Values This property is read-only.
Properties Page 161
Programming with Reflection
FieldSeparator property Syntax Works with Data type
object.FieldSeparator object.FieldSeparator = Value HP String
Description When Reflection is transmitting in block, page, or format mode, it sends a field separator character after each field in a formatted screen except the last one. This property returns (first syntax line) or specifies (second syntax line) which ASCII character is to be used as the field separator. Values The default value is the unit separator character, represented as Chr$(rcUS). Programming with Reflection
FileOpenType property Syntax Works with Data type
object.FileOpenType object.FileOpenType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the settings file type that appears when you first display Reflection’s Open Settings dialog box. For example, this statement specifies that Color settings files should be listed when you first open the dialog box: Session.FileOpenType = rcColors The value of this property changes automatically if the FileTypeSticky property is True (the default setting) and a user opens a new file type using the Open Settings dialog box. For example, opening a Connection settings file (*.rco) changes the value of FileOpenType to rcConnection. When FileTypeSticky is False, the value of FileOpenType is not affected by actions taken in the Open Settings dialog box. FileOpenType is not affected when you open settings files programmatically (for example using OpenSettingsExtended), regardless of the current value of FileTypeSticky. Values The default value is rcSettings. rcSettings Show settings files for all Reflection products. rcCurrentProduct
Show settings files for the current Reflection product.
rcKeymap
Show Key/Mouse map settings files.
rcToolbar
Show Toolbar settings files.
rcColors
Show Colors settings files.
rcHotspots
Show Hotspots settings files.
rcMenumap
Show Menus settings files.
rcConnection
Show Connections settings files.
Properties Page 162
Programming with Reflection
FileTypeSticky property Syntax Works with Data type
object.FileTypeSticky object.FileTypeSticky = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the file type shown when you display the Open Settings dialog box is updated to match the file type you opened most recently. When this property is True, opening a new file type changes the value of the FileOpenType property, and files of the new type are listed the next time you display the Open Settings dialog box. When this property is False, the Open Settings dialog box consistently displays the same file type, determined by the value of the FileOpenType property. Opening a new file type has no effect on the FileOpenType property or the file list you see the next time you open the dialog box. Values The default value is True. Note FileOpenType is not affected when you open settings files programmatically (for example using OpenSettingsExtended), regardless of the current value of FileTypeSticky. Example Using these two commands, you can specify that the Open Settings dialog box will list settings files for the current Reflection product every time it is opened. The FileTypeSticky property makes the Open Settings display independent of user action. The FileOpenType property specifies the file type to display. Session.FileTypeSticky = False Session.FileOpenType = rcCurrentProduct Programming with Reflection
FlashWindowOnDisconnect property Syntax Works with Data type
object.FlashWindowOnDisconnect object.FlashWindowOnDisconnect = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the Reflection icon on the task bar and the Reflection window title bar flash when Reflection is disconnected from the host. When this property is True, Reflection flashes after a disconnection if it is not the foreground application. Values The default value is True.
Properties Page 163
Programming with Reflection
FontName property Syntax Works with Data type
object.FontName object.FontName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the screen font used by Reflection. To find out what fonts are available on your system, look on the Fonts tab in the Terminal Setup dialog box. Values The default value is “r_ansi”. This string can be up to 31 characters long. Programming with Reflection
FontSize property Syntax Works with Data type
object.FontSize object.FontSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the font (in points) used in the terminal window. This property is ignored when AutoFontSize is True (as it is by default). Values The default value is 12. The range of values is 5-28. Programming with Reflection
ForceAutoRepeat property Syntax Works with Data type
object.ForceAutoRepeat object.ForceAutoRepeat = Value UNIX and Digital and ReGIS Graphics Boolean
Description When this property is set to True, Reflection ignores the current value of the AutoRepeat property and always auto repeats (causing most keys to repeat when you hold the key down). The WPS editor in All-in-1 sets AutoRepeat on and off repeatedly while you type. This behavior can slow down scrolling speed within the current document. To improve performance in the WPS editor, set this property to True. Values The default value is False.
Properties Page 164
Programming with Reflection
ForceC1Controls property Syntax Works with Data type
object.ForceC1Controls object.ForceC1Controls= Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description In Reflection for HP, this property applies only when emulating a VT-series terminal. In Reflection for ReGIS Graphics, this property applies only when emulating a VT or ANSI terminal (that is, it does not apply to Tektronix emulation). Certain host character sets (such as PC-English or Chinese BIG-5) contain characters whose code values overlap those in the C1 control character region (characters 128 through159). This property determines whether Reflection interprets character codes in this overlapping region or displays them as host characters. Setting this property to True forces Reflection to interpret character codes between 128 and 159 as C1 control codes. This allows VAX applications like TPU to work properly; however, characters defined in this range are no longer displayable. If this property is set to False, then Reflection interprets C1 character codes only for host character sets that support it (that is, host character sets that do not define displayable characters in the C1 control range). Values The default is False. Programming with Reflection
FormatMode property Syntax Works with Data type
object.FormatMode object.FormatMode = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether format mode is on. When this property is set to True, a home up function is performed and the cursor moves to the first column of the first unprotected field in display memory. All tab stops are cleared, and the margins are set to columns 1 and 80. If there are no unprotected fields in display memory, the cursor moves to row 1, column 1. See the online help in Reflection for HP for more information about format mode. Values The default value is False. The value of this property is not saved to a settings file.
Properties Page 165
Programming with Reflection
FormatModeTransmits property Syntax Works with Data type
object.FormatModeTransmits object.FormatModeTransmits = Value HP Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which fields are transmitted to the host in format mode. This property is relevant when the FormatMode property is set to True and when the TerminalType property is set to rcHP70094 Values The default value is rcAllFields. rcAllFields Transmit all fields rcModifiedFields
Transmit modified fields only
Programming with Reflection
FormsBufferSize property Syntax Works with Data type
object.FormsBufferSize object.FormsBufferSize = Value HP Integer
Description Returns (first syntax line) or specifies (second syntax line) the amount of memory (in 256-byte blocks) to be allocated to the forms cache buffer. If you change this value, the contents of display memory and the printer buffer are cleared. If there is not enough memory to increase the forms buffer to the specified size, its size is not changed. This property is relevant only when TerminalType is set to rcHP70094. Values The default value is 0. The range of values is 0-255. Programming with Reflection
FoundTextColumn property Syntax Works with Data type
object.FoundTextColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a column number identifying the start column of the string most recently located with the FindText method. If no string was found, an error occurs. Values This property is read-only.
Properties Page 166
Programming with Reflection
FoundTextRow property Syntax Works with Data type
object.FoundTextRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a row number identifying the start row of the string most recently located with the FindText method. The row is returned in host addressable coordinates. If no string was found, an error occurs. Values This property is read-only. Programming with Reflection
FTPHostName property Syntax Works with Data type
object.FTPHostName object.FTPHostName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the name or IP address of the server for FTP file transfers. This can be a host name that is resolved by the Hosts file on your PC or by a domain name server on your network. You can also specify an IP address, for example: Session.FTPHostName = "124.24.36.85" This property is relevant only for transfers that use the FTP protocol. You must already be connected to a host before initiating FTP file transfer. Use this property if you want to initiate FTP file transfer to a different host. Values The default value is "". The string cannot be more than 259 characters long. Programming with Reflection
FTPPassword property Syntax Works with Data type
object.FTPPassword object.FTPPassword = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the default password to be used when logging in to an FTP server. If the value of this property is an empty string, the user will be prompted for a password when FTP file transfer is initiated (unless the FTPStartServer method is used with its Options argument set to rcNoLoginDialog). This property is relevant only for transfers that use the FTP protocol. Note This property is not visible in the View Settings dialog box.
Properties Page 167
Values The default value is "". The string cannot be more than 259 characters long. Programming with Reflection
FTPTransferType property Syntax Works with Data type
object.FTPTransferType object.FTPTransferType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the transfer type for FTP transfers from the File Transfer dialog box. This property is automatically set every time you perform an FTP transfer from the dialog box. The value of this property becomes the default for the next transfer from the File Transfer dialog box. This property has no effect on programmatic transfer—if you don’t explicitly specify a transfer type with FTPSendFile or FTPReceiveFile, the default is always ASCII. This property is relevant only for transfers that use the FTP protocol. Values The default value is rcBinary. rcASCII Sets the default transfer type for FTP transfers from the File Transfer dialog box to ASCII. If the FTPTranslateCharacters property is set to True, the following translations are performed: •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box).
•
Relevant ASCII File Translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If FTPTranslateCharacters is set to False, record separator characters may still be translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl-Z character may be still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary
Sets the default transfer type for FTP transfers from the File Transfer dialog box to binary. Data in the file is not translated as it is transferred.
rcAutoDetect The transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Properties Page 168
Programming with Reflection
FTPTranslateCharacters property Syntax Works with Data type
object.FTPTranslateCharacters object.FTPTranslateCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how ASCII character set translations occur during FTP file transfers. When this property is set to True, Reflection performs the character set translations specified on the Translation tab in the File Transfer Setup dialog box, as well as the translations between the host character set and the PC character set, as specified on the Emulation tab in the Terminal Setup dialog box. This property affects ASCII file transfers that use the FTP protocol. Values The default value is False. Programming with Reflection
FTPTranslateFileNames property Syntax Works with Data type
object.FTPTranslateFileNames object.FTPTranslateFileNames = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether file name translation occurs during FTP transfers of ASCII files. When this property is True, Reflection uses the file name translation options specified by TransferSpacesToUnderscores, TransferUnderscoresToSpaces, and TransferReceiveAs8Dot3. Values The default value is False. Programming with Reflection
FTPUserName property Syntax Works with Data type
object.FTPUserName object.FTPUserName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the default user name to be used when logging into an FTP server. If the value of this property is an empty string, the user will be prompted for a password when FTP file transfer is initiated (unless the FTPStartServer method is used with its Options argument set to rcNoLoginDialog). This property is relevant only for transfers that use the FTP protocol. Values The default value is "".
Properties Page 169
The string cannot be more than 259 characters long. Programming with Reflection
FTPUseWRQFTP property Syntax Works with Data type
object.FTPUseWRQFTP object.FTPUseWRQFTP = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses WRQ’s implementation for FTP file transfers. When this property is True, Reflection uses WRQ FTP. You can use WRQ FTP to transfer files to an FTP server running on another PC, or on a UNIX, Unisys, VAX, HP, or other host. When it is False, Reflection use’s Microsoft’s FTP, which can only be used to transfer files to UNIX hosts. Values The default value is True. Programming with Reflection
FullName property Syntax Works with Data type
object.FullName HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the full path and file name (including the drive letter) for the Reflection executable file. For example, if you install Reflection for ReGIS Graphics to the default folder on the C: drive, the value of the FullName property is “C:\Program Files\Reflection\R4win.exe”. Values This property is read-only. Programming with Reflection
FunctionKeySet property Syntax Works with Data type
object.FunctionKeySet object.FunctionKeySet = Value HP Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which set of HP function keys is displayed at the bottom of the terminal window (assuming the ShowFunctionKeys property is set to True). Values The default is rcUser. rcUser Displays the user defined key set. rcModes Displays the mode definition key set. rcDeviceControl Displays the device control key set. rcDeviceModes Displays the device modes key set.
Properties Page 170
rcToDevices rcEnhanceVideo rcDefineField
Displays the destination device key set. Displays the video enhancements key set. Displays the field definition key set.
Programming with Reflection
GlobalCapsLock property Syntax Works with Data type
object.GlobalCapsLock object.GlobalCapsLock = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection maintains its own CapsLock state. When this property is True, the value of CapsLock does not change when you switch into or out of Reflection. When it’s False, Reflection maintains its own CapsLock state (as determined by the CapsLock property, and automatically restores it when you switch into Reflection from another application. Values The default value is True. Programming with Reflection
GlobalNumLock property Syntax Works with Data type
object.GlobalNumLock object.GlobalNumLock = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection maintains its own NumLock state. When this property is True, the value of NumLock does not change when you switch into or out of Reflection. When it’s False, Reflection maintains its own NumLock state (as determined by the NumLock property), and automatically restores it when you switch into Reflection from another application. Values The default value is True. Programming with Reflection
GlobalScrollLock property Syntax Works with Data type
Properties Page 171
object.GlobalScrollLock object.GlobalScrollLock = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection maintains its own ScrollLock state. When this property is True, the value of ScrollLock does not change when you switch into or out of Reflection. When it’s False, Reflection maintains its own ScrollLock state, and automatically restores it when you switch into Reflection from another application. Values The default value is True. Programming with Reflection
GraphicsDestination Syntax Works with Data type
object.GraphicsDestination object.GraphicsDestination = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the destination of graphic images when you print a graphics image using the ReGIS hard copy command. When you print a graphics image using the ReGIS hard copy command, the image can be sent either to the host or to a Digital printer. When the graphics image is sent to the host, it is sent as a stream of sixel data. The host must be ready to accept the data; for example, by collecting it in a file. When the image is sent to a host printer, it is printed as a bitmap image. If BypassPrinterDriver is set to True, a sixel data stream is sent to the printer (this assumes you are printing to a Digital printer). Values The default value is rcToPrinter. rcToPrinter Images are sent to a Digital printer. rcToHost Images are sent to the host.
Programming with Reflection
GraphicsFixScreen property Syntax Works with Data type
object.GraphicsFixScreen object.GraphicsFixScreen = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the onscreen graphics image is periodically updated from the offscreen graphics image. This value is appropriate for 8514 and other coprocessor-based video cards, as a way of keeping the offscreen and onscreen images synchronized. For other adapters, image synchronization is not an issue, and setting this property to False speeds up drawing. Values The default is True.
Properties Page 172
Programming with Reflection
GraphicsLevel Syntax Works with Data type
object.GraphicsLevel object.GraphicsLevel = Value ReGIS Graphics Enumeration
Description Use this property to match Reflection to the capabilities of a Digital printer with regard to aspect ratio, horizontal grid size, background printing, and color printing. This property is relevant only for sending sixel data to the host (that is, when the GraphicsDestination property is set to rcToHost) or when GraphicsDestination is set to rcToPrinter and BypassPrinterDriver is set to True. This property also affects saving display sixels in the Save Display As dialog box. Values The default value is rcLevel2. rcLevel1 Level 1 sixel devices have an aspect ratio of 2:1 (2 horizontal pixels to 1 vertical pixel), and a horizontal grid size of about 188 by 0.025 mm (7.5 by 0.001 inches). This level, which includes Digital’s LA50 printer, does not support the following sixel commands:
rcLevel2
rcLA210
• Set raster attributes • Background select • Horizontal grid size • Macro parameter Level 2 sixel devices, which include Digital’s LA75 and LN03 printers, have a variable aspect ratio and variable horizontal grid size; the default aspect ratio is 1:1. These devices also support the sixel commands that level 1 devices don’t. If you want to print expanded or rotated images on an LA75 printer, use rcLevel1 instead; this compensates for differences between Reflection and the printer. In general, level 2 printers can also operate at level 1. Digital’s LA210 printer is similar to level 2 devices, but does not recognize the set raster attributes command. The LA210 uses a 1:1 aspect ratio with a horizontal grid size of about 338 by 0.025 mm (13 by 0.001 inches). Some printers understand a certain level of graphics only. The LA50, for example, is a Level 1 printer and cannot operate at Level 2. In contrast, if you are using an LA210 printer, you can select either LA210 or Level 1.
Programming with Reflection
GraphicsOutputCursor property Syntax Works with Data type
object.GraphicsOutputCursor object.GraphicsOutputCursor = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the graphics output cursor is displayed. ReGIS displays two types of graphic cursors: an input cursor and an output cursor.
Properties Page 173
A graphics output cursor appears when ReGIS is waiting for commands from the host (or from the ReGIS command line). The input cursor appears when ReGIS is waiting for graphics input, such as a cursor position report. You can position the input cursor with the mouse or the arrow keys. This property has no effect on the graphics input cursor. Displaying the graphics output cursor can also be controlled by the ReGIS screen command S(C). An option to this ReGIS command controls the style of the graphics output cursor. Values The default value is True. Programming with Reflection
GraphicsPrintMode property Syntax Works with Data type
object.GraphicsPrintMode object.GraphicsPrintMode = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how graphics images are printed. Values The default value is rcCompress. rcCompress Prints vertically (that is, with the longest edge of the paper on the sides). rcRotate
Prints horizontally (that is, with the longest edge of the paper on the top and bottom).
rcExpand
Prints vertically, but with characters twice as high and twice as wide as for rcCompress.
Programming with Reflection
GraphicsScrolling property Syntax Works with Data type
object.GraphicsScrolling object.GraphicsScrolling = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not sixel images are scrolled. A sixel is a vertical column of six pixels used to display graphic images. When this property is set to True, the sixel image begins at the current text position and will scroll the display when the image reaches the bottom margin of the display (the image may also scroll off the top of the display if it doesn’t fit). A graphics new line character is sent immediately after the sixel dump, and the text cursor is set at the same position as the sixel cursor when you exit sixel mode. When this property is set to False, the sixel image begins at the top left of the display; when the image reaches the bottom margin, the display does not scroll, and additional sixel commands are ignored. Upon exiting sixel mode, the text cursor is set at the same position as when sixel mode was entered. Values The default value is False.
Properties Page 174
Programming with Reflection
GraphicsTerminalType property Syntax Works with Data type
object.GraphicsTerminalType object.GraphicsTerminalType = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which terminal is emulated, and how many shades or colors are available in ReGIS. Values The default value is rcVT340. rcVT240 Emulates a VT240 terminal, with 4 monochrome shades. rcVT241
Emulates a VT241 terminal, with 4-color capability.
rcVT330
Emulates a VT330 terminal, with 4 monochrome shades.
rcVT340
Emulates a VT340 terminal, with 16-color capability.
Programming with Reflection
Height property Syntax Works with Data type
object.Height object.Height = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the height (in pixels) of the main Reflection application window. This property does not affect the Reflection window if it is minimized or maximized. If Reflection is minimized or maximized when you change the value of this property, the change will take effect only when Reflection is restored to a normal window state. The returned value for this property when the window is maximized or minimized is the value the window will use when it is restored to a normal state. Values The default, minimum, and maximum values vary depending on the capacities of your monitor. Programming with Reflection
HorizontalCoupling property Syntax Works with Data type
Properties Page 175
object.HorizontalCoupling object.HorizontalCoupling = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the column in which the cursor is located remains in the terminal window regardless of how the terminal window is resized, or which screen font size is used. Values The default value is True. Programming with Reflection
HostCharacterSet property Syntax Works with Data type
object.HostCharacterSet object.HostCharacterSet = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the host character set Reflection uses when transmitting and receiving characters. This property lets you assign a supplemental character set as the default user-preferred supplemental (UPS) set. The combination of the ASCII and Digital Supplemental Graphic character sets is called the Multinational character set (MCS); the combination of the ASCII and ISO Latin-1 supplemental sets is called the ISO Latin Alphabet Number 1 set. These two supplemental sets are very similar, consisting of symbols and characters for English and many other western European languages. The UPS set assigned by this property is loaded as the default when a soft reset is performed (for example, with the ResetTerminal method) or when the DECSTR sequence is invoked. The UPS set can also be specified with the Select Character Set (SCS) sequence. Values The default value is rcHPRoman8 in Reflection for HP. The default is rcDECSupplemental in Reflection for UNIX and Digital and Reflection for ReGIS Graphics. The possible values are: rcDECSupplemental rcISOLatin_1 rcPC437_English rcPC850_Multilingual rcHPRoman8 rcPC852_Slavic rcPC855_Cyrillic rcPC857_Turkish rcPC860_Portuguese rcPC861_Icelandic rcPC863_CanadianFrench rcPC864_Arabic rcPC865_Nordic rcPC869_ModernGreek rcISOLatin_2 rcISOCyrllic rcISOArabic rcISOGreek
Properties Page 176
rcISOHebrew rcISOLatin_5 rcShiftJIS rcJIS1990 rcJIS1983 rcJIS1978 rcDECKanji1983 rcDECKanji1978 rcEUCKanji rcBig5 rcCCDC rcGBChinese rcKorean rcHPGreek rcDECGreek rcPC437G_Greek rcEastern_Europe_7bit rcPC866_Cyrillic rcJISKatakana rcNECN88 rcPC862_Hebrew rcHPHebrew rcDECHebrew rc7BitHebrew rcDECCyrillic rcHPTurkish rcDECTurkish rcPC220_Spanish rcPC437T_Turkish rcSBig5 rcThai988TISO rcThaiTISO rcThaiKU rcThaiPrime rcDGInternational rcWindows1250 rcLatinGreek7 rcISOLatin_9
Properties Page 177
Programming with Reflection
HostColorChanges property Syntax Works with Data type
object.HostColorChanges object.HostColorChanges = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection responds to host commands. When this property is set to True, the terminal color map can be set using either the ReGIS S(M) command or the restore color table (DECRSTS) control function. When HostColorChanges is set to False, Reflection does not change the color table in response to these commands. Reflection always allows the color table to be changed as a result of displaying a sixel, regardless of the value of HostColorChanges. Values The default value is True. Programming with Reflection
HostsFile property Syntax Works with Data type
object.HostsFile object.HostsFile = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the path to the hosts file used by Reflection to resolve host IP addresses when making network connections. The value of this property depends on your network software. Values The default value is "". Note Changing the value of this property in one instance of Reflection will affect any instance of Reflection that you run, and will also affect other Reflection products you have installed. This change will affect version 6.0 or later of Reflection for HP, Reflection for UNIX and Digital, or Reflection for ReGIS Graphics. Programming with Reflection
HostForDefaultSettings property Syntax Works with Data type
object.HostForDefaultSettings object.HostForDefaultSettings = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses default settings appropriate to a UNIX or an OpenVMS host. Changing the value of this property resets both the current and default values of the following properties:
Properties Page 178
Property DAResponse ReadTabAsSpaces VTBackspaceSends WRQFrameSize WRQHostSystem WRQStartupCommand
UNIX defaults rcVT320 False rcBackspaceKey 128 rcUNIX "To UNIX"
OpenVMS defaults rcVT420 True rcDeleteKey 512 rcVMS "To VMS"
Values The initial value is determined during Setup. The possible values are: rcUNIX Use UNIX defaults. rcOpenVMS
Use OpenVMS defaults.
Note The value of this property is saved in the registry. Changing this property affects all new instances of the current Reflection product. Programming with Reflection
HostRecordSeparator property Syntax Works with Data type
object.HostRecordSeparator object.HostRecordSeparator = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character to be used in the PC file as a record separator when an ASCII files is transfered from the host. This property is only relevant when the UseHostRecordSeparator property is True. For example, this statement specifies that a linefeed should be inserted as the PC file record separator: Session.HostRecordSeparator = Chr$(rcLF) This property only applies to ASCII file transfers using the WRQ/Reflection protocol. Values The default value is a carriage return and linefeed, which is represented as: Chr$(rcCR) & Chr$(rcLF) The string cannot be more than 259 characters long.
Properties Page 179
Programming with Reflection
HostStatusLine property Syntax Works with Data type
object.HostStatusLine object.HostStatusLine = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the current host status line display. The bottom line of the terminal window is reserved for the VT status line, a one-line display that shows information about the current session. Normally, the host software sets this option. Values The default value is rcNoStatusLine. rcNoStatusLine The VT status line is not displayed. rcIndicator
When HostStatusLine is set to rcIndicator it shows: •
•
rcHostWritable
The current row and column of the text cursor. The position of the text cursor is always relative to the display, starting from row 1, column 1 at the top left. The current status of the printer, appearing as “Printer: .” The depends on if the Logging on check box is selected in the Logging dialog box (click Logging on the File menu to display this dialog box).
Host applications can display messages on the host status line. The control function DECSASD determines whether the terminal window or the status line is the active area for displaying text.
Programming with Reflection
HostTriggerCharacter property Syntax Works with Data type
object.HostTriggerCharacter object.HostTriggerCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description An HP 3000 uses a DC1 ({bmc Dc1.bmp}) character as a prompt to indicate it is ready for input. This character is sent immediately after a host prompt. This property returns (first syntax line) or specifies (second syntax line) the character that Reflection expects as the host-prompt character. Before changing this value, turn on display functions or display controls to verify the actual host prompt character. In Reflection for HP, the Use host prompt check box in the Advanced HP Options dialog box (click Advanced on the Emulation tab in the Terminal Setup dialog box) affects the value of HostTriggerCharacter, and vice versa. For example, clearing Use host prompt automatically sets HostTriggerCharacter to an empty string (""), just as setting HostTriggerCharacter to Chr$(rcDC1) automatically selects Use Host Prompt.
Properties Page 180
Values The default value for Reflection for HP is the DC1 character, represented in Reflection Basic as Chr$(rcDC1); the default value for Reflection for UNIX and Digital and Reflection for ReGIS Graphics is a null, represented in Reflection Basic as Chr$(rcNUL). Example This example sets the host prompt character to a null: Session.HostTriggerCharacter = Chr$(rcNUL) This example saves the current host prompt to a variable and then restores it after several intervening commands: Dim prompt As String prompt = Session.HostTriggerCharacter . . . Session.HostTriggerCharacter = prompt
Programming with Reflection
HotspotColumn property Syntax Works with Data type
object.HotspotColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the column location of the first character of the most recently used hotspot. A click in the first column sets this property to one (1). Values This property is read-only. Programming with Reflection
HotspotLength property Syntax Works with Data type
object.HotspotLength HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the length of the most recently used hotspot. Values This property is read-only.
Properties Page 181
Programming with Reflection
HotspotRow property Syntax Works with Data type
object.HotspotRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the display memory row location of the most recently used hotspot. The first row in display memory is row 1. Values This property is read-only. Example Several Reflection commands refer to row and/or column coordinates, but handle these coordinates differently. GetText and MouseRow both use host-addressable coordinates. With host-addressable coordinates, the numeric value assigned to the top row of display memory depends on the kind of terminal you are emulating. (You can use DisplayMemoryTopRow to return this value.) HotspotRow always identifies the first row of display memory as 1, regardless of the terminal you are emulating. The MouseColumn property is set to 0 when the user clicks in the first column. HotspotColumn is set to 1 after a click in the same location. The following procedures return text associated with the most recent mouse or hotspot click, and work for all Reflection products and all terminal emulations. (The underscore line continuation character is used to break up long lines.) 'Get the text of the entire line containing the last mouse click. Function MouseClickRowText As String With Session MouseClickRowText = .GetText(.MouseRow, 0, .MouseRow, _ .DisplayColumns - 1) End With End Function 'Get the character at the last mouse click. Function MouseClickCharacter As String With Session MouseClickCharacter = .GetText(.MouseRow, .MouseColumn, _ .MouseRow, .MouseColumn) End With End Function 'Get the text of the entire line containing the last hotspot used. Function HotspotRowText As String With Session HotspotRowText = .GetText(.DisplayMemoryTopRow + .HotspotRow - 1, 0, _ .DisplayMemoryTopRow + .HotspotRow -1 , .DisplayColumns - 1) End With End Function 'Get the first character of the last hotspot used. Function HotspotFirstCharacter As String With Session HotspotFirstCharacter = .GetText(.DisplayMemoryTopRow + .HotspotRow - 1, _
Properties Page 182
.HotspotColumn - 1, .DisplayMemoryTopRow + .HotspotRow -1 , _ .HotspotColumn - 1) End With End Function Programming with Reflection
HotspotsChord property Syntax Works with Data type
object.HotspotsChord object.HotspotsChord = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the mouse button that activates a hotspot. Use HotspotsModifiers if you want to specify modifier keys (such as Shift, Alt, and Ctrl) that must be used in conjunction with the mouse button. Values The default value is rcLeftButton. rcLeftButton Clicking the left button activates a hotspot. rcMiddleButton
Clicking the middle button activates a hotspot.
rcRightButton
Clicking the right button activates a hotspot.
rcLeftButton_DoubleClick
Double-clicking the left button activates a hotspot.
rcMiddleButton_DoubleClick Double-clicking the middle button activates a hotspot. rcRightButton_DoubleClick
Double-clicking the right button activates a hotspot.
Example These lines specify that pressing Alt while clicking the right mouse button activates hotspots: Session.HotspotsChord = rcRightButton Session.HotspotsModifiers = rcAlt These lines specify that pressing Alt and Shift while double-clicking the left mouse button activates hotspots: Session.HotspotsChord = rcLeftButton_DoubleClick Session.HotspotsModifiers = rcAlt+rcShift These lines return to the default mouse chord settings for hotspots. Clicking the left mouse button activates hotspots Session.HotspotsChord = rcLeftButton Session.HotspotsModifiers = 0
Properties Page 183
Programming with Reflection
HotspotsEnabled property Syntax Works with Data type
object.HotspotsEnabled object.HotspotsEnabled = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether defined hotspots are active. When this property is True, hotspots are enabled. The appearance of enabled hotspots is determined by the value of the HotspotsVisible property. When this property is False, hotspots are not active and hotspots do not appear as buttons on screen. Values The default value is False. Programming with Reflection
HotspotsModifiers property Syntax Works with Data type
object.HotspotsModifiers object.HotspotsModifiers = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the modifier keys that must be used in conjunction with a mouse click to activate a hotspot. To specify that more than one modifier key must be used, you can add values for this property as shown here: .HotspotsModifiers = rcAlt + rcCtrl Use HotspotsChord if you want to change the mouse button and/or the number of clicks needed to activate a hotspot. Values The default value is rcNormalKey (zero). rcNormalKey No modifier keys are needed to activate hotspots. rcAlt
The Alt key must be used with the mouse to activate hotspots.
rcCtrl
The Ctrl key must be used with the mouse to activate hotspots.
rcShift
The Shift key must be used with the mouse to activate hotspots.
Properties Page 184
Programming with Reflection
HotspotsVisible property Syntax Works with Data type
object.HotspotsVisible object.HotspotsVisible = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether hotspots are visible in the terminal window. When this property is True and HotspotsEnabled is True, hotspots in the terminal window look like buttons. When this property is False, hotspots remain active, but do not look like buttons on screen. When you move the mouse pointer over a hotspot, it changes from an I-bar to an arrow, just as it does with visible hotspots. Values The default value is True. Programming with Reflection
HotspotText property Syntax Works with Data type
object.HotspotText HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the text of the most recently used hotspot. Values This property is read-only. Programming with Reflection
ImageCurrentColors property Syntax Works with Data type
object.ImageCurrentColors object.ImageCurrentColors = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens when color bitmaps are pasted from the Clipboard. When this property is set to True, 256-color bitmaps pasted from the Clipboard are dithered to the current color map values. When this property is set to False, the color map that best represents the colors in the pasted bitmap is calculated. The dithering options are controlled by the ImageDither property. Values The default value is False.
Properties Page 185
Programming with Reflection
ImageDither property Syntax Works with Data type
object.ImageDither object.ImageDither = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what happens when a 256-color image is pasted into the Reflection terminal window from the Clipboard. Because Reflection for ReGIS Graphics emulates a 16-color terminal, Reflection uses an algorithm to determine exactly how colors should be mapped. Try all three values to see which works best for a particular image. Values The default value is rcPartialDither. rcNoDither Pasted images are smooth in texture, with distinct color boundaries. rcPartialDither
Midway between rcNoDither and rcFullDither.
rcFullDither
Color boundaries are less precise, but images can have a grainy, textured appearance.
Programming with Reflection
ImageFleshtones property Syntax Works with Data type
object.ImageFleshtones object.ImageFleshtones = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens when a 256-color image is pasted into the Reflection terminal window from the Clipboard. Since Reflection for ReGIS Graphics emulates a 16-color terminal, Reflection uses an algorithm to determine exactly how colors should be mapped. Setting ImageFleshtones to True causes Reflection to give more priority to accurately representing colors like red, brown, yellow, and pink from the original 256-color image, rather than to colors like blue and green. Try both True and False to see which value works best for a particular image. Values The default value is False. Programming with Reflection
InhibitDC2 property Syntax Works with Data type
Properties Page 186
object.InhibitDC2 object.InhibitDC2 = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not Reflection inhibits the {bmc Dc2.bmp} portion of the data block transfer handshake between the host and Reflection Setting this property to True inhibits the {bmc Dc2.bmp} portion of the data block transfer. Values The default value is False (except in VT emulation mode). Programming with Reflection
InhibitHandshake property Syntax Works with Data type
object.InhibitHandshake object.InhibitHandshake = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the {bmc Dc1.bmp} handshake for block transfers is inhibited. Setting this property to True inhibits the {bmc Dc1.bmp} handshake. Values The default value is False (except in VT emulation mode). Programming with Reflection
InsertMode property Syntax Works with Data type
object.InsertMode object.InsertMode = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether characters can be added to text in the terminal window without typing over existing characters. When this property is set to False, typing over existing characters replaces those characters. When this property is set to True, new characters are inserted at the cursor location, and existing characters are moved to the right. This property is relevant when Reflection is in block mode. Values The default value is False. The value of this property is not saved to a settings file. Note If you are using Reflection for UNIX and Digital or Reflection for ReGIS Graphics, you should leave this property set to the default value. Host applications will not work correctly when insert mode has been changed only on the computer that is running Reflection.
Properties Page 187
Programming with Reflection
InverseVideo property Syntax Works with Data type
object.InverseVideo object.InverseVideo = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the foreground and background colors for screen attributes are reversed. Values The default value is False. Programming with Reflection
JISRomanG0 property Syntax Works with Data type
object.JISRomanG0 object.JISRomanG0= Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property returns (first syntax line) or specifies (second syntax line) how character 92 is displayed by default when HostCharacterSet is set to rcDECKanji1983 or rcDECKanji1978. When this property is set to True, by default Reflection displays character 92 as a Yen character and the character set in G0 is JIS-Roman. When this parameter is set to False, by default Reflection displays character 92 as a backslash character ( \ ) and the character set in G0 is ASCII instead of JIS-Roman. Values The default is True. Note: The last character in this property is the number zero, not the letter O. Programming with Reflection
JumpScrollSpeed property Syntax Works with Data type
object.JumpScrollSpeed object.JumpScrollSpeed = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how Reflection manages data entering display memory. Setting JumpScrollSpeed to rcScrollBy1 refreshes the screen every time a line enters display memory. Higher numerical values (rcScrollBy2, rcScrollBy4, and so on, up to rcScrollBy128) refresh the screen after the specified number of lines have entered display memory—assuming data is entering display memory too fast for the display to keep up.
Properties Page 188
Setting JumpScrollSpeed to rcUnlimitedScroll lets any amount of data enter display memory regardless of whether the display can keep up. So, for example, if you’re reading a file into display memory, you may only see the end of that file on the screen if JumpScrollSpeed is set to rcUnlimitedScroll because it entered display memory so fast that the screen did not refresh until the file was completely read in. Setting JumpScrollSpeed to rcScrollByPage causes the screen to be refreshed at least once per page, thus assuring that all data entering display memory is sent to the screen. This setting is only relevant when the value of the SmoothScroll property is False (which sets the scrolling option on the Screen tab of the Display Setup dialog box to Jump). Values The default is rcScrollBy2 in Reflection for HP and Reflection for UNIX and Digital. The default is rcScrollBy4 in Reflection for ReGIS Graphics. rcScrollBy1 No more than one line can enter display memory before the screen is refreshed. rcScrollBy2
No more than 2 lines can enter display memory before the screen is refreshed.
rcScrollBy4
No more than 4 lines can enter display memory before the screen is refreshed.
rcScrollBy8
No more than 8 lines can enter display memory before the screen is refreshed.
rcScrollBy16
No more than 16 lines can enter display memory before the screen is refreshed.
rcScrollBy32
No more than 32 lines can enter display memory before the screen is refreshed.
rcScrollBy64
No more than 64 lines can enter display memory before the screen is refreshed.
rcScrollBy128
No more than 128 lines can enter display memory before the screen is refreshed.
rcScrollByPage
No more than a page of text can enter display memory before the screen is refreshed.
rcUnlimitedScroll
The display is refreshed as opportunity allows—some text may not actually appear on the screen as it’s read into display memory.
Programming with Reflection
KatakanaDisplay property Syntax Works with Data type
object.KatakanaDisplay object.KatakanaDisplay = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the Katakana or Kanji character set is used by default when HostCharacterSet is set to rcDECKanji1983 or rcDECKanji1978. When this property is set to True, Reflection uses the Katakana character set as the default. When this property is set to False, Reflection uses the Kanji character set as the default. Values The default value is False.
Properties Page 189
Programming with Reflection
KermitAutomaticServer property Syntax Works with Data type
object.KermitAutomaticServer object.KermitAutomaticServer = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how Reflection interacts with the host Kermit program. If this property is set to True, Reflection interacts with the host Kermit program in the following manner: • When the user first opens the File Transfer dialog box, no interaction with the host occurs. • When the user requests a Kermit transfer, the host is put into server mode by transmitting the Server Startup command (specified with the KermitServerStartupCommand property). If no sequence is specified, then Reflection assumes that the host Kermit is already in server mode and takes no action other than to set a flag indicating that the host is in server mode. • As long as the File Transfer dialog box remains open, the host Kermit program is left in server mode; transfers occur as the user requests them. • When the user dismisses the file transfer dialog box, clicks on Setup, or changes the protocol, the KermitStopServer method is used to shut down the host Kermit program. This property is only relevant for transfers from the File Transfer dialog box. For programmatic transfers, use the KermitStartServer method to start the host Kermit server program. Values The default value is False. Programming with Reflection
KermitChecksum property Syntax Works with Data type
object.KermitChecksum object.KermitChecksum = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Kermit supports three kinds of error checking: single-byte checksum, double-byte checksum, and three-byte CRC. This property returns (first syntax line) or specifies (second syntax line) which level of error checking is used. During file transfers, Reflection uses the level of error checking specified, unless the Kermit program at the other end of the transfer does not support that level, in which case the highest level the remote system supports is used (CRC is highest; single-byte checksum is lowest). Single-byte is fastest, but CRC provides the most thorough error checking. Values The default value is rcCRC. rcChecksum1Byte Kermit uses single-byte checksum. rcChecksum2Byte
Kermit uses double-byte checksum.
rcCRC
Kermit uses three-byte CRC checksum.
Properties Page 190
Programming with Reflection
KermitPacketSize property Syntax Works with Data type
object.KermitPacketSize object.KermitPacketSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the desired packet size for Kermit transfers (in bytes). This property only affects transfers from the host. For transfers to the host, the packet size is determined by the host Kermit program. If the remote Kermit program does not support long packets, the packet size is adjusted to 94 bytes. Programs that support packet sizes greater than 94 bytes are known as “SuperKermit” programs. Values The default value is 512. The range of values is 32-2048. Programming with Reflection
KermitReceiveEndCharacter property Syntax Works with Data type
object.KermitReceiveEndCharacter object.KermitReceiveEndCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that indicates the end of a packet of data received from the host. If this property is changed in Reflection, the corresponding value must also be changed in the remote Kermit program. Values The default value is a carriage return character, represented in Reflection Basic as Chr$(rcCR). Programming with Reflection
KermitReceiveStartCharacter property Syntax Works with Data type
object.KermitReceiveStartCharacter object.KermitReceiveStartCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that indicates the beginning of a packet of data received from the host. The default is appropriate for most systems. If this property is changed in Reflection, the corresponding value must also be changed in the remote Kermit program. Values The default value is a start-of-header character, represented in Reflection Basic as Chr$(rcSOH).
Properties Page 191
Programming with Reflection
KermitReceiveStartupCommand property Syntax Works with Data type
object.KermitReceiveStartupCommand object.KermitReceiveStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the command that directs the host Kermit program to receive a file from the local computer. This property is most useful for sending files from the File Transfer dialog box, as a way of telling the host Kermit what kinds of files to receive or how to receive them. Values The default value is "". Programming with Reflection
KermitSendEndCharacter property Syntax Works with Data type
object.KermitSendEndCharacter object.KermitSendEndCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that indicates the end of a packet of data sent to the host. If this property is changed in Reflection, the corresponding value must also be changed in the remote Kermit program. Values The default value is a carriage return character, represented in Reflection Basic as Chr$(rcCR). Programming with Reflection
KermitSendStartCharacter property Syntax Works with Data type
object.KermitSendStartCharacter object.KermitSendStartCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that indicates the beginning of a packet of data sent to the host. If this property is changed in Reflection, the corresponding value must also be changed in the remote Kermit program. Values The default value is a start-of-header character, represented in Reflection Basic as Chr$(rcSOH).
Properties Page 192
Programming with Reflection
KermitSendStartupCommand property Syntax Works with Data type
object.KermitSendStartupCommand object.KermitSendStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the command that directs the host Kermit program to send one or more files to the local computer. This property is most useful for receiving files from the File Transfer dialog box, as a way of telling the host Kermit what kinds of files to send or how to send them. Values The default value is "". Programming with Reflection
KermitServerStartupCommand property Syntax Works with Data type
object.KermitServerStartupCommand object.KermitServerStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the string sent to the host to start the host Kermit server program, either when the KermitStartServer method is executed, or, if the KermitAutomaticServer property is set to True, as soon as the user initiates a Kermit file transfer from the File Transfer dialog box. If this string is empty (""), it is assumed that the host Kermit is already in server mode, and no action is taken other than to update Reflection’s state so that it knows the host is in server mode. Values The default value is "". Programming with Reflection
KermitTransferType property Syntax Works with Data type
object.KermitTransferType object.KermitTransferType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the transfer type for Kermit transfers. This property is automatically set every time you perform a Kermit transfer from the File Transfer dialog box. The value also becomes the default for the next transfer from the File Transfer dialog box. This property has no effect on programmatic transfers—if you don’t explicitly specify a transfer type, the default is always binary. Values The default value is rcBinary.
Properties Page 193
rcASCII
Sets the default transfer type for Kermit transfers from the File Transfer dialog box to ASCII. If the KermitTranslateCharacters property is set to True, the following translations are performed: • Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box). • Relevant Translation options for ASCII transfers (as specified on the Translation tab in the File Transfer Setup dialog box). If KermitTranslateCharacters is set to False, record separator characters may still be still translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl-Z character may be still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed.
rcBinary
Sets the default transfer type for Kermit transfers from the File Transfer dialog box to binary. No characters are translated.
rcAutoDetect The transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Programming with Reflection
KermitTranslateCharacters property Syntax Works with Data type
object.KermitTranslateCharacters object.KermitTranslateCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property affects ASCII transfers from the File Transfer dialog box. When this property is set to True, Reflection performs the character set translations specified on the Translation tab in the File Transfer Setup dialog box, as well as the translations between the host character set and the PC character set, as specified on the Emulation tab in the Terminal Setup dialog box. Values The default value is False. Programming with Reflection
KermitTranslateFilenames property Syntax Works with Data type
Properties Page 194
object.KermitTranslateFilenames object.KermitTranslateFilenames = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the File name translation options on the Translation tab in the File Transfer Setup dialog box are used for Kermit transfers. These options correspond to the following properties: {bmc jump.bmp} Transfer8Dot3FilenameCase {bmc jump.bmp} TransferReceiveAs8Dot3 {bmc jump.bmp} TransferSpacesToUnderscores {bmc jump.bmp} TransferUnderscoresToSpaces Values The default value is False. Programming with Reflection
KermitWindowSize property Syntax Works with Data type
object.KermitWindowSize object.KermitWindowSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description If the remote Kermit program supports sliding windows, this property determines the size of a sliding window, in packets. This value is 0-based, so the default value (1) actually configures Reflection for a twopacket sliding window under Kermit. Kermit programs that support sliding windows are often designated “SuperKermit” programs. Values The default value is 1. The range of possible values is 0-31. Programming with Reflection
KeyboardLocked property Syntax Works with Data type
object.KeyboardLocked object.KeyboardLocked = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not the keyboard and the toolbar are locked (that is, they cannot be used). When this property is set to True, the keyboard and toolbar cannot be used. Values The default value is False. The value of this property is not saved to a settings file. Notes: The mouse and keyboard are still available to select Reflection menu items when this property is True. You can use SetPropertyProfile if you don’t want this property to be modifiable in the View Settings dialog.
Properties Page 195
Programming with Reflection
Language property Syntax Works with Data type
object.Language HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Reflection is available in English, French, German, Japanese, and Swedish versions. This property returns the language of the current version of Reflection. Values This property is read-only. rcEnglish The current version is the English version. rcFrench
The current version is the French version.
rcGerman
The current version is the German version.
rcJapanese
The current version is the Japanese version.
rcSwedish
The current version is the Swedish version.
rcLanguageUnknownThe current language is not recognized by Reflection.
Programming with Reflection
Left property Syntax Works with Data type
object.Left object.Left = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the distance (in pixels) between the left edge of the display and the left edge of the main Reflection application window. This property does not affect the Reflection window if it is minimized or maximized. If Reflection is minimized or maximized when you change the value of this property, the change will take effect only when Reflection is restored to a normal window state. The returned value for this property when the window is maximized or minimized is the value the window will use when it is restored to a normal state. Values The default, minimum, and maximum values vary depending on the capabilities of your monitor. Programming with Reflection
LeftMargin property Syntax Works with Data type
Properties Page 196
object.LeftMargin object.LeftMargin = Value HP Integer
Description Returns (first syntax line) or specifies (second syntax line) the left margin for display memory, in columns, counting from the left edge of the terminal window.. Values The default value is 0. The range of values is from 0 to 512. This value should be at least one less than the value for the RightMargin property. This value is 0-based—the first column is column 0, and the 80th column is column 79. Programming with Reflection
LineDrawSubset property Syntax Works with Data type
object.LineDrawSubset object.LineDrawSubset = Value HP Boolean
Description Reflection products for DOS are limited to the line drawing characters available in DOS. In Reflection products, all line drawing characters are implemented accurately. If you run command files that were created for Reflection products for DOS, you may need to set LineDrawSubset to True. Values The default value is False. Programming with Reflection
LocalEcho property Syntax Works with Data type
object.LocalEcho object.LocalEcho = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the local computer should “echo” typed characters directly to the screen. When a host connection exists, the Online property is set to True, and LocalEcho is set to True, typed characters appear on the screen twice: once when echoed from the local computer, once when echoed back from the host. Set LocalEcho to True only for communication with a host system that does not echo typed characters. When Reflection is in local or block mode, characters are echoed locally even if LocalEcho is set to False. Values The default value is False.
Properties Page 197
Programming with Reflection
MacroData property Syntax Works with Data type
object.MacroData object.MacroData = Value HP, UNIX and Digital, and ReGIS Graphics String
Returns (first syntax line) or specifies (second syntax line) a string that passes information to a macro. If you run a macro using the Macros dialog box, MacroData is set equal to the value specified in the Macro data box. If you run a macro using the RunMacro method, MacroData is set equal to the value of the MacroData argument. Values The default value is "". This string can be up to 259 characters long. Programming with Reflection
MacrographReports property Syntax Works with Data type
object.MacrographReports object.MacrographReports = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether macrograph reporting is enabled. A macrograph is a way to define and store a set of ReGIS commands as a single character; that is, as a graphics macro. By default, ReGIS can report the contents of a specific macrograph. For security or other reasons, you may not want to allow macrograph reporting; in this situation, set this property to False. Values The default value is True. Programming with Reflection
MaintainUnscaledImage property Syntax Works with Data type
object.MaintainUnscaledImage object.MaintainUnscaledImage = Value ReGIS Graphics Boolean
Description By default, Reflection scales graphics images down so that an entire image fits on the PC display. Set this property to True if you want to see an image as it would appear on a terminal display. Use Alt with the arrow keys to pan the window. Values The default value is False.
Properties Page 198
Programming with Reflection
MarginBell property Syntax Works with Data type
object.MarginBell object.MarginBell = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a bell should sound when the cursor reaches the column that is eight spaces short of the right margin. Values The default value is True. Programming with Reflection
MinimizeCPUUsage property Syntax Works with Data type
object.MinimizeCPUUsage object.MinimizeCPUUsage = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is False, Reflection checks for host output continuously for a fraction of a second after every keystroke. This allows Reflection to display host information as soon as it is available, but may cause Reflection to slow down other applications slightly. To reduce this effect on other applications, set MinimizeCPUUsage to True. Use the second syntax line shown above to specify a new value for this property. Use the first syntax line to return the current value. Values The default value is False. Programming with Reflection
MouseColumn property Syntax Works with Data type
object.MouseColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) the column location where the mouse was last clicked within the terminal screen. A click in the first column sets this property to zero (0). Values This property is read-only.
Properties Page 199
Programming with Reflection
MouseRow property Syntax Works with Data type
object.MouseRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the row location, in host-addressable coordinates, where the mouse was last clicked within the terminal screen. Values This property is read-only. Programming with Reflection
MultiplePageTerminal property Syntax Works with Data type
object.MultiplePageTerminal object.MultiplePageTerminal = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description With Reflection, your PC can emulate a multi-page terminal that dynamically stores data. But some applications designed for Digital terminals require that the terminal have only a single page of memory (24 lines). If you’re running a host application that requires single-page mode, set this property to False. Values The default value is True. In Reflection for HP, this property is relevant only in VT emulation mode, and controls whether data that scrolls off the display is saved to display memory. Programming with Reflection
Name property Syntax Works with Data type
object.Name HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the name of the Reflection product (“Reflection for HP,” “Reflection for UNIX and Digital,” or “Reflection for ReGIS Graphics”). Values This property is read-only.
Properties Page 200
Programming with Reflection
NationalReplacementSet property Syntax Works with Data type
object.NationalReplacementSet object.NationalReplacementSet = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) a set of character translations that occur between the local computer and the host in 7-bit mode. This property affects how characters entered from the keyboard or from a local file are transmitted to the host, and how characters sent from the host are written to local files, to the screen, or both. See your Reflection Terminal Reference for a chart showing character replacements for various languages. Translations are not performed unless the UseNRC property is set to True. Values The default is rcNone. rcNone rcUSASCII is an acceptable synonym rcBritish rcCanadianEnglish (Reflection for HP only) rcCanadianFrench rcDanish (Reflection for HP only) rcDutch rcEuropeanSpanish (Reflection for HP only) rcFinnish rcFlemish (Reflection for HP only) rcFrench rcGerman rcItalian rcLatinSpanish rcNorwegian rcPortuguese (Reflection for UNIX and Digital, Reflection for ReGIS Graphics) rcSwedish rcSwissFrench (Reflection for HP only) rcSwissGerman
Programming with Reflection
NativeOS property Syntax Works with Data type
object.NativeOS HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the operating system for which the current instance of Reflection was built. Values This property is read-only.
Properties Page 201
Programming with Reflection
NewPageOnClear property Syntax Works with Data type
object.NewPageOnClear object.NewPageOnClear = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens to the data on screen when the host clears the display. Applications running on the host often send down escape sequences to clear the screen in whole or in part. When the screen is cleared, the data that was displayed is lost. This property allows you to retain the data that would otherwise be lost. When this property is set to True and such an escape sequence is received, the current display is cleared from view and saved in display memory, and the cursor is positioned at the top of the screen. Values The default value is True. In Reflection for HP, this property is relevant only in VT emulation mode. Programming with Reflection
NullsToDevices property Syntax Works with Data type
object.NullsToDevices object.NullsToDevices = Value HP Boolean
Description When this property is set to True, nulls in data strings sent from the host by means of the {bmc Esc.bmp}&pW and {bmc Esc.bmp}&pdW escape sequences are passed through to the specified “to” devices. When NullsToDevices is set to True, Reflection’s behavior differs from that of HP terminals, which by default do not pass nulls in such data strings through to the “to” devices. Values The default value is True. Programming with Reflection
NumLock property Syntax Works with Data type
object.NumLock object.NumLock = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the NumLock keyboard function is on or off. When this property is True, keypad keys are in numeric mode; when it’s False, keypad keys are in cursor-positioning mode.
Properties Page 202
Values The default value depends on the current system-wide NumLock setting. The value of this property is not saved to a settings file. Note By default, Reflection uses the current system-wide setting for NumLock . If want to have Reflection control the NumLock state, use the GlobalNumLock property. Programming with Reflection
OLEServerName property Syntax Works with Data type
object.OLEServerName object.OLEServerName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the name that Reflection registers with OLE to identify the instance of Reflection. This name can be used with the GetObject function to “attach” to a running copy of Reflection via OLE Automation. If there are multiple instances of Reflection running simultaneously, setting this property to a unique name for each instance gives you a way to guarantee which instance you’ll attach to with GetObject. For example, you could use the following statements to attach to a running copy of Reflection 1: Dim o As Object Set o = GetObject("R1WIN") This is equivalent to the following: Dim o As Object Set o = GetObject(,"Reflection1.Session") In the first example, the name of the OLE object (R1WIN) can be changed by the user with the OLEServerName property, then used by GetObject to attach to a specific instance of Reflection. In the second example, the “object class name” (Reflection1.Session) is fixed and cannot be changed; using GetObject will attach to an arbitrary instance of Reflection. When the name of the OLE object is changed using the OLEServerName property, the new name is reregistered with OLE, and the previous name is de-registered. Setting OLEServerName to an empty string deregisters that instance of Reflection, and you cannot use GetObject as in the first example above to attach to a running copy of Reflection; you must use the second form of GetObject above. Values The default value is “R1WIN” in Reflection for HP, “R2WIN” in Reflection for UNIX and Digital, and “R4WIN” in Reflection for ReGIS Graphics. The string can be up to 31 characters long.
Properties Page 203
Programming with Reflection
OnDemandFonts property Syntax Works with Data type
object.OnDemandFonts object.OnDemandFonts = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Values On-demand font-loading (ODL) is a Digital Japan feature that has been added to version 5.2 of Reflection (along with related features such as VT382 font-preloading and Gyoukan-Keisen line drawing). Set this property to True if you are using an EUC double-byte Japanese character set and want ODL to be used for xA121-xFE7E. The default value is False. Programming with Reflection
Online property Syntax Works with Data type
object.Online object.Online = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection is in remote mode or local mode. In remote mode (that is, when the Online property is set to True), Reflection transmits each character typed at the keyboard out the datacomm port. As characters are received back from the host they are displayed on the screen. If there is no connection, characters are not echoed. In local mode (when Online is set to False), Reflection immediately displays what is typed on the screen, without attempting to send it out the datacomm port. Data received from the host is discarded. Values The default value is True. Programming with Reflection
PageCoupling property Syntax Works with Data type
object.PageCoupling object.PageCoupling = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the cursor is coupled to the current page in page memory or whether moving the cursor to another page automatically causes that page to be displayed. Values The default value is True.
Properties Page 204
Programming with Reflection
Parent property Syntax Works with Data type
object.Parent HP, UNIX and Digital, and ReGIS Graphics Object
Description Returns the Reflection Session object. Values This property is read-only. Programming with Reflection
PasteBufferSize property Syntax Works with Data type
object.PasteBufferSize object.PasteBufferSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of a “paste block,” which is the number of characters pasted from the Clipboard to the terminal window before a pause occurs. See the description for the PasteDelay property for information on configuring the length of the pause and on conditions that can terminate the pause. Values The default value is 78. The range of values is 1 to 80. Programming with Reflection
PasteDelay property Syntax Works with Data type
object.PasteDelay object.PasteDelay = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) how many tenths of a second Reflection is to wait between “paste blocks” when pasting data from the Clipboard into display memory. (See the description for the PasteBufferSize property for information on configuring the size of a paste block.) Values The default value is 50. The range of values is 0-500.
Properties Page 205
Programming with Reflection
Path property Syntax Works with Data type
object.Path HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the path to the folder in which Reflection is installed. Values This property is read-only. Programming with Reflection
PCRecordSeparator property Syntax Works with Data type
object.PCRecordSeparator object.PCRecordSeparator = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that is interpreted as a record separator in a PC ASCII file when it is transfered to the host. This property is only relevant when the UsePCRecordSeparator property is True. For example, this statement specifies that a LF in the PC file should be interpreted as the record separator: Session.PCRecordSeparator = Chr$(rcLF) This property only applies to ASCII file transfers using the WRQ/Reflection protocol. Values The default value is a carriage return and linefeed, which is represented as: Chr$(rcCR) & Chr$(rcLF) The string cannot be more than 259 characters long. Programming with Reflection
PCUserName property Syntax Works with Data type
object.PCUserName HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the current user name for the computer that is running Reflection. (The user name is entered in the Logon Information dialog box when you start Windows.) For example, to display the current user name: MsgBox Session.PCUserName Values This property is read-only.
Properties Page 206
Programming with Reflection
PPLActivityTimeout property Syntax Works with Data type
object.PPLActivityTimeout object.PPLActivityTimeout = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description This property is no longer used. Programming with Reflection
PPLStartupCommand property Syntax Works with Data type
object.PPLStartupCommand object.PPLStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description This property is no longer used. Programming with Reflection
PreserveFormFeeds property Syntax Works with Data type
object.PreserveFormFeeds object.PreserveFormFeeds = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether formfeeds entering display memory are kept. This affects logging and copying operations that send data to the “to” devices. If you do not want formfeeds in host data to be kept and passed on to the printer or disk file, set this property to False. Values The default value is True. Programming with Reflection
PreserveNRC property Syntax Works with Data type
object.PreserveNRC object.PreserveNRC = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Digital terminals reset national replacement mode when a soft reset occurs. To preserve national replacement mode, set this property to True.
Properties Page 207
In Reflection for HP, this property is relevant only in VT emulation mode. Values The default value is False. Programming with Reflection
PrimaryStatusResponse property Syntax Works with Data type
object.PrimaryStatusResponse object.PrimaryStatusResponse = Value HP Enumeration
Description HP 3000s can query terminals to find out how much display memory is available. This property returns (first syntax line) or specifies (second syntax line) Reflection’s response to such queries. It does not actually check available memory or allocate any new display memory. Values The default value is rc15k. rc4k rc8k rc12k rc15k
Programming with Reflection
PrintANSIColorBackground property Syntax Works with Data type
object.PrintANSIColorBackground object.PrintANSIColorBackground = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection prints the background ANSI color. Values The default value is False.
Properties Page 208
Programming with Reflection
PrinterAutoRowSize property Syntax Works with Data type
object.PrinterAutoRowSize object.PrinterAutoRowSize = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection automatically sets the number of rows to be printed on each page. When this property is True, Reflection automatically calculates the number of rows to be printed based on the current settings for paper size, page orientation, margins, number of columns, and font. The value of PrinterRows is automatically adjusted when any of these settings is changed, so that printed output will fill the page. The following command turns automatic row sizing on: Session.PrinterAutoRowSize = True When this property is False, the current value of PrinterRows is not affected by changes to other page settings. Values The default value is False. Programming with Reflection
PrinterBottomMargin property Syntax Works with Data type
object.PrinterBottomMargin object.PrinterBottomMargin = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description This property is no longer used. Values The default value is 6. The range of values is 0-20. Programming with Reflection
PrinterColumns property Syntax Works with Data type
object.PrinterColumns object.PrinterColumns = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the maximum width (in characters) for a printed line. For example, to change the number of printed columns to 132: Session.PrinterColumns = 132 Values The default value is 80. The range of values is 10-512.
Properties Page 209
Notes When PrinterColumnsTiedToDisplay is True (the default value), changing the value of the DisplayColumns property automatically changes the value of PrinterColumns. When PrinterColumnsSetOrientation is True, changing the value of PrinterColumns may change the current value of PrinterOrientation. Programming with Reflection
PrinterColumnsSetOrientation property Syntax Works with Data type
object.PrinterColumnsSetOrientation object.PrinterColumnsSetOrientation = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection automatically sets the current printer page orientation based on the number of columns to be printed. (The number of columns to be printed is determined by the PrinterColumns property). When this property is True and PrinterColumns is less than 132, Reflection automatically selects portrait page orientation (PrinterOrientation = rcPortraitOrientation). When PrinterColumns is 132 or greater, Reflection automatically selects landscape orientation (PrinterOrientation = rcLandscapeOrientation). To set this property to True: Session.PrinterColumnsSetOrientation = True When this property is False, PrinterOrientation is not affected by changes to the PrinterColumns property. Values The default value is False. Programming with Reflection
PrinterColumnsTiedToDisplay property Syntax Works with Data type
object.PrinterColumnsTiedToDisplay object.PrinterColumnsTiedToDisplay = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether changing the number of columns in the screen display automatically changes the number of columns to be printed. When this property is True, Changing the value of the DisplayColumns property automatically changes the value of the PrinterColumns property, so that these two values are always equal. When this property is False, changing DisplayColumns has no effect on PrinterColumns. To set this property to False: Session.PrinterColumnsTiedToDisplay = False Values The default value is True.
Properties Page 210
Programming with Reflection
PrinterFitFontToPage property Syntax Works with Data type
object.PrinterFitFontToPage object.PrinterFitFontToPage = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection automatically adjusts both height and width when calculating font size. When this property is False, Reflection considers limiting factors of height or width when determining font size. Printed fonts will always be correctly proportioned, but the text may not fill the printed page. When this property is True, both height and width are adjusted (based on the page size and the number of rows and columns on the page) when determining font size so that text will always fill the printed page. These adjustments may give the font a distorted appearance. Values The default value is False. Programming with Reflection
PrinterFontName property Syntax Works with Data type
object.PrinterFontName object.PrinterFontName = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the font used by Reflection when printing. Reflection uses the default printer font if this property is set to an empty string ("") or if the UseDefaultPrinterFont property is set to True. Values The default value is "". This value is not case sensitive. The maximum length of this string is 32 characters. Programming with Reflection
PrinterInverseFont property Syntax Works with Data type
object.PrinterInverseFont object.PrinterInverseFont = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the inverse character attribute should be ignored for printing. This property should be set to False for printers that are unable to print inverse fonts. Values The default value is False.
Properties Page 211
Programming with Reflection
PrinterLogging property Syntax Works with Data type
object.PrinterLogging object.PrinterLogging = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether data received into display memory, either from datacomm or from the keyboard, is sent to the printer (or to a file) when a linefeed is received. In Reflection for HP, setting PrinterLogging to True automatically sets PrinterLogTop to False, and vice versa. Also, turning on Record Mode automatically sets both PrinterLogging and PrinterLogTop to False. To log to a file instead of the printer, do the following: • Make sure PrinterLogging is set to True. • Set the PrintToFile property to a valid file name. Reflection doesn’t log a line of data until it encounters a linefeed. Values The default value is False. The value of this property is not saved to a settings file. Programming with Reflection
PrinterLogTop property Syntax Works with Data type
object.PrinterLogTop object.PrinterLogTop = Value HP Boolean
Description When PrinterLogTop is set to True, data is sent to the printer (or to a file) as it scrolls off the top of display memory. Setting PrinterLogTop to True automatically sets PrinterLogging to False, and vice versa. Values The default value is False. The value of this property is not saved to a settings file. Programming with Reflection
PrinterMarginBottom property Syntax Works with Data type
object.PrinterMarginBottom object.PrinterMarginBottom = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the bottom margin of printed output. The value is in “twips” (a twip is one twentieth of a point). There are 1440 twips to an inch.
Properties Page 212
Values The default is 1440. The range of values is 0-32767. Note Changing the margin size changes the font size of the printed output. Programming with Reflection
PrinterMarginLeft property Syntax Works with Data type
object.PrinterMarginLeft object.PrinterMarginLeft = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the left margin of printed output. The value is in “twips” (a twip is one twentieth of a point). There are 1440 twips to an inch. Values The default is 1440. The range of values is 0-32767. Note Changing the margin size changes the font size of the printed output. Programming with Reflection
PrinterMarginRight property Syntax Works with Data type
object.PrinterMarginRight object.PrinterMarginRight = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the right margin of printed output. The value is in "twips” (a twip is one twentieth of a point). There are 1440 twips to an inch. Values The default is 1440. The range of values is 0-32767. Note Changing the margin size changes the font size of the printed output.
Properties Page 213
Programming with Reflection
PrinterMarginTop property Syntax Works with Data type
object.PrinterMarginTop object.PrinterMarginTop = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the top margin of printed output. The value is in “twips” (a twip is one twentieth of a point). There are 1440 twips to an inch. Values The default is 1440. The range of values is 0-32767. Note Changing the margin size changes the font size of the printed output. Programming with Reflection
PrinterOrientation property Syntax Works with Data type
object.PrinterOrientation object.PrinterOrientation = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the printer page orientation used by Reflection. Changing the value of this property affects printing done by Reflection, but does not change your operating system’s printer settings. For example, to have Reflection print using landscape orientation: Session.PrinterOrientation = rcLandscapeOrientation Values The default value is rcDefaultOrientation. rcDefaultOrientation Pages are printed using the page orientation specified in the systemwide printer settings. rcPortraitOrientation
Pages are printed using portrait orientation
rcLandscapeOrientation
Pages are printed using landscape orientation.
Note When the PrinterColumnsSetOrientation is True, Reflection automatically sets printer page orientation based on the current value of the PrinterColumns property.
Properties Page 214
Programming with Reflection
PrinterPassEscape property Syntax Works with Data type
object.PrinterPassEscape object.PrinterPassEscape = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether escape sequences (code characters 0-31) are sent directly to the printer. This property is valid only when a passthrough method of printing, such as HP record mode or VT printer controller mode, is being used. Values The default value is False. False Escape sequences are converted to spaces. True
Reflection passes the escape sequences directly to the printer or the printer driver. If the current value of the BypassPrinterDriver property is False, escape sequences are sent to the currently selected printer driver. If BypassPrinterDriver is True, escape sequences are sent directly to the printer, bypassing Reflection and the printer driver.
Programming with Reflection
PrinterPassThroughConversion property Syntax Works with Data type
object.PrinterPassThroughConversion object.PrinterPassThroughConversion = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Reflection normally doesn’t translate characters sent directly from the host to a PC printer. The PrinterPassThroughConversion property determines whether Reflection translates data when a passthrough method of printing, such as HP record mode or VT printer controller mode, is being used. If your host software understands the locally attached printer, set PrinterPassThroughConversion to False. In VT emulations, 7-bit characters are translated when: • This property is set to True • The UseNRC property is set to True • The host sets Printer Mode to Controller (Pass Through) Values The default value is False.
Properties Page 215
Programming with Reflection
PrinterRows property Syntax Works with Data type
object.PrinterRows object.PrinterRows = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the maximum number of rows that can be printed on a page. For example, to set the number of printed rows per page to 55: Session.PrinterRows = 55 Values The default value is 60. The range of values is 1-255. Note If the PrinterAutoRowSize property is True, the value of PrinterRows is automatically set to the maximum possible rows per page based on the current settings for paper size, page orientation, margins, number of columns, and font. Programming with Reflection
PrinterTimeout property Syntax Works with Data type
object.PrinterTimeout object.PrinterTimeout = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of seconds that Reflection waits after a host print job is completed before closing the printer automatically. This property is used in host-controlled printing situations where the host does not close the printer at the completion of a printing job. Values The default value is 0. The range of values is 0-3600. Programming with Reflection
PrintGraphicsBackground property Syntax Works with Data type
object.PrintGraphicsBackground object.PrintGraphicsBackground = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not the background is printed when you print ReGIS graphics images. The following command sets Reflection to use a white (unprinted) background: Session.PrintGraphicsBackground = False
Properties Page 216
Values The default value is True. Programming with Reflection
PrintGraphicsColor property Syntax Works with Data type
object.PrintGraphicsColor object.PrintGraphicsColor = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether graphics images are printed using color or black and white. It applies only when sending sixel data to the host or a Digital printer when BypassPrinterDriver is True. Values The default value is rcPrintGraphColor. rcPrintGraphColor Print using color. rcPrintGraphMonochrome Print in black and white.
Programming with Reflection
PrintGraphicsColorSpecification property Syntax Works with Data type
object.PrintGraphicsColorSpecification object.PrintGraphicsColorSpecification = Value ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the color coordinate system used for color sixel printing. This property is relevant only when PrintGraphicsColor is set to rcPrintGraphColor and BypassPrinterDriver is True. Values The default value is rcPrintGraphicsHLS. rcPrintGraphicsHLS Reflection interprets host colors using the hue, luminosity, and saturation parameters. rcPrintGraphicsRGB
Properties Page 217
Reflection interprets host colors using the red, green, and blue parameters.
Programming with Reflection
PrintToFile property Syntax Works with Data type
object.PrintToFile object.PrintToFile = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) whether printing is directed to the printer or a file. If this property is set to anything other than an empty string, its value determines the name of the disk file to which Reflection printer output is sent. If this property is set to an empty string (""), printer output is directed to the printer. This string can contain drive and path information. If the specified file already exists, Reflection appends printed data to the end of the file. Values The default is "". Programming with Reflection
ProcessDatacomm property Syntax Works with Data type
object.ProcessDatacomm object.ProcessDatacomm = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection should process incoming characters between calls to Reflection methods. If this property is set to False, Reflection does not process incoming datacomm characters except during an explicit call to an application method that reads datacomm (such as ReadChars, ReadLine, or WaitForString). While this property is set to False, a macro or external program has exclusive access to the incoming datastream, ensuring that no incoming characters are lost. This property is set to False and becomes read-only during execution of a Reflection macro (or Reflection Basic script). Incoming datacomm can only be processed under control of the macro (during a call to a method such as ReadLine or WaitForString). This property is read-write from external sources. External programs should generally set this property to False during calls to the datacomm read methods to ensure that Reflection does not swallow characters while the external program is running. If you set this property to False, don’t forget to set it back to True before the end of your program. Reflection does not automatically set this property back to True when your external program stops running. Values The default value is True. Example This example shows how to manage data communications between Reflection and the host from an external program: ObjectName.ProcessDatacomm = False ObjectName.Transmit "username" ObjectName.WaitForString "Password", 0 ObjectName.Transmit "password" ObjectName.ProcessDatacomm = True
Properties Page 218
Programming with Reflection
ProportionalFonts property Syntax Works with Data type
object.ProportionalFonts object.ProportionalFonts = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property is no longer used. Programming with Reflection
RBVersionString property Syntax Works with Data type
object.RBVersionString HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the Reflection Basic version number. The returned string is in the form “MM.mm.bb” where MM is the major version number, mm is the minor version number, and bb is the build number. For example, “2.30.31” indicates that Reflection is running build 31 of Reflection Basic version 2.3. Values This property is read-only. Programming with Reflection
ReadCtrlZAsEOF property Syntax Works with Data type
object.ReadCtrlZAsEOF object.ReadCtrlZAsEOF = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection interprets Ctrl-Z as the end of file marker in ASCII files being sent to the host. When this property is set to True, Reflection interprets a Ctrl-Z—represented as Chr$(rcSUB)— as the end-of-file marker and strips it from the file. If you do not want the file transfer to use Ctrl-Z as an end-of-file marker, set this field to False; in this case, the character count in the file folder is used to determine the file length. The equivalent property for ASCII transfers from the host is WriteCtrlZAsEOF, which determines whether a Ctrl-Z character should be appended to ASCII files being transferred from the host. Values The default value is True.
Properties Page 219
Programming with Reflection
ReadTabAsSpaces property Syntax Works with Data type
object.ReadTabAsSpaces object.ReadTabAsSpaces = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether tab characters in local files are converted to space characters. When this property is set to True, tab characters are converted to space characters as they are sent to the host during ASCII transfers. The equivalent property for ASCII transfers from the host is WriteSpacesAsTab. Values In Reflection for HP, the default value is True. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. Programming with Reflection
ReceivedCR property Syntax Works with Data type
object.ReceivedCR object.ReceivedCR = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how a received carriage return (CR) is interpreted. This property is valid only during Wyse terminal emulation. Values The default value is rcWyseCr. rcWyseCR Interpret as a carriage return (CR). rcWyseCRLF
Interpret as a carriage return followed by a linefeed (CRLF).
Programming with Reflection
RecognizeDEL property Syntax Works with Data type
object.RecognizeDEL object.RecognizeDEL = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how a DEL character is handled. When this property is True, a DEL character is interpreted as a destructive backspace. This property is valid only during Wyse terminal emulation. Values The default value is False.
Properties Page 220
Programming with Reflection
Recording property Syntax Works with Data type
object.Recording HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns a value indicating whether or not a macro (or Reflection Basic script) is currently being recorded. This property returns True when the recorder is active, and False when it is not. Values This property is read-only. Programming with Reflection
ReGISAlwaysGraphics property Syntax Works with Data type
object.ReGISAlwaysGraphics object.ReGISAlwaysGraphics = Value ReGIS Graphics Boolean
Description When this property is set to False and Reflection goes into ReGIS mode, the screen and cursor remain in text mode until ReGIS graphics are present. When this property is set to True and Reflection goes into ReGIS mode, the screen and cursor change to ReGIS graphics mode regardless of whether or not graphics are present. Values The default value is False. Programming with Reflection
ReGISBufferSize property Syntax Works with Data type
object.ReGISBufferSize object.ReGISBufferSize = Value ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the size of the buffer reserved for caching ReGIS graphics. Values The default value is 5000. Each unit represents one ReGIS instruction The range of values is 0 -32767.
Properties Page 221
Programming with Reflection
ReGISMoveMouse property Syntax Works with Data type
object.ReGISMoveMouse object.ReGISMoveMouse = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens to the ReGIS cursor when you move the Windows mouse to a location in the Reflection terminal window that is different from the position the host has established. When you are running a ReGIS application, the host sometimes changes the position of the ReGIS input cursor. If the mouse pointer is located within the terminal window and ReGISMoveMouse is True, Reflection moves the Windows mouse to this new location. Although this accurately emulates the VT340 terminal, it also prevents you from being able to “click ahead” of the host application. To disable this feature and enable the ability to “click ahead”, change the setting of ReGISMoveMouse to False. Values The default value is True. Programming with Reflection
ReGISV6 property Syntax Works with Data type
object.ReGISV6 object.ReGISV6 = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how ReGIS graphics images are handled. When this property is False, Reflection uses enhanced features for handling ReGIS graphic images. These enhancements include support for image resizing, clearer fonts, improved printed images, and increased speed. When this property is True, Reflection handles ReGIS graphic images as it did in version 6.0. Some ReGIS images, such as fill patterns, may be more accurately represented when ReGISV6 is True. The following statement sets this property to True: Session.ReGISV6 = True Values The default value is False.
Properties Page 222
Programming with Reflection
ReportErrors property Syntax Works with Data type
object.ReportErrors object.ReportErrors = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection Basic error messages and DOS error messages (including critical error messages such as printer errors that request an abort or retry) are reported to the user. Procedure execution stops when the error occurs. Notes: If the Reflection Basic Editor is open, error messages will appear during script execution regardless of the value of this property. This property has no effect on Reflection Visual Basic macros. You can accomplish the same effect by using On Error to go to an error handling routine, and placing an Exit Sub statement in that routine. Values The default value is True. The property remains in effect throughout the current session. To ensure that errors in other macros, reset the value to True. The value of this property is not saved to a settings file. Close the Reflection Basic Editor before you run this procedure. No error message appears unless you remove the apostrophe from the line that sets ReportErrors equal to True. In either case, the script execution stops at the error. Example Sub Main With Application 'Run this script from the emulator with the Editor closed. 'With this line you will see no error message. .ReportErrors = False 'Remove the comment from this line to see an error message. '.ReportErrors = True 'Try to open a non-existent settings file. .OpenSettings "JUNKFILE.XYZ" 'In either case, this message doesn't appear because the error 'stops the script. MsgBox "Made it to the End" End With End Sub
Properties Page 223
Programming with Reflection
RestoreTextColors property Syntax Works with Data type
object.RestoreTextColors object.RestoreTextColors = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection restores text colors after ReGIS graphics have been drawn. When this property is set to True, colors are temporarily saved by Reflection when all three of the following events occur: • Reflection is placed into ReGIS mode by a graphics application. • The application changes your colors. • A ReGIS or sixel image is drawn on the screen. Text colors are then restored when either of the following occurs: • The entire screen is cleared (with the sequence {bmc csi.bmp} H, {bmc csi.bmp} J, or {bmc csi.bmp} 2J). • The application exits ReGIS mode and the entire image scrolls off the screen (for example, as the result of a series of {bmc lf.bmp} characters). This behavior differs from an actual terminal, where your original colors are never restored when changed by a graphics application. If colors were changed in ReGIS but no graphics were drawn, the original colors are not restored. This preserves the intent of some text applications that use ReGIS to change screen colors. Values The default value is False. Programming with Reflection
ReturnDefinition property Syntax Works with Data type
object.ReturnDefinition object.ReturnDefinition = Value HP String
Description Returns (first syntax line) or specifies (second syntax line) a one- or two-character string that is sent to the host when the Return key is pressed. Values The default value is the carriage return character, represented as Chr$(rcCR). If the string is more than two characters long, only the first two characters are used.
Properties Page 224
Programming with Reflection
ReturnEqualsEnter property Syntax Works with Data type
object.ReturnEqualsEnter object.ReturnEqualsEnter = Value HP Boolean
Description If you prefer to use Return rather than Enter in block mode applications, set this property to True. This may cause problems if your host system expects a Return and you have configured Return to act as Enter. Setting ReturnEqualsEnter to False for PCs without enhanced keyboards specifies that only the keypad + key or the Shift+F10 keystroke can be used as Enter. Keyboard mapping can be used to move this function to another key. See the keyboard mapping section in your Reflection product documentation. Values The default value is False. Programming with Reflection
RightMargin property Syntax Works with Data type
object.RightMargin object.RightMargin = Value HP Integer
Description Returns (first syntax line) or specifies (second syntax line) the right margin for display memory, in columns, counting from the left edge of the terminal window. Values The default is 79. The range of values is from 1 to 511. The value you use here should be greater than the value for the Left Margin property. This value is 0-based—the first column is column 0, and the 80th column is column 79. Programming with Reflection
SaveChanges property Syntax Works with Data type
object.SaveChanges object.SaveChanges = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how changes to settings should be handled when a user exits Reflection. Values The default value is rcChangesAskUser. rcChangesNever Reflection closes without saving any changed settings.
Properties Page 225
rcChangesAskUser
If settings have been changed, Reflection displays a dialog box which allows the user to save the changes, exit without saving, or cancel the Exit command.
rcChangesAlways
Reflection saves any changed settings without prompting the user.
Note When Reflection is not visible (Visible = False) and the Quit method is used to exit, Reflection always closes without saving changed settings or displaying a dialog box, regardless of the value of SaveChanges. Programming with Reflection
SaveColors property Syntax Works with Data type
object.SaveColors object.SaveColors = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not display colors are saved in settings files. When this value is True color settings are saved, when it is False they are not. For example, this statement specifies that color settings should not be saved when the settings file is saved: Session.SaveColors = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Color settings are always saved when you save Colors settings files (*.rcr), even if this property is False. Programming with Reflection
SaveConnection property Syntax Works with Data type
object.SaveConnection object.SaveConnection = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether connection setting information is saved in settings files. When this value is True connection settings are saved, when it is false they are not saved. For example, this statement specifies that connection settings should not be saved when the settings file is saved: Session.SaveConnection = False Values The default value is True.
Properties Page 226
Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Connection settings are always saved when you save Connection settings files (*.rco), even if this property is False. Programming with Reflection
SaveFromScrollingRegion property Syntax Works with Data type
object.SaveFromScrollingRegion object.SaveFromScrollingRegion = Value UNIX and Digital and ReGIS Graphics Boolean
Description When top and bottom screen margins are set (for example, by a text editor such as EDT or TPU, or with the DECSTBM function) the area within the margins is called the scrolling region. You cannot scroll outside of the scrolling region. By default, text that scrolls out of the scrolling region is not saved in display memory. If a scrolling region is set by a text editor, setting this property to True can cause display memory to fill quickly; every time you scroll your document down, text that scrolls off the top of the display is moved into display memory. For most situations, it’s best to leave this property set to False. Values The default value is False. Programming with Reflection
SaveHotspots property Syntax Works with Data type
object.SaveHotspots object.SaveHotspots = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether hotspots are saved in settings files. When this value is True hotspots are saved, when it is False they are not. For example, this statement specifies that hotspots should not be saved when the settings file is saved: Session.SaveHotspots = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Hotspot settings are always saved when you save Hotspots settings files (*.rhs), even if this property is False.
Properties Page 227
Programming with Reflection
SaveKeymap property Syntax Works with Data type
object.SaveKeymap object.SaveKeymap = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not keyboard mappings are saved in settings files. When this value is True keyboard mappings are saved, when it is False they are not saved. For example, this statement specifies that the keyboard map setup should not be saved when the settings file is saved: Session.SaveKeymap = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Keyboard settings are always saved when you save Key/Mouse Map settings files (*.rkm), even if this property is False. Programming with Reflection
SaveMenus property Syntax Works with Data type
object.SaveMenus object.SaveMenus = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not custom menu settings are saved in settings files. When this value is True menu settings are saved, when it is False they are not saved. For example, this statement specifies that menu settings should not be saved when the settings file is saved: Session.SaveMenus = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Menu settings are always saved when you save Menus settings files (*.rmu), even if this property is False.
Properties Page 228
Programming with Reflection
SaveMouseMap property Syntax Works with Data type
object.SaveMouseMap object.SaveMouseMap = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not mouse mappings are saved in settings files. When this value is True mouse mappings are saved, when it is False they are not saved. For example, this statement specifies that mouse map settings should not be saved when the settings file is saved: Session.SaveMouseMap = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). The current mouse mapping is always saved when you save Key/Mouse Map settings files (*.rkm), even if this property is False. Programming with Reflection
SavePasswords property Syntax Works with Data type
object.SavePasswords object.SavePasswords = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether passwords are included in recorded macro (or Reflection Basic script). When this property is set to True, passwords are included when you record a connection to a host. Recorded passwords are encoded, so that they are not revealed to someone reading the source code. To transmit encoded passwords to the host, use the rcDecodePassword option for the Transmit method. Values The default value is False.
Properties Page 229
Programming with Reflection
SaveToolbars property Syntax Works with Data type
object.SaveToolbars object.SaveToolbars = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether toolbar settings are saved in settings files. When this value is True toolbar settings are saved, when it is False toolbar settings are not saved. For example, this statement specifies that toolbar settings should not be saved when the settings file is saved: Session.SaveToolbars = False Values The default value is True. Note The value of this property determines what information is saved to complete settings files (*.r1w, *.r2w, *.r4w). Toolbar settings are always saved when you save Toolbar settings files (*.rtb), even if this property is False. Programming with Reflection
SaveWindowPosition property Syntax Works with Data type
object.SaveWindowPosition object.SaveWindowPosition = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the size and location of the terminal window and the File Transfer in Progress window are included when you save a settings file. Values The default value is True. Programming with Reflection
ScreenTopRow property Syntax Works with Data type
object.ScreenTopRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the row number of the top row of the screen, in host-addressable coordinates. The value of ScreenTopRow is always zero unless Reflection is emulating an HP terminal. When Reflection is emulating an HP host terminal, the value is equal to the number of rows of display memory above what the host would consider to be the top row on the screen. This can be different from the top row that is visible in the window if the user has scrolled using the scroll bar. Values This property is read-only.
Properties Page 230
Programming with Reflection
ScriptFolder property Syntax Works with Data type
object.ScriptFolder object.ScriptFolder = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the designated Script Folder for Reflection Basic scripts. If you have designated a script folder, Reflection can locate scripts in this folder without needing complete path information. Reflection searches for scripts in the following order: 1 Reflection’s current working folder 2 The Script folder (if one has been configured) 3 The Reflection User folder 4 The folder where Reflection is installed 5 The Windows System32 folder 6 The Windows folder 7 Folders on the system path Values The default value is "". The string cannot be more than 256 characters long. Programming with Reflection
ScrollOptimization property Syntax Works with Data type
object.ScrollOptimization object.ScrollOptimization = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) when Reflection uses an off-screen bitmap to speed up scrolling. With most EGA and VGA video adapters, it’s usually more efficient to use this off-screen bitmap, but with video adapters that support higher resolutions and more colors, it may be more efficient not to use the bitmap. When this property is set to rcAuto, Reflection automatically adjusts to either use or not use the off-screen bitmap, depending on the capabilities of the video adapter. Values The default value is rcAuto. rcAuto Use the off-screen bitmap to speed up scrolling as appropriate. rcStandardScroll
Do not ever use the off-screen bitmap.
rcUseBitmap
Always use the off-screen bitmap.
Properties Page 231
Programming with Reflection
SelectionEndColumn property Syntax Works with Data type
object.SelectionEndColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a column number identifying the end of the current text selection in the terminal window. If there is no selection, an error is returned. (Use the SelectionType property to determine if a selection exists, and the SelectText method to select text.) Values This property is read-only. Programming with Reflection
SelectionEndRow property Syntax Works with Data type
object.SelectionEndRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a row number identifying the end of the selection in the terminal window. The row is returned in host-addressable coordinates. If there is no selection, an error is returned. (Use the SelectionType property to determine if a selection exists, and the SelectText method to select text.) Values This property is read-only. Programming with Reflection
SelectionStartColumn property Syntax Works with Data type
object.SelectionStartColumn HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a column number identifying the beginning of the selection in the terminal window. If there is no selection, an error is returned. (Use the SelectionType property to determine if a selection exists, and the SelectText method to select text.) Values This property is read-only.
Properties Page 232
Programming with Reflection
SelectionStartRow property Syntax Works with Data type
object.SelectionStartRow HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns a row number identifying the beginning of the selection in the terminal window. The row is returned in host-addressable coordinates. If there is no selection, an error is returned. (Use the SelectionType property to determine if a selection exists, and the SelectText method to select text.) Values This property is read-only. Programming with Reflection
SelectionType property Syntax Works with Data type
object.SelectionType HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns a value indicating whether a text selection currently exists in the terminal window, and, if there is a selection, whether it’s rectangular or wrapped. (Use the SelectText method to select text.) Values This property is read-only. rcNone No selection exists. rcRectRegion
The selection is rectangular. For example: The bold text in this sentence will be returned if rcRectRegion is specified.
rcWrappedRegion
The selection is wrapped. For example: The bold text in this sentence will be returned if rcWrappedRegion is specified.
Programming with Reflection
SerialNumber property Syntax Works with Data type
object.SerialNumber HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the serial number for the current copy of Reflection. This property is obsolete as of version 5.2 of Reflection for Windows. Values This property is read-only.
Properties Page 233
Programming with Reflection
SettingsAuthor property Syntax Works with Data type
object.SettingsAuthor object.SettingsAuthor = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the author associated with the current settings file. This text appears in the Summary Information dialog box for this setting file. Values The default value is "". The string cannot be more than 32 characters long. Programming with Reflection
SettingsComments property Syntax Works with Data type
object.SettingsComments object.SettingsComments = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the comments associated with the current settings file. This text appears in the Summary Information dialog box for this setting file. Values The default value is "". The string cannot be more than 127 characters long. Programming with Reflection
SettingsExtension property Syntax Works with Data type
object.SettingsExtension HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the extension that Reflection adds to saved settings files. You can use this value to determine which Reflection product is running. (Click on the Example button below to see a sample script that does this.) Values This property is read-only. The possible returned values are: Value Reflection Product r1w
Reflection for HP
r2w
Reflection for UNIX and Digital
r4w
Reflection for ReGIS Graphics
Properties Page 234
Notes Reflection returns one of the values listed above regardless of whether or not a settings file is currently loaded. This means, for example, that an Untitled session of Reflection for HP will return "r1w”. If you have used and developed scripts for early versions of Reflection, you can use the middle digit of the returned value to identify Reflection by the older product names (Reflection 1, Reflection 2, and Reflection 4). Example This uses the middle digit of the settings file extension to identify which Reflection product is running the macro. Sub WhichReflectionProduct () Dim appName As String 'Get the settings file extension for this product appName = Session.SettingsExtension 'Extract the middle digit to identify the product appName = Mid$(appName,2,1) 'Associate the returned value with a product name Select Case appName Case "1" MsgBox "You are running Reflection for HP" Case "2" MsgBox "You are running Reflection for UNIX and Digital" Case "4" MsgBox "You are running Reflection for ReGIS Graphics" End Select End Sub Programming with Reflection
SettingsFile property Syntax Works with Data type
object.SettingsFile HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the currently loaded settings file. If the current settings file was saved using Reflection’s Save Settings dialog box, the returned string includes complete path information. If the file was saved using the SaveSettings method, the returned string is the same as the string used for the Filename argument; complete path information is returned only if you included it when you called this method. If no settings file is loaded, an empty string is returned. Values This property is read-only. Example This example uses the SettingsFile property to return the full path name of the current settings file, then trims the file name portion from the rest of the path. Note: The complete path is returned only if the file was saved using the Reflection Save As dialog box, or the SaveSettings method was called using complete path information for the file name. Sub TrimSettingsFileName () Dim fullPath as String 'Settings file with full path
Properties Page 235
Dim nameOnly as String Dim lastSlash as Integer Dim position as Integer
'File name portion of fullPath 'Postion of the last backslash 'Location marker in fullPath
'Use SettingsFile to return the complete path of the current file fullPath = Session.SettingsFile 'Find the position of the last backslash For position = 1 To Len(fullPath) If Mid$(fullPath, position, 1) = "\" Then lastSlash = position Next position 'Trim the part of the string after the last backslash and display it nameOnly = Mid$(fullPath, lastSlash+1) MsgBox "The current settings file is " + nameOnly End Sub Programming with Reflection
SettingsTitle property Syntax Works with Data type
object.SettingsTitle object.SettingsTitle = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the title associated with the current settings file. This title appears in the Summary Information dialog box for this setting file. After you save the settings file, it also appears in the Save Settings and Open Settings dialog boxes. Values The default value is "". The string cannot be more than 31 characters long. Programming with Reflection
ShortcutFolder property Syntax Works with Data type
object.ShortcutFolder object.ShortcutFolder = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the complete path to the folder where Reflection saves shortcuts to settings files. When you save settings to a settings file, Reflection saves the settings file in the current working folder. If the CreateShortcut property is set to True, Reflection also saves a shortcut to the settings file in the designated Shortcut folder. You can save shortcuts directly to your desktop by specifying the path to your desktop for the value for this property, as shown in these examples: Session.ShortcutFolder = "C:\Windows\Desktop" Session.ShortcutFolder = "C:\Winnt\Profiles\Joe\Desktop" Values The default value is the path name of the current Reflection Sessions folder.
Properties Page 236
The string cannot be more than 259 characters long. Note Changing the value of this property in one instance of Reflection will affect any instance of Reflection that you run, and will also affect these Reflection products: Reflection for HP Reflection for UNIX and Digital Reflection for ReGIS Graphics.
Programming with Reflection
ShowControlCharacters property Syntax Works with Data type
object.ShowControlCharacters object.ShowControlCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection displays control characters but does not execute the functions these characters would otherwise perform. For example, when ShowControlCharacters is set to True, Reflection, upon receiving a formfeed character, displays it on the screen but does not actually perform a formfeed. When ShowControlCharacters is set to False, Reflection performs the formfeed without displaying the character on screen. Values The default value is False. The value of this property is not saved to a settings file. Programming with Reflection
ShowFunctionKeys property Syntax Works with Data type
object.ShowFunctionKeys object.ShowFunctionKeys = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether HP function keys should be displayed at the bottom of the terminal window. The FunctionKeySet property determines which of the available sets of function keys are displayed. Values The default value is True. Programming with Reflection
ShowMenuBar property Syntax Works with Data type
Properties Page 237
object.ShowMenuBar object.ShowMenuBar = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection’s menu bar is visible. Values The default value is True. Programming with Reflection
ShowStatusBar property Syntax Works with Data type
object.ShowStatusBar object.ShowStatusBar = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection’s status bar is visible. Turning off status bar display also disables the Reflection command line. Values The default value is True. Programming with Reflection
ShowTerminalFrame property Syntax Works with Data type
object.ShowTerminalFrame object.ShowTerminalFrame = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the terminal window should be surrounded by a border. Values The default value is True. Programming with Reflection
ShowTerminalKeyboard property Syntax Works with Data type
object.ShowTerminalKeyboard object.ShowTerminalKeyboard = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the floating terminal keyboard window is visible or hidden. Values The default value is False.
Properties Page 238
Programming with Reflection
ShowTitleBar property Syntax Works with Data type
object.ShowTitleBar object.ShowTitleBar = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the title bar at the top of the Reflection window is visible. Values The default value is True. Programming with Reflection
ShowToolbar property Syntax Works with Data type
object.ShowToolbar object.ShowToolbar = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the standard toolbar is visible or hidden. Values The default value is True. Programming with Reflection
ShowVerticalScrollBar property Syntax Works with Data type
object.ShowVerticalScrollBar object.ShowVerticalScrollBar = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the vertical scroll bar is visible. Values The default value is True. Programming with Reflection
SingleByteUPSS property Syntax Works with Data type
Properties Page 239
object.SingleByteUPSS object.SingleByteUPSS = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which Digital UPS character set is used when SET HOST-CHARACTER-SET is set to a double-byte character set. Values The default value is rcDECSupplemental. rcDECSupplemental The Digital Supplemental character set is used. rcISOLatin1
The ISO Latin-1 character set is used.
Programming with Reflection
SiteDefaults property Syntax Works with Data type
object.SiteDefaults object.SiteDefaults = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the name of a settings file that is used to determine the default values for new instances of Reflection. This string can contain drive and path information. If this property is set to an empty string (or if it has been set to a string that does not correspond to a valid settings file), new Reflection sessions use factory defaults for all settings except those that are saved in the registry. If this property is set to the name of a Reflection settings file, new Reflection sessions will use the settings in the specified file. For example, this command specifies that all new instances of Reflection for UNIX and Digital will use the settings that are saved to the “My Settings” file: Session.SiteDefaults = "C:\Program Files\Reflection\User\My Settings.r2w" The specified string can identify a complete or a partial settings file, but if you specify a partial settings file, it must be one you created using the same Reflection product. This means a Colors settings file created for Reflection for HP cannot be the site default file for Reflection for UNIX and Digital. The following example sets site defaults for the toolbar configuration contained in the “Toolbar.rtb” file: Session.SiteDefaults = "C:\Program Files\Reflection\User\Toolbar.rtb" When a site defaults settings file has been specified, you can view items that have been changed from the site defaults using the second option in the Display Settings area of the View Settings dialog box. Values The default value is "". Programming with Reflection
SmoothScroll property Syntax Works with Data type
Properties Page 240
object.SmoothScroll object.SmoothScroll = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) the scroll speed setting. When this property is set to True, data from the host scrolls more slowly and evenly. (Changing this value to True is equivalent to changing the Scrolling option on the Screen tab of the Display Setup dialog box to Smooth.) Values The default value is False. Programming with Reflection
SpacesPerTab property Syntax Works with Data type
object.SpacesPerTab object.SpacesPerTab = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of consecutive spaces that are converted to a single tab character (for WriteSpacesAsTab) or the number of spaces that a single tab character is converted into (for ReadTabAsSpaces). This property is relevant only for ASCII file transfers, when either WriteSpacesAsTab or ReadTabAsSpaces is True. Values The default value is 8. The range of values is 1-20. Programming with Reflection
SPOW property Syntax Works with Data type
object.SPOW object.SPOW = Value HP Boolean
Description When this property is set to True, spaces entered from the keyboard move the cursor over existing characters without replacing them. This is only in effect, however, after a carriage return, and only remains in effect until a linefeed, home up, or tab is encountered. Values The default value is False. Programming with Reflection
StartColumn property Syntax Works with Data type
Properties Page 241
object.StartColumn object.StartColumn = Value HP Integer
Description For every line in display memory, Reflection attempts to remember the left-most column that was entered from the keyboard, as opposed to any preceding material on the line received from the host. Reflection can then distinguish the host-prompt portion of each line from the user-entered portion. Under some circumstances, it is impossible for Reflection to tell which column was the first user-keyed column. When that happens, the value of StartColumn determines the left-most column to be transmitted. Values The default value is 1. The range of values is from 1 up to the value of the DisplayColumns property. Programming with Reflection
StartupAction property Syntax Works with Data type
object.StartupAction object.StartupAction = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what action Reflection should take when it starts up (and loads a settings file). Values The default value is rcAutoConnect. rcAutoConnect Reflection loads the startup settings file (if there is one) and connects to the host. rcConnectionSetup
Reflection displays the Connection Setup dialog box.
rcNoConnect
Reflection loads the startup settings file (if there is one) but does not connect.
rcConnectionDirectory
Reflection displays the Connection Directory dialog box. Use this value only if you have upgraded from an earlier version of Reflection (prior to version 6.0) and have elected to continue using the Connection Directory.
rcUseSavedConnection
Reflection connects with a saved connection from the Connection Directory. Use this value only if you have upgraded from an earlier version of Reflection (prior to version 6.0) and have elected to continue using the Connection Directory. You can use the StartupConnection property to assign or determine the name of the saved connection.
Properties Page 242
Programming with Reflection
StartupConnection property Syntax Works with Data type
object.StartupConnection object.StartupConnection = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the saved connection that is used when the StartupAction property is set to rcUseSavedConnection. Use this property only if you have upgraded from an earlier version of Reflection (prior to version 6.0) and have elected to continue using the Connection Directory. Values The default value is "". The string cannot be more than 63 characters long. Programming with Reflection
StatusBar property Syntax Works with Data type
object.StatusBar object.StatusBar = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the text displayed by Reflection’s status bar while a macro or Reflection Basic script is running. Setting this text will not interfere with the display of menu item help messages. If this property is set to an empty string, the status bar shows information about the cursor position and the connection type. Values The default value is "". Programming with Reflection
T27AlternativeRSChar property Syntax Works with Data type
object.T27AlternativeRSChar object.T27AlternativeRSChar = Value UNIX and Digital and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the ASCII code value for the record separator character used for Forms mode in T27 emulation. For example, this statement sets the record separator to RS (ASCII 30): Session.T27AlternativeRSChar = 30 Values The default value is 30. The range of values is 0 - 256.
Properties Page 243
Programming with Reflection
T27AlternativeUSChar property Syntax Works with Data type
object.T27AlternativeUSChar object.T27AlternativeUSChar = Value UNIX and Digital and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the ASCII code value for the unit separator character used for Forms mode in T27 emulation. For example, this statement sets the unit separator to US (ASCII 31): Session.T27AlternativeUSChar = 31 Values The default value is 31. The range of values is 0 - 256. Programming with Reflection
T27CLRClearsUnprotected property Syntax Works with Data type
object.T27CLRClearsUnprotected object.T27CLRClearsUnprotected = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens when you clear the T27 terminal display. When this property is True, only unprotected fields are cleared and the keyboard cursor moves to the first data entry position of the first unprotected field. When it is False, the entire page is cleared, the terminal is put it into non-forms mode, and the keyboard cursor is moved to Home. For example: Session.T27CLRClearsUnprotected = False Note: By default, Reflection uses Shift+Home to clear. You can change this key mapping using Reflection’s Keyboard Setup dialog box or programmatically using the SetKeyMap method. Values The default value is True. Programming with Reflection
T27CursorWrap property Syntax Works with Data type
Properties Page 244
object.T27CursorWrap object.T27CursorWrap = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether cursor wrap is enabled at the end of a screen in T27 emulation. This property controls what happens when you are typing and reach the last column of the last line. When T27CursorWrap is True, the keyboard cursor advances to the first column of the first row. When it is False, the cursor stays at last column of the last row, and any subsequent text you enter overtypes the character there. For example: Session.T27CursorWrap = False Values The default value is True. Programming with Reflection
T27DC1ClearsEOL property Syntax Works with Data type
object.T27DC1ClearsEOL object.T27DC1ClearsEOL = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) the action of a DC1 (Hex 11) character sent by the host. When this property is True, the display is cleared from the keyboard cursor to the end of the line. When this property is False, the display is not cleared and the terminal stays in receive mode. For example: Session.T27DC1ClearsEOL = False Values The default value is False. Programming with Reflection
T27DC2Function property Syntax Works with Data type
object.T27DC2Function object.T27DC2Function = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the action of DC2 (Hex 12) sent by the host. For example, this statement sets DC2 to advance the datacomm pointer: Session.T27DC2Function = rcT27DC2AdvDCP Values The default value is rcT27DC2TogglesForms. rcT27DC2TogglesForms DC2 toggles in and out of forms mode. rcT27DC2AdvDCP
Properties Page 245
DC2 advances the datacomm pointer.
Programming with Reflection
T27DisplayPages property Syntax Works with Data type
object.T27DisplayPages object.T27DisplayPages = Value UNIX and Digital and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of display pages in T27 emulation. You can also change this value using the Screen tab in the Display Setup dialog box. This statement sets the number of display pages to 20: Session.T27DisplayPages = 20 Values The default value is 10. The range of values is 1 - 99. Programming with Reflection
T27ETXAdvance property Syntax Works with Data type
object.T27ETXAdvance object.T27ETXAdvance = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not a received ETX (Hex 3) character advances the keyboard cursor in T27 terminal emulation. For example, this statement sets ETX to advance the keyboard cursor: Session.T27ETXAdvance = True Values The default value is False. Programming with Reflection
T27ETXDisplay property Syntax Works with Data type
object.T27ETXDisplay object.T27ETXDisplay = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not an ETX (Hex 3) character sent by the host is displayed in T27 terminal emulation in non-forms mode. For example, this statement turns on the ETX character display: Session.T27ETXDisplay = True Values The default value is False.
Properties Page 246
Programming with Reflection
T27FormXmitToCursor property Syntax Works with Data type
object.T27FormXmitToCursor object.T27FormXmitToCursor = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how the XMIT key works in T27 Forms mode. When this property is True, the unprotected fields from Home to the keyboard cursor are transmitted. When it is False, all unprotected fields are transmitted. For example, this statement sets XMIT to transmit from Home to the keyboard cursor: Session.T27FormXmitToCursor = True Note: By default, Reflection uses the + key on the numeric keypad for XMIT. You can change this key mapping using Reflection’s Keyboard Map Setup dialog box or programmatically using the SetKeyMap method. Values The default value is False. Programming with Reflection
T27HostLineFeed property Syntax Works with Data type
object.T27HostLineFeed object.T27HostLineFeed = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how a linefeed character (LF) received from the host is interpreted. You can also change this value using the Emulation tab in the Terminal Setup dialog box. This statement sets the terminal display to interpret a received linefeed as a carriage return and linefeed: Session.T27HostLineFeed = rcT27CRLF Values The default value is rcT27LF. rcT27LF An LF is interpreted as a linefeed (LF). rcT27CRLF
An LF is interpreted as a carriage return (CR) and linefeed (LF).
Programming with Reflection
T27HostReturn property Syntax Works with Data type
Properties Page 247
object.T27HostReturn object.T27HostReturn = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how a carriage return character (CR) received from the host is interpreted. You can also change this value using the Emulation tab in the Terminal Setup dialog box. This statement sets the terminal display to interpret a received carriage return as a carriage return and linefeed: Session.T27HostReturn = rcT27CRLF Values The default value is rcT27CRLF. rcT27CR A CR is interpreted as a carriage return (CR). rcT27CRLF
A CR is interpreted as a carriage return (CR) and linefeed (LF).
Programming with Reflection
T27InsertKeyInsertsSpace property Syntax Works with Data type
object.T27InsertKeyInsertsSpace object.T27InsertKeyInsertsSpace = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how a T27 terminal responds to the Insert key. When this property is True, pressing the Insert key changes to insert mode and inserts a space. When it is False, pressing the Insert key changes to insert mode, but does not insert a space. For example: Session.T27InsertKeyInsertsSpace = False Values The default value is True. Programming with Reflection
T27LineAtATimeXmit property Syntax Works with Data type
object.T27LineAtATimeXmit object.T27LineAtATimeXmit = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how Reflection transmits data to the host. When this property is True Reflection transmits only the line containing the keyboard cursor. When it is False, Reflection transmits an entire page. For example: Session.T27LineAtATimeXmit =False Values The default value is False.
Properties Page 248
Programming with Reflection
T27ReturnKey property Syntax Works with Data type
object.T27ReturnKey object.T27ReturnKey = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how Reflection moves the keyboard cursor when you press Return. You can also change this value using the Emulation tab in the Terminal Setup dialog box. This statement sets the Return key to a carriage return with no line feed: Session.T27ReturnKey = rcT27CR Note: By default Reflection uses the Enter key for Return. You can change this key mapping using Reflection’s Keyboard Map Setup dialog box or programmatically using the SetKeyMap method. Values The default value is rcT27CRLF. rcT27CR Reflection performs a carriage return (CR). rcT27CRLF
Reflection performs a carriage return (CR) followed by a linefeed (LF).
Programming with Reflection
T27ReturnKeyInForms property Syntax Works with Data type
object.T27ReturnKeyInForms object.T27ReturnKeyInForms = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the action of the Return key in T27 Forms mode. For example, this statement sets the Return key in Forms to Exit Field: Session.T27ReturnKeyInForms = rcT27ReturnFormsExit Values The default value is rcT27ReturnFormsExit. rcT27ReturnFormsExit Return is set to Exit Field. rcT27ReturnFormsNextLine
Return is set to Next Line and will go to the next line of any multilevel fields.
Programming with Reflection
T27ShiftLock property Syntax Works with Data type
Properties Page 249
object.T27ShiftLock object.T27ShiftLock = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether typed letters in T27 emulation are automatically uppercase. When this property is True, typed characters are always uppercase. When it is False, typed letters can be both uppercase and lowercase. This statement sets all letters to uppercase: Session.T27ShiftLock = True Values The default value is False. Programming with Reflection
T27SOHClearsScreen property Syntax Works with Data type
object.T27SOHClearsScreen object.T27SOHClearsScreen = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) how the T27 terminal screen display responds to the SOH (Hex 01) character. When this property is True, the screen is cleared when a message is received. When it is False, the screen is not cleared. For example: Session.T27SOHClearsScreen = False Values The default value is True. Programming with Reflection
T27SOHExitsForms property Syntax Works with Data type
object.T27SOHExitsForms object.T27SOHExitsForms = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the SOH character (Hex 01) exits Forms mode in T27 emulation. When this property is True, the terminal exits Forms mode when a message is received. For example: Session.T27SOHExitsForms = True Values The default value is True. Programming with Reflection
T27SPCFYKeySends property Syntax Works with Data type
Properties Page 250
object.T27SPCFYKeySends object.T27SPCFYKeySends = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how cursor location information is sent to the host when you press Specify. For example, this statement sets Specify to send the cursor position using hex values: Session.T27SPCFYKeySends =rcT27SpecifyHex Note: By default, Reflection uses the / key on the numeric keypad for Specify. You can change this key mapping using Reflection’s Keyboard Map Setup dialog box or programmatically using the SetKeyMap method. Values The default value is rcT27SpecifyASCII. rcT27SpecifyASCII The keyboard cursor position is specified using ASCII values. rcT27SpecifyHex
The keyboard cursor position is specified using Hex values.
Programming with Reflection
T27SPCFYKeySendsPageNo property Syntax Works with Data type
object.T27SPCFYKeySendsPageNo object.T27SPCFYKeySendsPageNo = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether page numbers are sent when you press Specify. For example, this statement sets Specify to include page numbers: Session.T27SPCFYKeySendsPageNo = True Note: By default, Reflection uses the / key on the numeric keypad for Specify. You can change this key mapping using Reflection’s Keyboard Map Setup dialog box or programmatically using the SetKeyMap method. Values The default value is False. Programming with Reflection
TerminalClass property Syntax Works with Data type
object.TerminalClass object.TerminalClass = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description In Reflection for HP, this property returns (first syntax line) or specifies (second syntax line) which class of terminals Reflection is to emulate: the Hewlett-Packard 2392A-700/xx series (covered by the rcHP value) or the Digital Equipment Corporation VT 100-200 series (covered by the rcDEC value). When you change this value to rcDEC, you change to VT emulation in Reflection. Conversely, when you change this value to rcHP, you switch out of VT emulation. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, rcDEC is the only possible value for this property, which is included in these products only for compatibility and convenience.
Properties Page 251
Values The default value in Reflection for HP is rcHP. The only value in Reflection for UNIX and Digital and Reflection for ReGIS Graphics is rcDEC. rcHP Configures Reflection to emulate a Hewlett-Packard 2392A-700/xx series terminal. rcDEC
Configures Reflection to emulate a Digital Equipment Corporation VT100-200-300-400 series terminal.
Programming with Reflection
TerminalID property Syntax Works with Data type
object.TerminalID object.TerminalID = Value HP String
Description Returns (first syntax line) or specifies (second syntax line) Reflection’s response to a terminal ID status request from the host computer. Changing the value of TerminalType automatically changes the value of TerminalID to the equivalent value. For example, setting TerminalType to rcHP2392A automatically sets TerminalID to “2392A”. Values The default value is “70092”. The maximum length for this string is five characters. Programming with Reflection
TerminalSound property Syntax Works with Data type
object.TerminalSound object.TerminalSound = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how beeps should sound in Reflection. All values except rcSimple take advantage of multimedia support in Windows and require a sound board or the PC speaker driver (Speaker.drv). These values produce sounds that match the beep sounds made by the various terminals. You may lose some characters sent from the host if all the following are true: • You have the PC speaker driver installed under Windows. • You’re connected serially (that is, through COM1, COM2, COM3, or COM4). • TerminalSound is set to a value other than rcSimple. If you experience problems, set TerminalSound to rcSimple. Values The default value is rcSimple. rcDOSBeep Use this value if you’re using Windows NT and you want Reflection for Windows to produce a sound identical to that made by Reflection for DOS products. rcHP70092
Properties Page 252
Matches the beep sound of an HP 70092 (Reflection for HP only).
rcHP2392A
Matches the beep sound of an HP 2392A (Reflection for HP only).
rcVT100
Matches the beep sound of a VT100 (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only).
rcVT220
Matches the beep sound of a VT220 (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only).
Note The values rcDOSBeep and rcWindowsBeep which created distinct sounds in earlier versions of Reflection now create a sound identical to rcSimple. Programming with Reflection
TerminalType property Syntax Works with Data type
object.TerminalType object.TerminalType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which terminal Reflection is to emulate. Values The possible values are different for different Reflection products: In Reflection for HP, the default is rcHP70092. The possible values are: rcHP2392A rchp70092 rcHP70094 rcVT52 rcVT102 rcVT220_7 rcVT220_8 In Reflection for UNIX and Digital, the default isrcVT400_7. The possible values are: rcVT52 rcVT102 rcVT400_7 rcVT400_8 rcANSIBBS (BBS ANSI terminal emulation) rcANSIUNIX (SCO ANSI terminal emulation) rcADDS rcWYSE50 rcWYSE60 rcDG215 rcT27 (UNISYS T27 terminal emulation) In Reflection for ReGIS, the default is rcVT400_7. The possible values are: rcVT52 rcVT102 rcVT400_7 rcVT400_8
Properties Page 253
rcANSIBBS rcANSIUNIX rcTek401X rcADDS rcWYSE50 rcWYSE60 rcDG215 rcT27
(BBS ANSI terminal emulation) (SCO ANSI terminal emulation)
(UNISYS T27 terminal emulation)
Additional Comments When you set TerminalType to rcANSIBBS or rcANSIUNIX in Reflection for UNIX and Digital or Reflection for ReGIS Graphics, the default values for the following properties change: Property Default Value for rcANSIBBS and rcANISUNIX DisplayRows 25 EndOfLineWrap True TransmitXonXoff True UseAnsiColor True In addition, the value of TransmitPacing, one of the “keyword tokens” you can use to configure a connection in Reflection, behaves in a like manner—when you set TerminalType to rcANSIBBS or rcANSIUNIX in Reflection for UNIX and Digital or Reflection for ReGIS Graphics, the value of TransmitPacing automatically becomes None. When you change from a non-ANSI value to an ANSI value, or vice versa, all properties relating to the terminal (that is, all properties that are equivalent to settings in the Terminal Setup dialog box) are reset to their defaults. The properties listed above revert to their non-ANSI defaults when TerminalType is set to a non-ANSI value, and vice versa. In Reflection for HP, setting TerminalType to rcVT52, rcVT102, rcVT220_7, or rcVT220_8 automatically changes the default values for the following properties: Property HP Default for rcVT52, rcVT102, rcVT220_7, rcVT220_8 EndOfLineWrap False EnqAck False NumLock True In Digital emulations, the TerminalType property affects the codes generated by the numeric keypad and function keys, the interpretation of escape sequences, and the response to terminal identification requests. When TerminalType is set to rcVT52 or rcVT102, all received data is forced to 7 bits, so you cannot use multinational characters or 8-bit control characters. When TerminalType is set to rcVT220_7 or rcVT300_7, 7-bit control sequences are still generated but 8-bit control sequences are processed correctly. When TerminalType is set to VT220_8 or VT300_8, 8-bit control sequences are both generated and received. Programming with Reflection
TextFileCharacterSet property Syntax Works with Data type
Properties Page 254
object.TextFileCharacterSet object.TextFileCharacterSet = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Returns (first syntax line) or specifies (second syntax line) whether Reflection uses the ASCII or ANSI character set. The Windows character set (ANSI) is slightly different from the DOS character set (ASCII). If you are receiving an ASCII file to be used in the Windows environment, make sure this property is set to rcWindowsCharacterSet. The value of this property can also affect printing if BypassPrinterDriver and TranslatePrintedCharacters are both set to True. Values The default value is rcWindowCharacterSet. rcDOSCharacterSet Reflection uses the DOS (ASCII) character set. rcWindowsCharacterSet
Reflection use the Windows (ANSI) character set.
Programming with Reflection
ToolbarFlatLook property Syntax Works with Data type
object.ToolbarFlatLook object.ToolbarFlatLook = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description This property is no longer used. Values The default value is True. Programming with Reflection
ToolbarIncludeLabels property Syntax Works with Data type
object.ToolbarIncludeLabels object.ToolbarIncludeLabels = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether labels are included when predefined toolbar buttons are dragged to a toolbar. Changing the value of this property does not change the appearance of existing toolbar buttons. Values The default value is False. Programming with Reflection
Top property Syntax Works with Data type
Properties Page 255
object.Top object.Top = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the distance (in pixels) between the top edge of the display and the top edge of the main Reflection application window. This property does not affect the Reflection window if it is minimized or maximized. If Reflection is minimized or maximized when you change the value of this property, the change will take effect only when Reflection is restored to a normal window state. The returned value for this property when the window is maximized or minimized is the value the window will use when it is restored to a normal state. Values The default, minimum, and maximum values vary depending on the capacities of your monitor. Programming with Reflection
Transfer8Dot3FilenameCase property Syntax Works with Data type
object.Transfer8Dot3FilenameCase object.Transfer8Dot3FilenameCase= Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how case is handled in the names of files sent to the host. This property affects WRQ, Kermit, and Zmodem transfers, but not Xmodem transfers. Values The default value is rcLowercase. rcUppercase Host file names are created using all uppercase letters, regardless of the case of the local (source) file. rcLowercase
Host file names are created using all lowercase letters, regardless of the case of the local (source) file.
rcPreserve
The case of the host file name exactly matches the case of the local file name.
Programming with Reflection
TransferAutoDetectASCIIExtensionList property Syntax Works with Data type
object.TransferAutoDetectASCIIExtensionList object.TransferAutoDetectASCIIExtensionList = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) which file extensions should identify files to be transferred as ASCII files during file transfer using the Auto-Detect transfer type. Use “” to specify files with no file extension. For example, the following command specifies ASCII file transfer for all *.txt and *.bat files; and also for all files with no file extension: Session.TransferAutoDetectASCIIExtensionList = "txt,bat," Values The default value is “txt,bat,ini,rcl”.
Properties Page 256
Use commas to separate file extensions included in the string. Do not include periods with the file extensions. The string can be up to 259 characters long. Note Use TransferAutoDetectBinaryExtensionList, TransferAutoDetectImageLabelsExtensionList, and TransferAutoDetectScanExtensionList to determine file extensions to be linked to other transfer types. Use TransferAutoDetectDefaultType to specify what type of transfer to use when a file extension is not linked to any transfer type. Programming with Reflection
TransferAutoDetectBinaryExtensionList property Syntax Works with Data type
object.TransferAutoDetectBinaryExtensionList object.TransferAutoDetectBinaryExtensionList = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) which file extensions should identify files to be transferred as binary files during file transfer using the Auto-Detect transfer type. Use “” to specify files with no file extension. For example, the following command specifies binary file transfer for all *.doc and *.bmp files; and also for all files with no file extension: Session.TransferAutoDetectBinaryExtensionList = "doc,bmp," Values The default value is “exe,com,dll,gif,rbs”. Use commas to separate file extensions included in the string. Do not include periods with the file extensions. The string can be up to 259 characters long. Note Use TransferAutoDetectASCIIExtensionList, TransferAutoDetectImageLabelsExtensionList, and TransferAutoDetectScanExtensionList to determine file extensions to be linked to other transfer types. Use TransferAutoDetectDefaultType to specify what type of transfer to use when a file extension is not linked to any transfer type. Programming with Reflection
TransferAutoDetectDefaultType property Syntax Works with Data type
object.TransferAutoDetectDefaultType object.TransferAutoDetectDefaultType HP, UNIX and Digital, and ReGIS Graphics Enumeration
= Value
Description This property affects file transfers using the Auto-Detect transfer feature. It returns (first syntax line) or specifies (second syntax line) what type of file transfer to use when no transfer type has been associated with the file extension of a file to be transferred. Values The default value is rcScan. rcBinary Use binary file transfer.
Properties Page 257
rcASCII
Use ASCII file transfer.
rcLabels
Use Labels or Image file transfer.
rcScan
Reflection determines the file transfer method
rcAskUser
Display a dialog box asking the user what file transfer method to use.
Note Use TransferAutoDetectASCIIExtensionList, TransferAutoDetectBinaryExtensionList, TransferAutoDetectImageLabelsExtensionList, and TransferAutoDetectScanExtensionList to designate specific file extensions to be linked with particular transfer types. Programming with Reflection
TransferAutoDetectImageLabelsExtensionList property Syntax Works with Data type
object.TransferAutoDetectImageLabelsExtensionList object.TransferAutoDetectImageLabelsExtensionList = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) which file extensions should identify files to be transferred between two host computers during file transfer using the Auto-Detect transfer type. (This will be either Image or Labels transfer, depending on which Reflection product you are using.) This type of file transfer preserves host-specific information in the files. Values The default value is "". Use “” to specify files with no file extension. Use commas to separate file extensions included in the string. Do not include periods with the file extensions. The string can be up to 259 characters long. Note Use TransferAutoDetectASCIIExtensionList, TransferAutoDetectBinaryExtensionList, and TransferAutoDetectScanExtensionList to determine file extensions to be linked to other transfer types. Use TransferAutoDetectDefaultType to specify what type of transfer to use when a file extension is not linked to any transfer type. Programming with Reflection
TransferAutoDetectScanExtensionList property Syntax Works with Data type
object.TransferAutoDetectScanExtensionList object.TransferAutoDetectScanExtensionList = Value HP, UNIX and Digital, and ReGIS Graphics String
Description This property affects file transfers using the Auto-Detect transfer feature. It returns (first syntax line) or specifies (second syntax line) extensions for files that you want Reflection to scan to determine an appropriate file transfer type. This example tells Reflection to scan all files with *.bak file extensions as well as all files with no file extension. Session.TransferAutoDetectScanExtensionList = "bak,"
Properties Page 258
If you want Reflection to scan all files whose extensions have not been linked to a particular transfer type, you can use TransferAutoDetectDefaultType. Values The default value is "". Use “” to specify files with no file extension. Use commas to separate file extensions included in the string. Do not include periods with the file extensions. The string can be up to 259 characters long. Note Use TransferAutoDetectASCIIExtensionList, TransferAutoDetectBinaryExtensionList, and TransferAutoDetectImageLabelsExtensionList, to determine file extensions to be linked to other transfer types. Programming with Reflection
TransferDisconnectWhenDone property Syntax Works with Data type
object.TransferDisconnectWhenDone object.TransferDisconnectWhenDone = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection disconnects from the host when a file transfer is completed. Values The default value is False. Programming with Reflection
TransferDefaultProtocol property Syntax Works with Data type
object.TransferDefaultProtocol object.TransferDefaultProtocol = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Reflection supports five transfer protocols for sending or receiving files. This property returns (first syntax line) or specifies (second syntax line) which protocol is used by default in the File Transfer dialog box. (Programmatic transfers use methods that are specific to a particular protocol—for example, KermitSendFile or WRQReceiveFile). Values The default value is rcWRQ. rcFTP Specifies FTP as the default protocol. rcKermit
Specifies Kermit as the default protocol.
rcWRQ
Specifies WRQ/Reflection as the default protocol.
rcXmodem
Specifies Xmodem as the default protocol.
rcZmodem
Specifies Zmodem as the default protocol.
Properties Page 259
Programming with Reflection
TransferDownloadDirectory property Syntax Works with Data type
object.TransferDownloadDirectory object.TransferDownloadDirectory = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the default folder for transfers to the local computer. This property affects transfers under all supported protocols (WRQ, FTP, Kermit, Xmodem, and Zmodem). It does not affect programmatic transfers, which are always to the current folder. Values The default is the User subfolder under the folder to which Reflection was installed (for example, C:\ProgramFiles\Reflection\User). The maximum length for this string is 80 characters. Programming with Reflection
TransferIfFileExistsDefault property Syntax Works with Data type
object.TransferIfFileExistsDefault object.TransferIfFileExistsDefault = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what should happen with transfers from the File Transfer dialog box if the destination file already exists. This property is automatically set every time you perform a transfer from the File Transfer dialog box. The value used for a transfer from the File Transfer dialog box becomes the default for the next transfer from the dialog box. This property has no effect on programmatic transfers—if you don’t explicitly specify an IfFileExists action when you transfer files programmatically, the transfer fails if the destination file already exists (equivalent to rcCancel). This property affects transfers under all supported protocols. Values The default is rcAskUser. rcAppend The contents of the source file are appended at the end of the destination file. rcAskUser
A dialog box prompts the user to specify what should be done.
rcCancel
The transfer fails.
rcDelete
For transfers to a host, rcDelete deletes both the contents of the host (destination) file and its attributes. For transfers from the host, rcDelete replaces the local file.
rcOverwrite
This value is relevant only for WRQ/Reflection transfers. Its effect is host specific: • For transfers to an HP 3000 host, rcOverwrite replaces the data in the destination file, but does not replace the file’s attributes (characteristics). This can be a problem in overwriting a smaller file with a larger one: new records are not allocated to accommodate additional data, so only part of the file data is transferred. Use rcDelete to avoid this problem.
Properties Page 260
• For transfers to a VMS host, rcOverwrite only replaces the most recent instance of the destination file. • For transfers to a UNIX host, rcOverwrite preserves existing symbolic links to the host file. rcPurge
This option is available when you’re using the WRQ/Reflection protocol, and when you’re connected to a VMS host or an HP 3000 host. (With an HP 3000 host, this option is equivalent rcDelete). • If you send a PC file to a VMS host using the rcPurge option, existing versions of the file on the host are purged following the transfer. For example, if you send NOTES.TXT to the host, and NOTES.TXT;2 and NOTES.TXT;3 already exist, a successful transfer results in a single file on the host called NOTES.TXT;4. • When transferring to the PC, this option deletes the specified file on the PC (if it exists) and a new file is created. Renames the file being transferred if a file of the same name already exists. The last three characters of the file’s name are changed to 001. If such a file already exists, the file’s name is changed to 002, and so on up to 999.
rcRename
rcResume
If the destination file exists, Reflection assumes it is there as the result of an aborted download. Reflection resumes the file transfer at the point of interruption.
rcSkip
Reflection does not transfer the file, but does not return an error either.
This option is relevant only for Zmodem transfers. This option is relevant only for WRQ/Reflection and Zmodem transfers. rcUpdate
Transfers the file only if the source file is newer than the destination file.
rcUseRemote
Uses the IfFileExists option specified by the remote system. If the remote system doesn’t specify a IfFileExists option, this option is equivalent to rcCancel.
This option is relevant only for WRQ/Reflection transfers.
This option is relevant only for Zmodem transfers. Programming with Reflection
TransferPreset property Syntax Works with Data type
object.TransferPreset object.TransferPreset = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) a string identifying a preset configuration for file transfer. Note: Changing this property affects other transfer properties depending on the protocol and preset you are using; it is equivalent to changing the Preset configuration in the Protocol tab of the File Transfer dialog box. Values The default and valid values depend on the current value of TransferDefaultProtocol. (You can use the recorder to quickly determine the appropriate values for the transfer protocol you are using.) If WRQ/Reflection is the default protocol, possible balues are:
Properties Page 261
"(Current Configuration)" "To OpenVMS" "To UNIX" "Troubleshooting to OpenVMS" "Troubleshooting to UNIX" If FTP is the default protocol, possible values are: "(Current Configuration)" "To OpenVMS Using WRQ FTP" "To Unisys Using WRQ FTP" "To UNIX Using Microsoft FTP" "To UNIX Using WRQ FTP" If Zmodem is the default protoco l, possible values are: "(Current Configuration)" "To BBS" "To Host" If Kermit is the default protoco l, possible values are: "(Current Configuration)" "To BBS" "To CompuServe" "To Kermit Server" "To Remote Kermit Command Mode" "To UNIX Shell" If Xmodem is the default protoco l, possible values are: "(Current Configuration)" "To BBS or Host{Xmodem}" "Using Xmodem-1K to BBS or Host" "Using Xmodem-CRC to BBS or Host"
Programming with Reflection
TransferReceiveAs8Dot3 property Syntax Works with Data type
object.TransferReceiveAs8Dot3 object.TransferReceiveAs8Dot3 = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the names of received files are automatically truncated if they do not conform to the 8-dot-3 file naming convention. (This convention applies in Windows 3.1 and earlier but not in newer 32-bit PC operating systems.) This property affects WRQ, Kermit, and Zmodem transfers, but not Xmodem transfers. Values The default value is False.
Properties Page 262
Programming with Reflection
TransferReceiveTimeout property Syntax Works with Data type
object.TransferReceiveTimeout object.TransferReceiveTimeout = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the maximum number of seconds to wait for a response from the host or Reflection during a transfer. If nothing is received within the period specified, the file transfer program attempts to resynchronize. (The TransferRetryLimit property determines how many times the file transfer program attempts to retransmit the block.) This property affects transfers under all supported protocols (WRQ, FTP, Kermit, Xmodem, and Zmodem). Values The default value is 15. The range of values is 1-9999. Programming with Reflection
TransferRetryLimit property Syntax Works with Data type
object.TransferRetryLimit object.TransferRetryLimit = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) how many consecutive times to attempt to transmit a packet before abandoning a file transfer. The interval between retries is determined by the TransferReceiveTimeout property. This property affects transfers under all supported protocols (WRQ, FTP, Kermit, Xmodem, and Zmodem). Values The default value is 10. The range of values is 1-9999. Programming with Reflection
TransferSpacesToUnderscores property Syntax Works with Data type
object.TransferSpacesToUnderscores object.TransferSpacesToUnderscores = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether spaces in file names are converted to underscores when files are sent from Reflection. This property affects WRQ, Kermit, and Zmodem transfers, but not Xmodem transfers. Values The default value is True.
Properties Page 263
Programming with Reflection
TransferStartTimeout property Syntax Works with Data type
object.TransferStartTimeout object.TransferStartTimeout = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of seconds the file transfer program should wait for a response from the host before beginning a transfer. If no response is received within this interval, the program abandons the transfer. This property affects transfers under all supported protocols (WRQ, FTP, Kermit, Xmodem, and Zmodem). Values The default value is 25. The range of values is 5-9999. Programming with Reflection
TransferStatusWindow property Syntax Works with Data type
object.TransferStatusWindow object.TransferStatusWindow = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the file transfer status window is displayed while a file transfer is occurring. Values The default value is True. Programming with Reflection
TransferUnderscoresToSpaces property Syntax Works with Data type
object.TransferUnderscoresToSpaces object.TransferUnderscoresToSpaces = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether underscores in file names are converted to spaces when files are received to Reflection. This property affects WRQ, Kermit, and Zmodem transfers, but not Xmodem transfers. Values The default value is False.
Properties Page 264
Programming with Reflection
TranslateCharacters property Syntax Works with Data type
object.TranslateCharacters object.TranslateCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection translates characters between the PC character set and the appropriate national character set (Roman 8 or Digital Multinational) as data is read from or stored to disk. When TranslateCharacters is set to False, any character can be transmitted or captured without being translated. This property affects printing, disk operations, and ASCII file transfers. This property also affects translations between the Windows character set (ANSI) and the ASCII character set on disk operations. Values The default value is True. The value of this property is not saved to a settings file. Programming with Reflection
TranslatePrintedCharacters property Syntax Works with Data type
object.TranslatePrintedCharacters object.TranslatePrintedCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection translates between the host character set and the PC character set as data is passed through to the printer. Set this property to False if your printer is compatible with your host character set. Values The default value is True. Programming with Reflection
TransmitFunctions property Syntax Works with Data type
object.TransmitFunctions object.TransmitFunctions = Value HP Boolean
Description Most of the keys on the keyboard have an associated ASCII character. Several keys, however, perform functions for which there is no character defined in the ASCII standard—for example, home up, clear display, and back tab. Certain HP 3000 host programs, such as HP Slate, need to be informed when you press one of these non-ASCII keys. Setting TransmitFunctions to True provides a way for these keystrokes to be transmitted to the host.
Properties Page 265
When TransmitFunctions is set to True and Reflection is not in block mode, pressing one of these keys transmits the associated escape sequence to the host. Most software that requires this feature can automatically send the escape sequences to toggle it on and off. Values The default value is False (except in VT emulation mode). Programming with Reflection
TransmitTabAsSpaces property Syntax Works with Data type
object.TransmitTabAsSpaces object.TransmitTabAsSpaces = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection transmits spaces to the host when you press the Tab key. When this property is set to True, pressing the Tab key transmits the number of spaces needed to move the cursor forward to the next tab stop, rather than sending the tab character itself. This is appropriate for host programs that do not interpret the tab character correctly. If there are no tab stops to the right of the cursor, the cursor does not move. This property also affects back-tabbing—when you press Shift+Tab, the cursor moves back the number of spaces needed to reach the previous tab stop. Values The default value is False. Programming with Reflection
TransmitXonXoff property Syntax Works with Data type
object.TransmitXonXoff object.TransmitXonXoff = Value UNIX and Digital and ReGIS Graphics Boolean
Description When this property is set to False, the Ctrl+S keystroke executes the hold screen keyboard function, and the Ctrl+Q keystroke cancels the hold screen; neither keystroke actually transmits anything to the host. When TransmitXonXoff is set to True, Ctrl+S and Ctrl+Q are transmitted, and the hold screen function is not invoked. This property is automatically set to True when TerminalType is set to rcANSIBBS or rcANSIUNIX; it is automatically set to False when the value of TerminalType is changed from rcANSIBBS or rcANSIUNIX to any other value. Values The default value is False.
Properties Page 266
Programming with Reflection
TypeAhead property Syntax Works with Data type
object.TypeAhead object.TypeAhead = Value HP Boolean
Description When you’re connected through Reflection to an HP 3000 (and Reflection is not in block mode), you must wait for a prompt from the host before entering each new line of data. When the host is ready for input, it transmits a prompt to Reflection. The host ignores characters it receives before it sends this prompt. Setting TypeAhead to True allows you to ignore this limitation. Reflection stores your keystrokes in a keyboard buffer; when the host sends a prompt character, Reflection sends the next line of keyboard input from the keyboard buffer. The HP 3000 does not return a {bmc Dc1.bmp} after a “BYE” is entered at the colon prompt or after the local user disconnects out to a switch. Anything sent to the type-ahead buffer after such events will never be sent to the host. Occasionally, both Reflection and the host are in an Xoff state. Reset typeahead by pressing Alt+T or by issuing the escape sequence that performs this function. Values The default value is False. Programming with Reflection
TypeAheadImmediates property Syntax Works with Data type
object.TypeAheadImmediates object.TypeAheadImmediates = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether typeahead can be used during forms processing. When the keyboard is locked, keys controlling cursor movement and display memory manipulation are normally processed immediately (instead of being placed in Reflection’s typeahead buffer in their proper sequence with other keys). When TypeAheadImmediates is set to True, only operation keys such as Alt+R (hard reset) are processed immediately. Values The default value is True. Programming with Reflection
UnderlineCharacters property Syntax Works with Data type
Properties Page 267
object.UnderlineCharacters object.UnderlineCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether characters with the underline attribute are actually displayed in the terminal window with an underline. Values The default value is True. Programming with Reflection
UseAnsiColor property Syntax Works with Data type
object.UseAnsiColor object.UseAnsiColor = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the host can transmit ANSI color sequences to Reflection, thereby changing the foreground and background colors for characters displayed in the terminal window. This property applies to the display of ANSI color sequences in Reflection; it does not apply to printing with Reflection. Use the Select Graphic Rendition (SGR) control function to select a foreground or background color: CSI ;...m where is one of the following: Value of Foreground Color 30 black 31 red 32 green 33 yellow 34 blue 35 magenta 36 cyan 37 white Value of Background Color 40 black 41 red 42 green 43 yellow 44 blue 45 magenta 46 cyan 47 white This property does not affect color for the Reflection Setup dialog boxes, which retain their configured Reflection colors. Values The default value is False. This value is automatically set to True when the value of the TerminalType property is set to rcANSIUNIX or rcANSIBBS.
Properties Page 268
Programming with Reflection
UseDefaultPrinterFont property Syntax Works with Data type
object.UseDefaultPrinterFont object.UseDefaultPrinterFont = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses the default printer font when printing. If Reflection doesn’t use the default printer, the PrinterFontName property determines which printer is used. Values The default value is False. Programming with Reflection
UseHostRecordSeparator property Syntax Works with Data type
object.UseHostRecordSeparator object.UseHostRecordSeparator = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses the record separator character specified by HostRecordSeparator when an ASCII file is transferred from the host. This property only applies to ASCII file transfers using the WRQ/Reflection protocol. Values The default value is True. Programming with Reflection
UseModemDialerV5 property Syntax Works with Data type
object.UseModemDialerV5 object.UseModemDialerV5 = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) which modem dialer is used to make modem connections. When this value is False, Reflection uses the modem and dialer configured using the NT or Windows Control Panel. When this value is True, Reflection uses the modem dialer that was included with Reflection prior to version 6.0. Values The default is False.
Properties Page 269
Programming with Reflection
UseNRC property Syntax Works with Data type
object.UseNRC object.UseNRC = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the translations specified by the NationalReplacementSet property should be performed. Values The default value is False. The value of this property is not saved to a settings file. In Reflection for HP, this property is relevant only in VT emulation mode. Programming with Reflection
UsePCRecordSeparator property Syntax Works with Data type
object.UsePCRecordSeparator object.UsePCRecordSeparator = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection uses the record separator character specified by PCRecordSeparator when an ASCII file is transferred to the host. This property only applies to ASCII file transfers using the WRQ/Reflection protocol. Values The default value is True. Programming with Reflection
UserData property Syntax Works with Data type
object.UserData object.UserData = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) a string that stores information for the duration of the current Reflection session. Use this property in macros to set and return global values that you want to remain constant for throughout the current session. The value of this property is not saved when you save your settings file. Values The default value is "". This string can be up to 32766 characters long.
Properties Page 270
Programming with Reflection
UserDefinedKeysLocked property Syntax Works with Data type
object.UserDefinedKeysLocked object.UserDefinedKeysLocked = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the host can alter the definitions of the user-defined keys. When this property is set to True, user-defined keys cannot be loaded from the host. Values The default value is False. Programming with Reflection
UserDirectory property Syntax Works with Data type
object.UserDirectory HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the path to the User folder. This is a folder, created by the Reflection Setup utility, in which files relevant to individual users (such as settings files) are stored by default. Values This property is read-only. Programming with Reflection
UserFeaturesLocked property Syntax Works with Data type
object.UserFeaturesLocked object.UserFeaturesLocked = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether certain features can be changed by the host. When this property is set to True, the following properties cannot be changed by the host: • Tab stops • The value of the KeyboardLocked property • The value of the InverseVideo property • The value of the JumpScrollSpeed property • The value of the AutoRepeat property (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only) Some host applications require that this property be set to False, so that they can control these features.
Properties Page 271
Values The default value is False. Programming with Reflection
VersionMajor property Syntax Works with Data type
object.VersionMajor HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the major portion of the version number for the current copy of Reflection. For example, if the current version is 6.0, this property returns 6. Values This property is read-only. Programming with Reflection
VersionMinor property Syntax Works with Data type
object.VersionMinor HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns the minor portion of the version number for the current copy of Reflection. For example, if the current version is version 5.21, this property returns 21. Values This property is read-only. Programming with Reflection
VersionString property Syntax Works with Data type
object.VersionString HP, UNIX and Digital, and ReGIS Graphics String
Description Returns a string that provides information about the current copy of Reflection. A sample version string is "7.00.85." This indicates that the current copy of Reflection is version 7.0, build 85. Values This property is read-only.
Properties Page 272
Programming with Reflection
VerticalCoupling property Syntax Works with Data type
object.VerticalCoupling object.VerticalCoupling = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the row in which the cursor is located remains in the terminal window regardless of how the terminal window is resized or which screen font size is used. Values The default value is True. Programming with Reflection
Visible property Syntax Works with Data type
object.Visible object.Visible = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the Reflection terminal window is currently visible. The Reflection terminal window is visible by default when you run macros created in the Visual Basic Editor (or the Reflection Basic Editor), but is hidden by default when you start Reflection from another application using Automation. Hidden is not the same as minimized. (Use the WindowState property to minimize Reflection.) When Reflection is minimized, it appears on the Windows Task List and can brought into view in various ways. When Reflection is hidden it does not appear on the Task List and can be brought into view only by setting the Visible property to True. Note: If you run a macro that sets the Visible property to False, and the macro terminates without resetting it to True, you cannot return Reflection to view. Values The default value is True. Programming with Reflection
VT640Compatible property Syntax Works with Data type
object.VT640Compatible object.VT640Compatible = Value ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether or not Reflection switches back and forth automatically between Tektronix and VT terminal emulation when it receives VT640-compatible control characters from the host.
Properties Page 273
When this property is True, Reflection automatically sets the value of TerminalType to rcTek401X when it receives a {bmc gs.bmp} control character (Ctrl-]) or the escape sequence EscGs from the host. Reflection exits Tektronix terminal emulation and sets TerminalType to rcVT400_7 when it receives a Cancel control character (Ctrl-X) from the host. Values The default value is False. Programming with Reflection
VTBackspaceSends property Syntax Works with Data type
object.VTBackspaceSends object.VTBackspaceSends = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what is transmitted to the host when the user press the Backspace key. On the VT terminal keyboard the backarrow key is configurable: it can send either a delete (ASCII 127) or a backspace (ASCII 8) character. In Reflection, use this property to configure Backspace in the same manner. This property affects Reflection for HP only in VT emulation mode. Values In Reflection for HP, the default is rcDeleteKey. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. rcDeleteKey The Delete character is transmitted when the user presses the Backspace key. rcBackspaceKey
The Backspace character is transmitted when the user presses the Backspace key.
Programming with Reflection
VTCursorKeyMode property Syntax Works with Data type
object.VTCursorKeyMode object.VTCursorKeyMode = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether the cursor keys are under host control. This property is usually controlled by the host. If you find that your arrow keys aren’t working properly, it may mean that this option was incorrectly left set to rcApplicationMode when a host program terminated abnormally. This property affects Reflection for HP only in VT emulation mode. Values The default is rcNormalMode. rcNormalMode Cursor keys are in Normal mode. rcApplicationMode
Cursor keys are defined by the host application.
This property is not saved to a settings file.
Properties Page 274
Programming with Reflection
VTKeypadMode property Syntax Works with Data type
object.VTKeypadMode object.VTKeypadMode = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) which characters are transmitted by the numeric keypad keys. This property is normally controlled by the host. If you find that the keypad number or PF keys aren’t working properly, it may mean that this option was incorrectly left set to rcApplicationMode when a host program terminated abnormally. This property affects Reflection for HP only in VT emulation mode. Values The default is rcNumericMode. rcNumericMode Keys on the numeric keypad are in normal (numeric) mode. rcApplicationMode Keys on the numeric keypad are defined by the host application. This property is not saved to a settings file. Programming with Reflection
VTTek property Syntax Works with Data type
object.VTTek object.VTTek = Value ReGIS Graphics Boolean
Description When this property is set to True, Reflection supports VT340 emulation of Tektronix terminals. When this property is set to False, Reflection emulates Tektronix terminals in the same manner as Reflection for Windows 4.21 and earlier. The differences are detailed below. Carriage Return and Line Feed Characters in bypass condition: When VTTek is set to True, a carriage return echoed from the host will clear the bypass condition and will be processed (the cursor will move to the left margin), and an immediately subsequent linefeed will also be processed. Likewise, a linefeed echoed from the host will clear the bypass condition and will be processed (the cursor will move down a line), and an immediately subsequent carriage return will also be processed. When VTTek is set to False, a carriage return echoed from the host will clear the bypass condition, but will not be processed (the cursor doesn’t move to the left margin), and an immediately subsequent linefeed will not be processed. Likewise, a linefeed echoed from the host will clear the bypass condition (the cursor doesn’t move down a line), and an immediately subsequent carriage return will not be processed. Line Feed suppression (EscLf) and Carriage Return suppression (EscCr): When VTTek is set to True and Reflection receives an EscLf sequence, Reflection will not process any linefeeds until it receives a BEL or other no-op control code. Likewise, when VTTek is set to True and Reflection receives an EscCr sequence, Reflection will not process any carriage returns until it receives a BEL or other no-op control code.
Properties Page 275
When VTTek is set to False and Reflection receives an EscLf sequence, Reflection treats the Lf as a sequence terminator until a subsequent BEL character is received. Likewise, when VTTek is set to False and Reflection receives an EscCr sequence, Reflection treats the Cr as a sequence terminator until a subsequent BEL character is received. Tektronix Special Point Plot Mode (EscFs) When VTTek is set to True, Reflection treats the character following the EscFs sequence as the first character of the point address. When VTTek is set to False, Reflection treats the character following the EscFs sequence as a gray scaling intensity character. Since Reflection does not support gray scaling, the character is ignored. Tektronix GIN Mode Position Reports When VTTek is set to True, Tektronix GIN mode position reports are preceded by the DECLBD down sequence. If the DECLBD sequence is null, the position report and DECLBD sequence are not sent. When VTTek is set to False, Tektronix GIN mode position reports are not preceded by the DECLBD down sequence. Alphanumeric Character Display When VTTek is set to False, it’s possible that alphanumeric characters may be cut off or disappear off the top of the graphics area while emulating a Tektronix terminal. If this happens, setting VTTek to True moves these characters down to the top of the graphics area. Values The default value is True. Programming with Reflection
WeakDCS property Syntax Works with Data type
object.WeakDCS object.WeakDCS = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, a device control string can be terminated by any of the characters that interrupt escape sequences and control functions; these characters are CAN (decimal 24), SUB (decimal 26), and ESC (decimal 27). This is the same behavior as all the terminals in the VT200 through VT400 series, except the VT320. When this property is set to False, Reflection matches the behavior of the VT320 terminal, and a device control string can be terminated only by the string terminator character (decimal 156). Use this property if you need Reflection to behave like an actual VT320 terminal (for example, if you need to pass control characters as part of a sequence that would otherwise terminate the sequence). In Reflection for HP, this property is relevant only in VT emulation mode. Values The default value is True.
Properties Page 276
Programming with Reflection
WebSecurity property Syntax Works with Data type
object.WebSecurity object.WebSecurity = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what happens when you launch Reflection in a web browser using a downloaded settings file. This property allows you to control the degree of security you want to maintain against the possibility of opening a settings file that may contain unknown scripted actions. Values The default value is rcWebOpenAskUser. rcWebOpenAlways Always open downloaded settings files. rcWebOpenNever
Never open downloaded settings files.
rcWebOpenAskUser Display a dialog box when Reflection is launched in a web browser before it opens a downloaded settings file. The dialog box allows the user to choose whether or not to open the settings file.
Programming with Reflection
Width property Syntax Works with Data type
object.Width object.Width = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the width (in pixels) of the main Reflection application window. This property does not affect the Reflection window if it is minimized or maximized. If Reflection is minimized or maximized when you change the value of this property, the change will take effect only when Reflection is restored to a normal window state. The returned value for this property when the window is maximized or minimized is the value the window will use when it is restored to a normal state. Values The default, minimum, and maximum values vary depending on the capacities of your monitor.
Properties Page 277
Programming with Reflection
WidthChangeClear property Syntax Works with Data type
object.WidthChangeClear object.WidthChangeClear = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the screen display is cleared when the number of screen columns is changed. The number of screen columns can be specified using either the DisplayColumns property or the Screen tab in the Display Setup dialog box. In this example, the screen display will be cleared when the change to the DisplayColumns property is executed: Session.WidthChangeClear = True Session.DisplayColumns = 132 Values The default value is False. Programming with Reflection
WindowHandle property Syntax Works with Data type
object.WindowHandle HP, UNIX and Digital, and ReGIS Graphics Long
Description Returns an integer value used by Windows to identify the main Reflection window. You may need to know this value if you are using a Windows API call that requires the Reflection window handle as an argument. Values This property is read-only. Programming with Reflection
WindowRows property Syntax Works with Data type
object.WindowRows object.WindowRows = Value UNIX and Digital and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the number of lines displayed on screen. Values The default value is 24. The range of values is 24 - 172.
Properties Page 278
Note The DisplaysRows property controls the number of lines in each page of display memory (the area the host uses to display text and position the cursor). Changing the value of WindowRows automatically sets DisplayRows to the same value, but changing the value of DisplayRows has no effect on WindowRows. If WindowRows is larger than DisplayRows, the unused part of the terminal window will be blank. If WindowRows is smaller than DisplayRows, only a portion of each display page will be visible on screen, and you will need to scroll to the view the entire display page. If you change the number of rows using the Screen tab in Reflection’s Display Setup dialog box, Reflection automatically sets both DisplayRows and WindowRows to the new value. Programming with Reflection
WindowState property Syntax Works with Data type
object.WindowState object.WindowState = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the display state of the terminal window. Values The default value is rcNormal. rcNormal The terminal window is displayed in normal mode. rcMaximized
The terminal window is maximized.
rcMinimized
The terminal window is minimized.
Programming with Reflection
WordBoundaryExclusive property Syntax Works with Data type
object.WordBoundaryExclusive object.WordBoundaryExclusive = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) a string of characters that mark the beginning or end of a “word” when using a mouse to select words in the terminal window. These “exclusive” characters are not included in the word that is selected. For example, if the character "\" is included in this string, double-clicking on the "R" in "C:\Reports\January" will select "Reports". Use WordBoundaryInclusive to specify characters to mark word boundaries if you want these characters included as part of the string. The inclusive characters are checked before the exclusive characters. Values The default value is "()[] _.,{}~`-=|\:;" Note: This default string includes a space character.
Properties Page 279
Programming with Reflection
WordBoundaryInclusive property Syntax Works with Data type
object.WordBoundaryInclusive object.WordBoundaryInclusive = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) a string of characters that mark the beginning or end of a “word” when using a mouse to select words in the terminal window. These “inclusive” characters are included as part of the word that is selected. For example, if the character "#" is included in this string, double-clicking on the "T" in "#Monday#Tuesday#Wednesday#" will select "#Tuesday#". Use WordBoundaryExclusive to specify characters to mark word boundaries if you do not want these characters included as part of the string. The inclusive characters are checked before the exclusive characters. Values The default value is "@#$%^&*+". Programming with Reflection
WordWrap property Syntax Works with Data type
object.WordWrap object.WordWrap = Value HP Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection preserves whole words at the end of a line. When this property is set to True, Reflection inserts a carriage return and a linefeed at the end of each line in such a way that words are not broken—that is, when the right margin is reached, Reflection searches back for the first blank character and inserts a carriage return and a linefeed there. Values The default value is False. Programming with Reflection
WriteCtrlZAsEOF property Syntax Works with Data type
object.WriteCtrlZAsEOF object.WriteCtrlZAsEOF = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection automatically adds an end-of-file marker at the end of ASCII files received from the host. Some older PC programs require the Ctrl-Z end-of-file marker. The equivalent property for ASCII transfers to the host is ReadCtrlZAsEOF, which determines whether the Ctrl-Z at the end of PC files should be copied to the host during an ASCII file transfer. This property is relevant only for ASCII file transfers from the host.
Properties Page 280
Values The default value is False. Programming with Reflection
WriteSpacesAsTab property Syntax Works with Data type
object.WriteSpacesAsTab object.WriteSpacesAsTab = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection replaces spaces with tabs during ASCII file transfers from the host. You can replace consecutive spaces with tabs by setting this property to True. Replacing spaces with tabs can save a lot of disk space. The SpacesPerTab property determines how many consecutive spaces Reflection will translate into a single tab character. On the PC this value is also used to control replacement of tabs with spaces when logging to disk or copying from display memory. Values The default value is False. Programming with Reflection
WRQCompression property Syntax Works with Data type
object.WRQCompression object.WRQCompression = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) how file compression is handled. File compression speeds up file transfers. Huffman compression uses considerable processing power on the host and the local computer, but compresses very effectively. For most users, rcHuffman is recommended. Users with a very fast datacomm link or less computing power might prefer to use rcRLE (run-length compression) or rcNone (no compression). You can try comparing transfer times using different compression values. Compression is not always appropriate. For example, if you use Reflection compression to transfer a file that’s already in a compressed format, you can slow the transfer. If the WRQFastFileTransfer property is set to True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQCompression property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is rcHuffman. rcHuffman Perform Huffman compression on transfers. rcNone
Perform no compression on transfers.
rcRLE
Perform run-length compression on transfers.
Properties Page 281
Programming with Reflection
WRQEndCharacter property Syntax Works with Data type
object.WRQEndCharacter object.WRQEndCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the character that is to indicate the end of a file transfer frame. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQEndCharacter property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default is the end of text character, represented Chr$(rcETX). The value can be any control character with an ASCII value of less than 32—that is, Chr$(0) through Chr$(31)—or the close-parenthesis character, ). Programming with Reflection
WRQExtraCharacters property Syntax Works with Data type
object.WRQExtraCharacters object.WRQExtraCharacters = Value HP, UNIX and Digital, and ReGIS Graphics String
Description This property is relevant only when WRQTransferLink is set to rcUserDefinedLink. Returns (first syntax line) or specifies (second syntax line) characters to be converted into printable ASCII characters during file transfers. See the information on file transfer configuration in your Reflection help for further information. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQExtraCharacters property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default is "" (no characters). The value can be a string of control characters with a ASCII values of less than 32—that is, Chr$(0) through Chr$(31)—or greater than 127. The maximum length of the string is 32 characters.
Properties Page 282
Programming with Reflection
WRQFastCompression property Syntax Works with Data type
object.WRQFastCompression object.WRQFastCompression = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection compresses files transferred using fast file transfer. If you have a fast network but comparatively slow CPU, set this property to False so fast file transfer won’t use compression. However, if you have one of the faster CPUs currently available in today’s market (for both PCs and hosts), setting this property to True speeds up the file transfer. Use WRQFastFileTransfer to specify whether Reflection should attempt to use the fast file transfer feature. Values The default value is False. Note: The value of WRQFastCompression is ignored when using Fast File Transfer to receive a file from an HP 3000 host. Programming with Reflection
WRQFastFileTransfer property Syntax Works with Data type
object.WRQFastFileTransfer object.WRQFastFileTransfer = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection should attempt to use the fast file transfer feature. With this feature, you can move files between your PC and the host many times faster than with the standard file transfer protocol. This property is elevant only when your host connection is through a network using the LAT, Telnet, or NS/VT protocol. Use WRQFastCompression to specify how compression is handled during fast file transfers. When fast file transfer is in effect, the following properties are ignored during file transfers: WRQCompression WRQEndCharacter WRQExtraCharacters WRQFrameSize WRQStartCharacter WRQTransferLink WRQWindowSize If you use the StartTrace method when fast file transfer is in effect, you won’t be able to capture the actual flow of data. If you run VAXLINK2 with the L parameter, a host log file is not created. It may be necessary to set this property to rcNever for sending ASCII files with records larger than 32767 bytes. The transfer will fail and Reflection will display an error message if this is necessary. This property is relevant only for transfers that use the WRQ/Reflection protocol.
Properties Page 283
Values The default value is rcNegotiate. rcAlways Fast file transfer is always used. The transfer fails if the fast file transfer feature cannot be used. rcNever
Fast file transfer is never used.
rcNegotiate
Reflection attempts to use the fast file transfer feature, but falls back to a standard transfer if a fast file transfer is not possible.
Programming with Reflection
WRQFrameSize property Syntax Works with Data type
object.WRQFrameSize object.WRQFrameSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the total length of a file transfer packet (in characters), including the start and end characters, but not the delimiting character. For a VMS host, if WRQFrameSize is set to a value higher than 512 and WRQWindowSize is set to a value higher than 1, the window size is temporarily adjusted down to 1 for file transfers. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQFrameSize property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values In Reflection for HP, the default is 1280. The range of values is 32-1280. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. The range of values is 321024. Programming with Reflection
WRQFrameTerminator property Syntax Works with Data type
object.WRQFrameTerminator object.WRQFrameTerminator = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) which character comes at the end of a file transfer packet. This character causes a host read operation to complete. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQFrameTerminator property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol.
Properties Page 284
Values The default value is a carriage return, represented in Basic as Chr$(rcCR). The value can be any control character with an ASCII value of less than 32—hat is, Chr$(0) through Chr$(31)—or the open parenthesis character. It is recommended that you not set this property to Chr$(rcNUL), Chr$(rcSTX), Chr$(rcDC1), Chr$(rcDC3), or Chr$(rcEM). Programming with Reflection
WRQHostErrorMessage property Syntax Works with Data type
object.WRQHostErrorMessage HP, UNIX and Digital, and ReGIS Graphics String
Description Returns the host error message for a failed WRQ/Reflection protocol file transfer. Use this property whenever WRQSendFile or WRQReceiveFile generates an rcErrHostTransferError error. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values This property is read-only. Programming with Reflection
WRQHostRecordSize property Syntax Works with Data type
object.WRQHostRecordSize object.WRQHostRecordSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the record size (in bytes) for files transferred to the host. The default value—0—specifies that the record size for the host file is to be determined by the host. When you send binary files they are divided up into fixed-length records containing n bytes, where n is the value of WRQHostRecordSize. The last record contains the remainder (assuming the total number of bytes in the file is not evenly divisible by n). When you send an ASCII file, any records containing more than n bytes, where n is the value of WRQHostRecordSize, are split up into smaller records. A host record size specified with an attribute argument to the WRQSendFile method takes precedence over the value of WRQHostRecordSize. A value of 80 is standard for many text editors; 132 is appropriate for many printers. If you don’t know what size to use for a particular host program, check other host files used by the same program. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is 0. The range of values is 0-32767.
Properties Page 285
Programming with Reflection
WRQHostSystem property Syntax Works with Data type
object.WRQHostSystem object.WRQHostSystem = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what type of host Reflection expects to be interacting with. Set this property in Reflection for HP if you are connecting to a host other than an HP 3000. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values In Reflection for HP, the default value is rcHP3000. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. The possible values are: rcHP1000 Defines the HP 1000 as the host system type. rcHP3000
Defines the HP 3000 as the host system type.
rcVMS
Defines VMS as the host system type.
rcUNIX
Defines UNIX as the host system type.
rcOther
Defines Other as the host system type.
Programming with Reflection
WRQKeepFile property Syntax Works with Data type
object.WRQKeepFile object.WRQKeepFile = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a copy of the file being sent should be kept on the host. This property is relevant for files being submitted to the default print or batch queue, which are otherwise deleted automatically after they are submitted to these queues. This property is only relevant for transfers to VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False.
Properties Page 286
Programming with Reflection
WRQMPEFilenames property Syntax Works with Data type
object.WRQMPEFilenames object.WRQMPEFilenames = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Version 5.0 of the MPE operating system supports two naming systems for file names: • Traditional MPE file names. File names must be all uppercase, no longer than eight characters, and must conform to the FILENAME.GROUP.ACCOUNT folder structure format. • Version 5.0 POSIX file names. File names can be mixed case and of any length, using a fully hierarchical folder structure. MPE file names are a subset of POSIX names. All MPE file names are visible from within POSIX (for example, PCLINK2.PUB.SYS appears as /SYS/PUB/PCLINK2), but only POSIX files with names that are also valid as MPE file names are visible from MPE. Use this property to return (first syntax line) or specify (second syntax line) which naming convention Reflection is to use. This file name structure is used for host file names during file transfers, and it also determines how the file names appear in the File Transfer dialog box if you choose the Show Host Files button. When WRQMPEFilenames is set to rcMPE, files beginning with a period or a forward slash (. or /) are interpreted as POSIX files. This property is only relevant for transfers to HP 3000 hosts (that is, when WRQHostSystem is set to rcHP3000). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is rcMPE. rcAuto The host program determines which naming system to use. rcMPE
Reflection uses traditional MPE file names, unless a name begins with a forward slash or a period, in which case the name is assumed to be a POSIX name.
rcPOSIX
Reflection uses POSIX file names.
rcMPEOnly
Reflection uses traditional MPE file names, reporting any file name beginning with a forward slash or a period as invalid.
Programming with Reflection
WRQMPEStream property Syntax Works with Data type
object.WRQMPEStream object.WRQMPEStream = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Native POSIX files under version 5.0 of the MPE operating system support a record format known as “stream,” which is just a stream of bytes. Files created under the POSIX shell or by POSIX programs have this format by default. Files created from the MPE command interpreter or by MPE programs can be stream files.
Properties Page 287
Interoperability between stream files and other record formats is automatic. This means an MPE program can read from a stream file and it will appear to be a traditional variable-length record file, and a POSIX program will see all files as stream files. MPE does the translation automatically. If you want all files that you send to the host to have the stream format, set this property to True (when you receive files from the host, the WRQ/Reflection protocol automatically detects the record format of the host file and performs the correct translation). When WRQMPEStream is set to False, PCLINK2 defaults to a Fixed record format for ASCII files and a Variable record format for binary files. This property is relevant only for transfers to MPE hosts (that is, when WRQHostSystem is set to rcHP3000). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQPreserveCounts property Syntax Works with Data type
object.WRQPreserveCounts object.WRQPreserveCounts = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether record byte counts are transferred with data during a binary transfer to the host. This property is only relevant for transfers to VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQPreserveDate property Syntax Works with Data type
object.WRQPreserveDate object.WRQPreserveDate = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the destination file receives its creation date and time from the source file. When this property is set to False, the destination file receives its creation date from the time of the transfer. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False.
Properties Page 288
Programming with Reflection
WRQQEditFormat property Syntax Works with Data type
object.WRQQEditFormat object.WRQQEditFormat = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether HP 3000 host files are created with the QEDIT format. This property is only relevant for transfers to HP 3000 hosts (that is, when WRQHostSystem is set to rcHP3000). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQRemoveExtension property Syntax Works with Data type
object.WRQRemoveExtension object.WRQRemoveExtension = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the DOS file name extension is automatically stripped when files are sent to the host without explicit specification of the host file name. This property is only relevant for transfers to HP 3000 hosts (that is, when WRQHostSystem is set to rcHP3000). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is True. Programming with Reflection
WRQSendSpooled property Syntax Works with Data type
object.WRQSendSpooled object.WRQSendSpooled = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether files are sent to a spooled device on the host. This property is only relevant for transfers to HP 3000 hosts (that is, when WRQHostSystem is set to rcHP3000). This property is relevant only for transfers that use the WRQ/Reflection protocol.
Properties Page 289
Values The default value is False. Programming with Reflection
WRQShowHidden property Syntax Works with Data type
object.WRQShowHidden object.WRQShowHidden = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether hidden folders (with names beginning with a period) on a UNIX host are displayed in the File Transfer dialog box, when the host folder list is displayed. This property is only relevant for transfers to UNIX hosts (that is, when WRQHostSystem is set to rcUNIX). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQShowRecordSize property Syntax Works with Data type
object.WRQShowRecordSize object.WRQShowRecordSize= Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the Host record size edit control is displayed in the File Transfer dialog box. Values The default value is False. Programming with Reflection
WRQStartCharacter property Syntax Works with Data type
object.WRQStartCharacter object.WRQStartCharacter = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) which character is to indicate the beginning of a file transfer frame. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQStartCharacter property is ignored.
Properties Page 290
This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default is the start-of-text character, represented in Reflection Basic as Chr$(rcSTX). The value can be any control character with an ASCII value of less than 32—that is, Chr$(0) through Chr$(31)—or the open-parenthesis character. (It is recommended that you not set this property to Chr$(rcNUL), Chr$(rcCR), Chr$(rcDC1), Chr$(rcDC3), or Chr$(rcEM). Programming with Reflection
WRQStartupCommand property Syntax Works with Data type
object.WRQStartupCommand object.WRQStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description Returns (first syntax line) or specifies (second syntax line) the host startup command for the WRQ/Reflection transfer protocol. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values In Reflection for HP, the default is “RUN PCLINK2.PUB.SYS”. In Reflection for UNIX and Digital and Reflection for ReGIS Graphics, the default depends on whether you have selected UNIX or OpenVMS defaults. See HostForDefaultSettings for details. This string can be up to 80 characters long; if you attempt to set it to a string of more than 80 characters, all characters after the 80th character are stripped. Programming with Reflection
WRQSubmitBatch property Syntax Works with Data type
object.WRQSubmitBatch object.WRQSubmitBatch = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a file is submitted to the batch queue upon completion of an ASCII transfer to a VMS host. Once a file has been submitted to the batch queue, it is automatically deleted on the host unless the WRQKeepFile property is True. This property is only relevant for transfers to VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False.
Properties Page 291
Programming with Reflection
WRQSubmitPrint property Syntax Works with Data type
object.WRQSubmitPrint object.WRQSubmitPrint = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a file is submitted to the print queue upon completion of an ASCII transfer to a VMS host. Once a file has been submitted to the print queue, it is automatically deleted on the host unless the WRQKeepFile property is True. This property is only relevant for transfers to VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQTransferLink property Syntax Works with Data type
object.WRQTransferLink object.WRQTransferLink = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the extent to which nonprinting ASCII characters are automatically converted to printing ASCII characters during file transfers. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQTransferLink property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is rc8BitLink. rc8BitLink Only a small number of nonprinting ASCII characters are converted. Setting WRQTransferLink to rc8BitLink automatically sets WRQStartCharacter to the start-of-text character, represented in Reflection Basic as Chr$(rcSTX), and sets WRQEndCharacter to the end-of-text character, represented in Reflection Basic as Chr$(rcETX). It also specifies that characters specified with WRQExtraCharacters should be ignored. rc7BitLink
All nonprinting ASCII characters are converted. Using this value may cause a noticeable slowdown in the speed of the transfer. Setting WRQTransferLink to rc7BitLink automatically sets WRQStartCharacter to "(" and WRQEndCharacter to ")". It also specifies that characters specified with WRQExtraCharacters should be ignored.
rcUserDefinedLink All characters that would be converted under rc8BitLink are converted, along with additional characters as specified with the WRQExtraCharacters property.
Properties Page 292
Programming with Reflection
WRQTransferType property Syntax Works with Data type
object.WRQTransferType object.WRQTransferType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the transfer type for transfers from the File Transfer dialog box. This property is automatically set every time you perform a WRQ/Reflection transfer from the dialog box. The value also becomes the default for the next transfer from the dialog box. This property has no effect on programmatic transfers—if you don’t explicitly specify a transfer type with WRQSendFile or WRQReceiveFile, the default is always ASCII. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is rcASCII. rcASCII ASCII file transfer. rcBinary
Binary file transfer.
rcLabels
Labels file transfer (Reflection for HP only). Specifies that label information should be retained.
rcImage
Image file transfer (Reflection for UNIX and Digital and Reflection for ReGIS Graphics only). Specifies that VMS application information should be retained.
rcAutoDetect The transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList TransferAutoDetectImageLabelsExtensionList TransferAutoDetectScanExtensionList
Programming with Reflection
WRQTransferWithAttributes property Syntax Works with Data type
object.WRQTransferWithAttributes object.WRQTransferWithAttributes = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether attribute information is included with a file being received from the host. This property is relevant only for transfers that use the WRQ/Reflection protocol. For binary transfers, WRQTransferWithAttributes is equivalent to using rcImage as the value of the TransferType argument with the WRQSendFile method. The main use of this property is to receive ASCII files from the host and retain their attribute information.
Properties Page 293
Values The default value is False. The value of this property is not saved to a settings file. Programming with Reflection
WRQTranslateCCtl property Syntax Works with Data type
object.WRQTranslateCCtl object.WRQTranslateCCtl = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether FORTRAN and PRINT carriage control characters in VMS files are translated. This property is only relevant for receiving files from VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False. Programming with Reflection
WRQUseBlockReads property Syntax Works with Data type
object.WRQUseBlockReads object.WRQUseBlockReads = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether VAXLINK2, the VMS host transfer program, is forced to read files in block mode rather than record mode. For certain files in non-standard formats, this transfers every byte in the file without regard to record lengths or carriage controls. Setting this property to True is equivalent to using rcImage as the TransferType (with WRQReceiveFile), but omitting the image header information. This property is only relevant for transfers from VMS hosts (that is, when WRQHostSystem is set to rcVMS). This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is False.
Properties Page 294
Programming with Reflection
WRQUseCTermFrameSize property Syntax Works with Data type
object.WRQUseCTermFrameSize object.WRQUseCTermFrameSize = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection automatically uses a frame size of 255 bytes for file transfers, rather than the value of WRQFrameSize. Setting this property to False when the value of WRQFrameSize is greater than 255 speeds up transfers but may cause problems with the CTERM terminal session. Relevant for file transfers using the WRQ/Reflection transfer protocol, when the value of the ConnectionType property is “CTERM”. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value is True. Programming with Reflection
WRQWindowSize property Syntax Works with Data type
object.WRQWindowSize object.WRQWindowSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description The WRQ/Reflection file transfer protocol is a sliding-window protocol. This property returns (first syntax line) or specifies (second syntax line) the number of packets that one side can receive before sending an acknowledgment. For transfers to or from HP 3000 hosts, this property must be set to 1. If WRQFastFileTransfer is True, and if applicable protocol software (such as the 3000 Connection, NS Connection, or LAT Connection) and an applicable network connection (such as Ethernet or Token-Ring) are present, then Reflection attempts to do fast file transfers. If a fast file transfer takes place, the WRQWindowSize property is ignored. This property is relevant only for transfers that use the WRQ/Reflection protocol. Values The default value for Reflection for HP is 1; the default value for Reflection for UNIX and Digital and Reflection for ReGIS Graphics, and for Reflection for HP in VT emulation mode, is 2.
Properties Page 295
Programming with Reflection
WyseAcceptNulls property Syntax Works with Data type
object.WyseAcceptNulls object.WyseAcceptNulls = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the terminal will accept nulls from the host. This property affects situations where an escape sequence is used to define a string, such as programming function keys or a message line. This property is valid only during Wyse terminal emulation. Values The default value is False. Programming with Reflection
WyseAttributeMode property Syntax Works with Data type
object.WyseAttributeMode object.WyseAttributeMode = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the Wyse terminal display attribute mode. This property is valid only for Wyse terminal emulation. Values The default value is rcAttributeCharacter for Wyse60 emulation and rcAttributePage for Wyse50+ emulation. rcAttributeCharacter Character mode, which adds the current display attribute to each character as it is received, exactly like a VT emulator rcAttributeLine
Line mode, which adds the newly specified display attribute to every subsequent character on the line immediately, up to the end of the line or the next different attribute
rcAttributePage
Page mode, which adds the newly specified attribute to every character on the page or up to the next existing attribute
Programming with Reflection
WyseBlockMode property Syntax Works with Data type
object.WyseBlockMode object.WyseBlockMode = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether a Wyse terminal is in Block Mode. The value of this property is not saved to a settings file.
Properties Page 296
Values The default value is False. Programming with Reflection
WyseBlockTerminator property Syntax Works with Data type
object.WyseBlockTerminator object.WyseBlockTerminator = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the end-of-transmission delimiter for block sends. This is typically set by the host application. This property is valid only during Wyse terminal emulation. Values The default value is rcUSCR. rcUSCR Sends a US at the end of a line and a CR at the end of a page/block. rcCRETX
Sends a carriage return at the end of a line and an ETX at the end of a page.
Programming with Reflection
WyseEnterKey property Syntax Works with Data type
object.WyseEnterKey object.WyseEnterKey = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what is sent to the host when the Enter key is pressed. This property is valid only during Wyse terminal emulation. Values The default value is rcWyseCR. rcWyseCR Send a carriage return (CR). rcWyseCRLF
Send a carriage return and line feed (CRLF).
rcWyseTAB
Send a TAB.
Properties Page 297
Programming with Reflection
WyseLabelLines property Syntax Works with Data type
object.WyseLabelLines object.WyseLabelLines = Value UNIX and Digital and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) how many label lines are visible. The terminal decides how many label lines are visible by how many display rows are requested. Reflection allows you to always have two if you want. If only one label line is visible, pressing the Shift key will display the second line. This property is valid only during Wyse terminal emulation. Values The default value is 2. The range of values is 0-2. Programming with Reflection
WyseProtectMode property Syntax Works with Data type
object.WyseProtectMode object.WyseProtectMode = Value UNIX and Digital and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the terminal is in Protect Mode. In Protect Mode, the cursor is not allowed to move into areas of the screen that are write-protected. Cursor movement keys and the tab and backtab keys move from one unprotected area to the next unprotected area. This property is valid only during Wyse terminal emulation. The value of this property is not saved to a settings file. Values The default value is False. Programming with Reflection
WyseReturnKey property Syntax Works with Data type
object.WyseReturnKey object.WyseReturnKey = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what is sent to the host when the Return key is pressed. This property is valid only during Wyse terminal emulation.
Properties Page 298
Values The default value is rcWyseCR. rcWyseCR Send a carriage return (CR). rcWyseCRLF
Send a carriage return and line feed (CRLF).
rcWyseTAB
Send a TAB.
Programming with Reflection
WyseStatusLineDisplay property Syntax Works with Data type
object.WyseStatusLineDisplay object.WyseStatusLineDisplay = Value UNIX and Digital and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) whether the Wyse status line at the top of the screen is set to Off, Standard, or Edit. Values The default value is rcWyseStatusStandard. rcWyseStatusStandard The Wyse status line is visible. rcWyseStatusOff
The Wyse status line is not visible.
rcWyseStatusEdit
The Wyse status line is visible. (Currently this value is equivalent to rcWyseStatus Standard.)
Programming with Reflection
XmodemExtension property Syntax Works with Data type
object.XmodemExtension object.XmodemExtension = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) what type of Xmodem error checking is performed, as well as the Xmodem packet size. Values The default value is rcXmodemCRC. rcNone Specifies 1-byte checksum and 128-byte packets. rcXmodemCRC
Specifies 2-byte CRC and 128-byte packets.
rcXmodem1k
Specifies 2-byte CRC and 1024-byte packets.
Properties Page 299
Programming with Reflection
XmodemTransferType property Syntax Works with Data type
object.XmodemTransferType object.XmodemTransferType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the transfer type for Xmodem transfers from the File Transfer dialog box. This property is automatically set every time you perform an Xmodem transfer from the dialog box. The value also becomes the default for the next transfer from the dialog box. This property has no effect on programmatic transfers—if you don’t explicitly specify a transfer type, the default is always binary. Values The default value is rcBinary. rcASCII Sets the default transfer type for Xmodem transfers from the File Transfer dialog box to ASCII. If the XmodemTranslateCharacters property is set to True, the following translations are performed: • Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box). • Relevant ASCII file translation options (as specified on the Translation tab in the File Transfer Setup dialog box). If XmodemTranslateCharacters is set to False, record separator characters may still be still translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl-Z character may be still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary
Sets the default transfer type for Xmodem transfers from the File Transfer dialog box to binary.
rcAutoDetect The transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Properties Page 300
Programming with Reflection
XmodemTranslateCharacters property Syntax Works with Data type
object.XmodemTranslateCharacters object.XmodemTranslateCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection performs the character set translations specified on the Translation tab in the File Transfer Setup dialog box, as well as the translations between the host character set and the PC character set, as specified on the Emulation tab in the Terminal Setup dialog box. This property affects ASCII transfers. Values The default value is False. Programming with Reflection
ZmodemAutoDownload property Syntax Works with Data type
object.ZmodemAutoDownload object.ZmodemAutoDownload = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether Reflection takes advantage of Zmodem’s automatic download feature. With this feature, Reflection immediately starts receiving a remote file as soon as it detects a Zmodem header. When you set this property to False, you must start the remote system Zmodem send program and then use ZmodemReceiveFile to initiate a download. Values The default value is True. Programming with Reflection
ZmodemDeleteCancelledReceives property Syntax Works with Data type
object.ZmodemDeleteCancelledReceives object.ZmodemDeleteCancelledReceives = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) what happens when you cancel a Zmodem receive. If this property is set to True, the partially received file is deleted; if it’s set to False, the partially received file is kept. If a Zmodem receive is not explicitly canceled by the user, the partially received file is always kept. Values The default value is True.
Properties Page 301
Programming with Reflection
ZmodemPacketSize property Syntax Works with Data type
object.ZmodemPacketSize object.ZmodemPacketSize = Value HP, UNIX and Digital, and ReGIS Graphics Integer
Description Returns (first syntax line) or specifies (second syntax line) the sub-packet size for file transfers to the remote system; this tells Zmodem how many bytes of data to transfer at a time. The default value works in most situations. Values The default value is 1024. The range of values is 32-1024. Programming with Reflection
ZmodemReceiveStartupCommand property Syntax Works with Data type
object.ZmodemReceiveStartupCommand object.ZmodemReceiveStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description When you send a file from the PC to the host using the Zmodem protocol, this command is transmitted to the host. It should contain the name of the program that starts the Zmodem receive command on the host. If you do not specify a receive startup command, you must manually start the host’s Zmodem receive program before you can send files. This property is only necessary when sending files to a host system; it is not required for transferring files to a bulletin board. Values The default value is "". This string can be up to 80 characters long. Programming with Reflection
ZmodemSendStartupCommand property Syntax Works with Data type
object.ZmodemSendStartupCommand object.ZmodemSendStartupCommand = Value HP, UNIX and Digital, and ReGIS Graphics String
Description When you initiate a receive from the host using the Zmodem protocol, this command and the host file name are transmitted to the host. This value should contain the name of the program that starts Zmodem sends on the host. If you do not indicate a send startup command, you must manually start the host’s Zmodem send program before you can receive the host file. For VMS hosts, this command must be defined as a foreign command.
Properties Page 302
This property is only necessary for receiving files from a host system; it is not required for downloading files from a bulletin board. Values The default value is "". This string can be up to 80 characters long. Programming with Reflection
ZmodemTransferType property Syntax Works with Data type
object.ZmodemTransferType object.ZmodemTransferType = Value HP, UNIX and Digital, and ReGIS Graphics Enumeration
Description Returns (first syntax line) or specifies (second syntax line) the transfer type for Zmodem transfers from the File Transfer dialog box. This property is automatically set every time you perform a Zmodem transfer from the dialog box. The value also becomes the default for the next transfer from the dialog box. This property has no effect on programmatic transfers—if you don’t explicitly specify a transfer type, the default is always binary. Values The default value is rcBinary. rcASCII Sets the default transfer type for Zmodem transfers from the File Transfer dialog box to ASCII. If the ZmodemTranslateCharacters property is set to True, the following translations are performed: • •
Character set translations (as specified on the Emulation tab in the Terminal Setup dialog box). Relevant ASCII file translation options (as specified on the Translation tab in the File Transfer Setup dialog box).
If ZmodemTranslateCharacters is set to False, record separator characters may still be still translated to carriage return/linefeed sequences (if the ConvertSeparatorToEOL property is set to True), and a Ctrl-Z character may be still be appended to the end of the file (if the WriteCtrlZAsEOF property is set to True), but no other translations are performed. rcBinary
Sets the default transfer type for Zmodem transfers from the File Transfer dialog box to binary.
rcAutoDetect The transfer type is determined by the file extension. Use these properties to determine which file extensions are linked to which transfer type: TransferAutoDetectDefaultType TransferAutoDetectASCIIExtensionList TransferAutoDetectBinaryExtensionList
Properties Page 303
Programming with Reflection
ZmodemTranslateCharacters property Syntax Works with Data type
object.ZmodemTranslateCharacters object.ZmodemTranslateCharacters = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description When this property is set to True, Reflection performs the character set translations specified on the Translation tab in the File Transfer Setup dialog box, as well as the translations between the host character set and the PC character set, as specified on the Emulation tab in the Terminal Setup dialog box. This property affects ASCII transfers. Values The default value is False. SET ZMODEM-TRANSLATE-CHARS Programming with Reflection
ZmodemTranslateFilenames property Syntax Works with Data type
object.ZmodemTranslateFilenames object.ZmodemTranslateFilenames = Value HP, UNIX and Digital, and ReGIS Graphics Boolean
Description Returns (first syntax line) or specifies (second syntax line) whether the File name translation options on the Translation tab in the File Transfer Setup dialog box are used for Zmodem transfers. These options correspond to the following properties: {bmc jump.bmp} Transfer8Dot3FilenameCase {bmc jump.bmp} TransferReceiveAs8Dot3 {bmc jump.bmp} TransferSpacesToUnderscores {bmc jump.bmp} TransferUnderscoresToSpaces Values The default value is False.
Properties Page 304
Programming with Reflection
Character Constants Constant Name rcNUL rcSOH rcSTX rcETX rcEOT rcENQ rcACK rcBEL rcBS rcHT rcLF rcVT rcFF rcCR rcSO rcSI rcDLE rcDC1 rcDC2 rcDC3 rcDC4 rcNAK rcSYN rcETB rcCAN rcEM rcSUB rcESC rcFS rcGS rcRS rcUS rcDEL rcIND rcNEL rcSSA rcESA rcHTS rcHTJ
Properties Page 305
Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31* 127 132 133 134 135 136 137
Description Null Start of header Start of text End of text End of transmission Enquiry Acknowledge Bell Backspace Horizontal tab Linefeed Vertical tab Form feed Carriage return Shift out Shift in Data link escape Device control 1 (Xon) Device control 2 Device control 3 (Xoff) Device control 4 Negative acknowledge Synchronous idle End of transmission block Cancel End of medium Substitute Escape Field separator Group separator Record separator Unit separator Delete Index Next Line Start selected area End selected area Horizontal tab set Horizontal tab with justification
rcVTS rcPLD rcPLU rcRI rcSS2 rcSS3 rcDCS rcPU1 rcPU2 rcSTS rcCCH rcMW rcSPA rcEPA rcCSI rcST rcOSC rcPM rcAPC
138 139 140 141 142 143 144 145 146 147 148 149 150 151 155 156 157 158 159
Vertical tab set Partial line down Partial line up Reverse index Single shift 2 Single shift 3 Device control string Private use 1 Private use 2 Set transmit state Cancel character Message waiting Start protected area End protected area Control sequence introducer String terminator Operating system command Privacy message Application program command
Programming with Reflection
Key Names The following key names can be used for the Key argument with Reflection Basic methods such as GetKeyMapCommands and SetKeyMap. Note: To determine which key name identifies a particular key on the PC keyboard, open the Reflection Keyboard Map Setup dialog box. Click a keyboard key once to see its current mapping. Click again and hold to see the key name displayed at the bottom of the dialog box. Main Keyboard Area Esc A, B, C, etc. Apostrophe BackSlash Backspace Break BS CapsLock Center CloseBracket Comma Compose CR Dash Delete Do Equals
Properties Page 306
Escape NumLock OpenBracket Period PrintScreen ScrollLock Semicolon Slash Space Tab Up Function Keys F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 Cursor Control Pad Keys CpDel CpDelete CpDown CpEnd CpHome CpIns CpInsert CpLeft CpPageDown CpPageUp CpPgDn CpPgUp
Properties Page 307
CpRight CpUp Numeric Control Pad Keys CpEnter Del Kp0 Kp1 Kp2 Kp3 Kp4 Kp5 Kp6 Kp7 Kp8 Kp9 KPCenter KpComma KpDecimal KpDivide KpEnter KpMinus KpMultiply KpPlus
Properties Page 308