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.
|