Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 12-08-2004, 08:37 AM
jonathan.hays jonathan.hays is offline
Registered User
Join Date: Dec 2004
Posts: 2
dialup script hangs.

Below is the dialup script. (Phone numbers have been sanitized - not the real ones.) What I want the script to do is simply dialup and connect to each site, and then just hang up. The log will tell me which ones won't answer.

The problem is, once I connect, the 'ATH' modem command will NOT hang up the line - it just stays connected and the script is hung. What command can I do to force a disconnect and then go to the next number in the loop?

If someone knows a way to do it that only works in VBScript or JScript, I'll happily redo the script in that language.

Thanks - Jonathan

# $language = "PerlScript"
# $interface = "1.0"

# Enable errors

use Win32::OLE;
Win32::OLE->Option(Warn => 3);

$LOG = "C:\\JVH-EMC\\perlscript\\CPL-dialup-results.txt";

# Define variables for logging

$StartLog = 1;
$StopLog = 0;
$Overwrite=1; # 1 means append
$Not_raw = 0;

# Initialize the log file.
open FILE, ">$LOG";
print FILE "CP&L POTS Test\n";
close FILE;

# This array holds the substation names and dialup numbers.

$number[1][1] = "SiteA"; $number[1][2] = "555-123-1234";
$number[2][1] = "SiteB"; $number[2][2] = "555-234-2345";
$number[3][1] = "SiteC"; $number[3][2] = "555-345-4567";

# Enable synchronous mode to prevent missed output.
$crt->Screen->{'Synchronous'} = $true;

# Loop: connect to each number and record results
for ($i=1; $i<=3; $i++) {
open FILE, ">>$LOG";
print FILE "-------------------\n";
print FILE "i is $i\n";
print FILE "$number[$i][1]\n";
close FILE;

$crt->Session->{'LogFileName'} = $LOG;
$crt->Session->Log($StartLog, $Overwrite, $Not_raw);
# Dial the number
# Hang up after timeout is reached.
Reply With Quote
Old 12-11-2004, 09:16 AM
jonathan.hays jonathan.hays is offline
Registered User
Join Date: Dec 2004
Posts: 2
I have to add that I have tried just about every CTL, ALT, and SHIFT key combo to break out of the dialup session. I'm doing this interactively. It would seem the only way to break out of the dialup session is via clicking File > Disconnect (or the equivalent hot button on the menu).

Reply With Quote
Old 12-13-2004, 08:44 AM
okstorms's Avatar
okstorms okstorms is offline
Registered User
Join Date: Aug 2004
Location: Wilmington, DE
Posts: 38
Have you tried crt->Session->Disconnect?
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:21 AM.