below is the ref code which i got from other qtp forums.. I am able to use 
it successfully

Function closePutty()
    'This Closes the Putty Window.
    Dim AppCount

    On Error Resume Next
    InfoLog "Closing Putty"
    If window("PuTTY").Exist(0) Then
        window("PuTTY").Type "Quit"
    End If

    If window("PuttyConfig").Exist(0) Then
        Window("PuttyConfig").Close
    End If

    If window("PuTTY").Exist(0) Then
        Window("PuTTY").Close
        Window("PuTTY").Dialog("PuTTY Exit 
Confirmation").WinButton("OK").Click
    End If
End Function

Function startPutty(sServerIP,sPort,bWindowTitle,sWindowName)
    'This function will start the Putty Application.
    'sServerIP is the Server IP to connect too.
    'sPort is the port to be connecting too.
    'bWindowTitle is whether you want to change the name of the window.
    'sWindowName is the name of the window that will be changed too.
    Dim SettingsFile

    On Error Resume Next
    closePutty
    InfoLog "Starting Putty"
    SettingsFile="C:\Program Files\PuTTY\putty.exe"
    If fso.FileExists(SettingsFile)=False Then 'Verify that Putty is 
installed.
        ErrorLog  SettingsFile & " does not exist."
        startPutty=False
        Exit Function
    Else
        startPutty=True
    End If
    SystemUtil.Run "C:\Program Files\PuTTY\putty.exe", "", "", ""
    Window("PuttyConfig").WinRadioButton("Telnet").Set
    Window("PuttyConfig").WinEdit("Host Name").Set sServerIP
    Window("PuttyConfig").WinEdit("Port").Set sPort
    If bWindowTitle=True Then
        Window("PuttyConfig").WinTreeView("Category:").Select 
"Window;Behaviour"
        Window("PuttyConfig").WinEdit("Window title:").Set sWindowName
    End If
    
    Window("PuttyConfig").WinButton("Open").Click
    Wait(5)
    If bWindowTitle=False Then
        window("PuTTY").Activate
        window("PuTTY").Type micReturn
    End If

    ErrorCatcher Err.Number, Err.Description
    Err.Clear
End Function

On Wednesday, July 3, 2013 11:23:18 AM UTC+5:30, RamaKrishna Gondrala wrote:
>
> Can you suggest me how to do it?
>
>
>
> On Wed, Jul 3, 2013 at 11:16 AM, jitu sonawane 
> <[email protected]<javascript:>
> > wrote:
>
>> yes possible .. 
>>
>>
>> On Tuesday, July 2, 2013 6:44:08 PM UTC+5:30, RamaKrishna Gondrala wrote:
>>>
>>> I want to connect to Putty through QTP script and after that want to run 
>>> event by using some command. and after that need to edit some file in vi 
>>> editor?
>>> Is this possible?
>>>
>>> On Tuesday, 2 July 2013 18:28:54 UTC+5:30, Venkat Kandula wrote:
>>>>
>>>> Hi Rama Krishna,
>>>>
>>>> I am working knowledge on QTP ans Putty. Let me what is your exact 
>>>> requirement
>>>>
>>>>
>>>> Thanks,
>>>> Venkat
>>>>
>>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "QTP - HP Quick Test Professional - Automated Software 
>> Testing" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/mercuryqtp/TpUgde6FNc4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *....Rama Krishna....*
>  

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to