Configure Java Settings
Source code
'This example opens UFT and configures its Java Settings.
'There is no unsaved test currently open in UFT.
'For more information, see the example for the Test.SaveAs method.

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.SetActiveAddins Array("Java") ' Load the Java Add-in
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible

' Configure the Java Settings

' Instruct UFT to use the Java API for setting JavaEdit objects
qtApp.Test.Settings.Java.EditSet.KeyPressed = False
qtApp.Test.Settings.Java.EditSet.KeyTyped = False
qtApp.Test.Settings.Java.EditSet.KeyReleased = False
qtApp.Test.Settings.Java.EditSet.InputMethod = False
qtApp.Test.Settings.Java.EditSet.FocusLost = False
qtApp.Test.Settings.Java.EditSet.JavaAPI = True

' Instruct UFT to ignore only the '\r' (carriage return) character.
qtApp.Test.Settings.Java.EditSet.JavaAPICharactersToExclude = "\r"

' Instruct UFT to perform Drag&Drop operations only using device replay
qtApp.Test.Settings.Java.DeviceReplay.Click = False
qtApp.Test.Settings.Java.DeviceReplay.DoubleClick = False
qtApp.Test.Settings.Java.DeviceReplay.Type = False
qtApp.Test.Settings.Java.DeviceReplay.DragDrop = True

Set qtApp = Nothing ' Release the Application object