General Important scripts 2

1) Launch QTP From a note pad.

After writing the following script In a note pad, save it with "*.vbs" extension
Dim qtApp

Set qtApp = CreateObject( "QuickTest.Application" )
If Not qtApp.Launched Then
qtApp.Launch
qtApp.Visible = True
End If
qtApp.Test.Settings.Run.DisableSmartIdentification = False
Set qtApp = Nothing

2) GetTOProperties Method:
set a=dialog("Login").WinEdit("Agent Name:").GetTOProperties()

a_cnt=a.count
msgbox a_cnt
For i=0 to a_cnt-1
propname=a(i).name
propvalue=a(i).value
msgbox propname&"="&propvalue
Next