have no idea what so ever it looks like to me that i broke ie into it component parts
<html>
<head>
<meta name="vs_defaultClientScript" content="PerlScript">
<meta name="vs_targetSchema" content="HTML 4.0">
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 3.0">
<title>Document Title</title>
</head>
<body id="Bel">
<div id="Response"></div>
<h2>Test of a PerlScript function being called from VBScript</h2>
<p>
<input type="text" id="PipeCreate" value="">
<input type="button" onclick="namePipe, PipeCreate" value="Create Pipe"><br>
<input id="WriteThis" type="text" size="15" value="">
<input type="button" onclick="WriteToPipe" value="Write To Created Pipe">
<input type="button" onclick="ReadFromPipe" value="Read Pipe">
</p>
<input type="button" onclick="Discon" value="Disconnect Pipe!!">
<form method="POST" action="" onsubmit="javascript:return false">
<p><input type="button" value="Close" onclick="javascript:self.close();"></p>
</form>
<p>
</p>
<script language="PerlScript">
use Win32:
ipe;
sub namePipe {
$pipe = $window->document->getElementByID(PipeCreate)->value;
}
sub WriteToPipe {
$WhatToWrite = $window->document->getElementByID(WriteThis)->value;
$OurPipe = Win32:
ipe("\\\\.\\Pipe\\$pipe"
|| die $window->alert("Can't Create Named $pipe\n"
;
$OurPipe->Write("$WhatToWrite"
;
}
sub ReadFromPipe {
$OurPipe = Win32:
ipe("\\\\.\\Pipe\\$pipe"
|| die $window->alert("Can't Create Named $pipe\n"
;
$Data = $OurPipe->Read();
$DatRetVal ="This Is The Data $Data";
$window->alert($DatRetVal);
}
sub PipeCreate {
$OurPipe = new Win32:
ipe( $pipe)|| die $window->alert("Can't Create Named $OurPipe\n"
;
}
sub Discon {
$OurPipe = Win32:
ipe("$pipe"
|| die $window->alert("Can't Create Named $OurPipe err1 \n"
;
$OurPipe->Close()|| die $window->alert("Can't Create Named $pipe err2\n"
;
$OurPipe->Disconnect()|| die $window->alert("Can't Create Named $pipe err3 \n"
;
}
sub sayHello {
# This function takes two parameters, creates a string
# from the parameters, and returns the string.
# get the two parameters into local variables
my ($strName, $strTime) = @_;
#now, create the return string.
$strRetVal="Hello $strName. The time is $strTime.";
# Return the string
$strRetVal;
}
use IO::Socket;
use Tk;
use subs qw/read_sock/;
use vars qw/$mw $sel $sock $text/;
use strict;
$mw = MainWindow->new;
$text = $mw->Text->pack;
$sock = IO::Socket::INET->new(PeerAddr => 'localhost:10254');
die "Cannot connect" unless defined $sock;
if ($^O eq 'MSWin32') {
use IO::Select;
$sel = IO::Select->new;
$sel->add($sock);
$mw->repeat(50 => \&read_sock);
} else {
$mw->fileevent($sock, 'readable' => \&read_sock);
}
MainLoop;
sub read_sock {
my $hand = $sock;
if ($^O eq 'MSWin32') {
my(@ready) = $sel->can_read(0);
return if $#ready == -1;
$hand = $ready[0];
}
my $numbytes = length 'polld';
my $line;
while ($numbytes) {
my $buf;
my $num = sysread $hand, $buf, $numbytes;
$numbytes -= $num;
$line .= $buf;
}
$text->insert('end',"$line\n"
;
} # end read_sock
</script>
<Script language="vbscript">
strOutput=sayHello("Visitor",Now & ""
Response.innerText= strOutput & " "
</script>
<!-- Insert HTML here -->
</body>
</html>
<html>
<head>
<meta name="vs_defaultClientScript" content="PerlScript">
<meta name="vs_targetSchema" content="HTML 4.0">
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 3.0">
<title>Document Title</title>
</head>
<body id="Bel">
<div id="Response"></div>
<h2>Test of a PerlScript function being called from VBScript</h2>
<p>
<input type="text" id="PipeCreate" value="">
<input type="button" onclick="namePipe, PipeCreate" value="Create Pipe"><br>
<input id="WriteThis" type="text" size="15" value="">
<input type="button" onclick="WriteToPipe" value="Write To Created Pipe">
<input type="button" onclick="ReadFromPipe" value="Read Pipe">
</p>
<input type="button" onclick="Discon" value="Disconnect Pipe!!">
<form method="POST" action="" onsubmit="javascript:return false">
<p><input type="button" value="Close" onclick="javascript:self.close();"></p>
</form>
<p>
</p>
<script language="PerlScript">
use Win32:
sub namePipe {
$pipe = $window->document->getElementByID(PipeCreate)->value;
}
sub WriteToPipe {
$WhatToWrite = $window->document->getElementByID(WriteThis)->value;
$OurPipe = Win32:
$OurPipe->Write("$WhatToWrite"
}
sub ReadFromPipe {
$OurPipe = Win32:
$Data = $OurPipe->Read();
$DatRetVal ="This Is The Data $Data";
$window->alert($DatRetVal);
}
sub PipeCreate {
$OurPipe = new Win32:
}
sub Discon {
$OurPipe = Win32:
$OurPipe->Close()|| die $window->alert("Can't Create Named $pipe err2\n"
$OurPipe->Disconnect()|| die $window->alert("Can't Create Named $pipe err3 \n"
}
sub sayHello {
# This function takes two parameters, creates a string
# from the parameters, and returns the string.
# get the two parameters into local variables
my ($strName, $strTime) = @_;
#now, create the return string.
$strRetVal="Hello $strName. The time is $strTime.";
# Return the string
$strRetVal;
}
use IO::Socket;
use Tk;
use subs qw/read_sock/;
use vars qw/$mw $sel $sock $text/;
use strict;
$mw = MainWindow->new;
$text = $mw->Text->pack;
$sock = IO::Socket::INET->new(PeerAddr => 'localhost:10254');
die "Cannot connect" unless defined $sock;
if ($^O eq 'MSWin32') {
use IO::Select;
$sel = IO::Select->new;
$sel->add($sock);
$mw->repeat(50 => \&read_sock);
} else {
$mw->fileevent($sock, 'readable' => \&read_sock);
}
MainLoop;
sub read_sock {
my $hand = $sock;
if ($^O eq 'MSWin32') {
my(@ready) = $sel->can_read(0);
return if $#ready == -1;
$hand = $ready[0];
}
my $numbytes = length 'polld';
my $line;
while ($numbytes) {
my $buf;
my $num = sysread $hand, $buf, $numbytes;
$numbytes -= $num;
$line .= $buf;
}
$text->insert('end',"$line\n"
} # end read_sock
</script>
<Script language="vbscript">
strOutput=sayHello("Visitor",Now & ""
Response.innerText= strOutput & " "
</script>
<!-- Insert HTML here -->
</body>
</html>