Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Create object visible (Terminal)

Create object visible (Terminal)

Create object visible (Terminal)

I am very new to UFT,

I am currently is doing automation for MainFrame also Terminal emulation.

Path to exe file

"C:\Program Files (x86)\IBM\Personal Communications\"

this is my atempt below:

CODE --> VB.net

Public Sub CreateTerminal()

Function Terminal()

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTeOptions 'As QuickTest.TeOptions ' Declare the TE Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("TeWindow") ' Activate the Terminal Emulator Add-in
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible
Set qtTeOptions = qtApp.Options.TE ' Return the TE Options object

' Configure the Terminal Emulator options

' Set global Terminal Emulator options (apply to all emulators)

qtTeOptions.ScreenTitleRow = 1 ' Set the screen title location
qtTeOptions.ScreenTitleCol = 1
qtTeOptions.ScreenTitleLength = 30

qtTeOptions.AutoAdvance = False ' Specifies that the emulator does not support auto-advance fields
qtTeOptions.AutoSyncKeys = "13" ' Record a Sync step each time the Enter key is pressed while recording the test
qtTeOptions.RecordMenusAndPopups = True 'Enable recording of emulator popups and menus
qtTeOptions.RecordCursorPosition = True 'Record cursor position steps
qtTeOptions.UsePropertyPattern = True ' Use default property pattern file
qtTeOptions.PropertyPatternsFile = "C:\Program Files\HPE Software\Unified Functional Testing\Dat\PropertyPatternConfigTE.xml"

' Specify the current emulator
qtTeOptions.CurrentEmulator = "IBM Pcom" ' Set the current emulator as Host On-Demand 8.0

' Set options that are specific to the current emulator
qtTeOptions.Protocol = "autodetect" 'Let UFT detect the session protocol
qtTeOptions.BlankLines = 0 ' No blank lines at the bottom of the emulator window.
qtTeOptions.CodePage = 0 ' Use the default code page conversion
qtTeOptions.HllapiDllName = "C:\Program Files\IBM\EHLLAPI\pcshll32.dll" ' Specify the HLLAPI dll to use
qtTeOptions.HllapiProcName = "hllapi" ' Specify the HLLAPI function to use
qtTeOptions.VerifyHllapiDllPath = True ' Display a warning message if the HLLAPI dll is not found
qtTeOptions.ScreenLabelUseAllChars = True ' Use protected and unprotected fields to identify the screen label.
qtTeOptions.WindowTitlePrefix = "MyTerminal" ' Identify the terminal window based on its window title prefix.
qtTeOptions.TrailingMode = True ' Trim white characters when recording in context-sensitive mode
qtTeOptions.TrailingFieldLength = 5 ' if the field begins with more than five black characters.
qtTeOptions.BeepOnSync = False ' Do not beep after each Sync step.
qtTeOptions.UseKeyEvent "@R", "17;52" ' Replay the TE_RESET key using the CTRL+R keyboard event.
qtTeOptions.SyncTime = 200 ' Wait 200 milliseconds before checking the emulator status

' Clean up
Set qtTeOptions = Nothing ' Release the TE Options object ' Release the Te Options object
Set qtApp = Nothing ' Release the Application object ' Release the Application object

End Function

End Sub 

now is my question do I make the program visible also called from another function in another sub?

Thank you in advance

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close