SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Closing dial-up connection

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Closing dial-up connection
Author Message
Marcel de Haan



Joined: 06 Apr 2001
Posts: 3

Post Closing dial-up connection Reply with quote

Greetings,

In one of my scripts I need to open a dial-up connection. For this I used the following example I found in the help file:

// Connect to CompuServe
Run( "rundll rnaui.dll,RnaDial CompuServe", "", process_id )
// ...
// To disconnect from CompuServe, simple close Dial-Up window
// To leave connection online, comment the following two lines
WindowFind( "Connect To%", window_handle )
WindowClose( window_handle )

The connection is correctly opened at the beginning of the script, but it is not closed. The WindowFind command correctly finds the window_handle (for instance, after this command I can use the WindowGetTitle command to display the full title of the dial-up window), so I think the WindowClose command does not work correctly. I also tried the ProcesKill command, but this does not work either.

Can you tell me how I can close the dial-up connection.

Thanks,

Marcel de haan.

Fri Apr 06, 2001 6:08 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Closing dial-up connection Reply with quote

The "DialUp" windows in newest Windows versions cannot be closed until the connection is terminated.

You can try calling WindowClickButton( window_handle, "Disconnect" ) to stop the connection before closing. Note that on different systems the "Disconnect" button has different captions.

Another good idea is to use the RASDial and RASHandUp statements for this task

: Greetings,

: In one of my scripts I need to open a dial-up connection. For this I used the
: following example I found in the help file: // Connect to CompuServe
: Run( "rundll rnaui.dll,RnaDial CompuServe", "",
: process_id )
: // ...
: // To disconnect from CompuServe, simple close Dial-Up window
: // To leave connection online, comment the following two lines
: WindowFind( "Connect To%", window_handle )
: WindowClose( window_handle )

: The connection is correctly opened at the beginning of the script, but it is
: not closed. The WindowFind command correctly finds the window_handle (for
: instance, after this command I can use the WindowGetTitle command to
: display the full title of the dial-up window), so I think the WindowClose
: command does not work correctly. I also tried the ProcesKill command, but
: this does not work either.

: Can you tell me how I can close the dial-up connection.

: Thanks,

: Marcel de haan.

Fri Apr 06, 2001 8:19 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.