Use OLE to drive IE and scrape the results.
Here's a snippet of code that I used years ago to check warrantee expiration on
a list of HP servers. The HP web page used javascript and redirections before
finally ending up on the page with the data.
my $parms = 'country=US' .
http://code.activestate.com/lists/perl-win32-users/26301/
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry
Brevik
Sent: Tuesday, July 10, 2012 2:28 PM
To: perl Win32-users
Subject:
If you are on windows, you can drive IE via OLE, and screen-scrape the
results.
Here's a bit of code I used some time ago (way back when we had physical
servers) to get the warrantee information from an HP web site.
sub GetWarranty {
my $serial = shift;
my
For future googlers, the answer to the problem is get rid of the $mw-Show()
call in the resize routine.
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
From: Ken Cornetet
Sent: Thursday, December 15, 2011 10:02 AM
To: perl-win32-users@listserv.activestate.com
Subject: Win32::GUI
, $mw-ScaleHeight - $sb-Height);
$sb-Resize($mw-ScaleWidth, $sb-Height);
$lv-Resize($mw-ScaleWidth, $mw-ScaleHeight - $sb-Height -
$menu-Height);
$mw-Show;
return 1;
}
Ken Cornetet 812.482.8499
To err is human - to moo, bovine
I usually find that when I start getting data structures so complicated that I
have to think about it, it is time to move to objects. Using objects usually
makes the complicated data structures go away.
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
-Original Message-
From
?
Or, is there any way to do async WMI calls?
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
} = shift;
$self{z} = shift;
$self{partno} = shift;
$self{$description} = shift;
bless ($self, $class);
return $self;
}
1;
Ken Cornetet 812.482.8499
To err is human - to moo, bovine.
-Original Message-
From: perl-win32-users-boun
I don't know how to send to the default printer, but to send ascii text to a
windows printer, you can share the printer, then open the share just like a
normal file.
You may have to send a final form-feed character to get the last page out of
the printer.
Open FILE
You could drive Internet Explorer Win32::OLE, or even simpler:
Open FILE temp.htm
Print FILE h1This is a message/h1;
Close FILE
System(iexplore temp.htm);
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
Serve-U has an FTP server that does both types of secure FTP (ftp over ssh and
ftp of ssl). The cost for a single server is fairly reasonable, if memory
serves.
I know of no free (in either sense) secure FTP server for windows.
Can you turn the sense of the transfers around? In other words,
Try it like this:
use strict;
use Win32::OLE;
use constant wbemFlagReturnImmediately = 0x10;
use constant wbemFlagForwardOnly = 0x20;
use constant WbemAuthenticationLevelPktPrivacy = 6;
my $computer = xxx;
my $admin = yyy;
my $pwd = zzz;
my $wbem =
If memory serves, you can share the printer, then just treat it like a
UNC file path.
For example, if your computer is named FOGHORN and you share the printer
as LEGHORN, you can do this:
Open FILE, foghorn\\leghorn
Print FILE ...
Close FILE
-Original Message-
From:
That character would be a ^Z, which is an end-of-file indicator for
microsoft.
I can already hear people asking Why the need for an EOF character when
MS file systems record an exact byte count? Ok, maybe it's just the
usual voices in my head that I hear, but for at least their edification,
I'll
If you just need to run perl programs, copy your perl folder to your USB
drive. Don't worry about Config.pm or your PATH.
Just execute your perl program like this: X:\Perl\bin\perl.exe
X:\YourPerlProgram.pl where X is the drive letter of your USB device
-Original Message-
From: [EMAIL
I've never had the opportunity to use this, but it looks like it might
do what you all want http://www.winfordeng.com/products/portio32/
You'll probably have to google a bit for how to get the parallel port in
the mode that you want to use.
-Original Message-
From: [EMAIL PROTECTED]
Open the printer share name. For example, if the computer that the
printer is set up on is called chworktap, and the printer share name
is wagstaff, then your open should look like this:
Open FILE, chworktap\\wagstaff
Your post mentions an IP address and port 9100 (typically used by
network
What makes you think the same sequence repeats? The existence of like
named files does not imply they were generated in the same sequence.
Lets say that on one day rand() produced the sequence
a,b,c,d,e,f,g,h,i,j. The next day it might produce the sequence
c,h,a,e,g,b,i,d,f,j. This would not be
That is a variant data type. See the docs under Win32::OLE::Variant
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Gallagher Timothy-TIMOTHYG
Sent: Friday, September 23, 2005 2:00 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: Hashes
I have
It really doesn't need a module - using the outlook object model is
pretty simple. Here's something I whipped up to put some training in my
calendar this year.
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
use Win32::OLE::Variant;
use Date::Manip;
$ENV{TZ} = EST5EST;
The answer depends on how portable you want your
application. If you need portability across windows and unix, the perl interface
to Tk, or wxPerlaregood bets.
If your code will run only on windows and you like using
HTML forms, you can use Win32::OLE to "drive" IE.
From:
[EMAIL
Writing to an IO port from a user program isn't allowed under NT/2k/XP.
To do this you need some sort of driver.
Check out http://www.winfordeng.com/products/portio32/#samples
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Sisyphus
Sent: Wednesday,
Bleh, Dijkstra is a quiche eater...
Real programmers can write FORTRAN in any language
http://ces.iisc.ernet.in/hpg/dhruba/Real.html
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Hugh Loebner
Sent: Wednesday, July 13, 2005 9:26 PM
To: Michael Erskine
There is a win32 port of unix tools at http://unxutils.sourceforge.net/
which includes gzip. I use it all the time.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
$Bill Luebkert
Sent: Thursday, July 07, 2005 3:35 PM
To: Gardner, Sam
Cc:
Or have your script do an explicit logon to the target server:
if( ! Win32::Lanman::NetUseAdd( {
remote = $target\\ipc\$,
username = UsernameGoesHere,
password = YourPassword,
domain = ,
asg_type = USE_IPC
Create a batch file, and create a shortcut on the desktop to the batch
file.
The batch file should look like this:
C:\perl\bin\perl.exe YourPrelScript.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
Notes:
1. Only works for a max of 9 files dropped on the icon. CMD has a shift
operator which, coupled with a for
Two ways come to mind:
1. Use Net::SMTP to send the email.
2. Since you are using Exchange, you can create a special public folder
Outlook Security Settings with a special item in it that controls
Outlook security. You'll have to see the Outlook docs for more info.
-Original Message-
://www.ohse.de/uwe/software/lrzsz.html is decended from the old free
rz/sz.
Here's some other stuff:
http://web.mit.edu/afs/athena.mit.edu/astaff/project/telnet/src/omen/
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 19, 2005 1:19 PM
To: Ken Cornetet; perl
Drive IE via OLE
use strict;
use Win32;
use Win32::OLE;
my $ie = Win32::OLE-new('InternetExplorer.Application');
$ie-Navigate(about:blank);
$ie-{Toolbar} = 0;
$ie-{StatusBar} = 0;
$ie-{Width} = 800;
$ie-{Height} = 400;
$ie-{Left} = 0;
$ie-{Top} = 0;
while( $ie-{Busy} ) {
Win32::Sleep(200);
}
It would probably be easier to drive IE via OLE
my $ie = Win32::OLE-new('InternetExplorer.Application');
$ie-Navigate(http://whatever;);
$ie-{Toolbar} = 0;
$ie-{StatusBar} = 0;
$ie-{Width} = 800;
$ie-{Height} = 400;
$ie-{Left} = 0;
Integrated windows authentication cannot hop across machines. While your
script does indeed run on the IIS server as MYDOMAIN\myaccount, those
credentials are not usable on \\server
Use plain text authentication and it will work.
I *think* this behavior can be changed by tweaking kerberos, but I
Dirk, one frequently overlooked option for a windows GUI is to drive IE
via the Win32::OLE module. This works pretty well for simple
applications. If you already know HTML fairly well, there's less of a
learning curve than some of the other options.
There are some examples (in VBScript) at
This is tickling a forgotten memory somehow...
I seem to recall this having something to with IISLockdown and possibly
some explicit denies added to various directories.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
John Deighan
Sent: Thursday,
Actually, using the outlook object via Win32::OLE is pretty easy
(relatively speaking). Using OLE with MAPI on the other hand is a PITA.
Suresh, can you describe your requirements a bit more fully? Paul is
correct in that POP3 and SMTP are simpler to use, but they are limited
to sending/receiving
This works just fine without any additional work.
If your Perl tree is D:\Perl
Then you just run D:\perl\bin\perl YourScriptHere.pl
Perl will figure out where it was run from, and find all of it's modules
relative to that.
We frequently need to run perl scripts from login scripts. We simply
Here's my filetime to epoch conversion code (it is a bit shorter):
sub vtfiletime {
my $vt = shift;
$vt = substr($vt, 0, 11); # strip off anything
past seconds
$vt -= 11644473600; # change offset to jan
1, 1970
return $vt;
}
It's passed as a string.
-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 12:02 PM
To: Ken Cornetet
Cc: [EMAIL PROTECTED]
Subject: Re: Remote Stat - Slow??
Ken Cornetet wrote:
Here's my filetime to epoch conversion code (it is a bit
Title: Message
Win32::OLE-Initialize(Win32::OLE::COINIT_OLEINITIALIZE);my
$session =
Win32::OLE-new("MAPI.Session");
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Warner, JimSent: Friday, November 12, 2004 1:21
PMTo:
'[EMAIL
Here's my code to convert from VT_FILETIME (the goofy 100ns since 1601
format) to epoch time (# seconds since 1/1/70)
sub vtfiletime {
my $vt = shift;
$vt = substr($vt, 0, 11); # strip off anything
past seconds
$vt -= 11644473600;
return $vt;
}
We did this on a past project using ASPEncrypt, which is fairly
inexpensive. We called it from VBScript, but it could be called from
perl (using Win32::OLE) as well. Note that I've never tested it from
perl, just that it looks like it should work.
-Original Message-
From: [EMAIL
Why do you need to convert to binary? If I understand your message
correctly, you simply set the eprom programmer to receive data in Intel
hex format, then download the Intel hex file to the programmer. You
should not have to do the conversion.
If you really want to convert, here is a web page
You can run perl from another machine. Install Perl on one machine, and
create a share to c:\perl (assuming that's where you install it).
For example: install perl and any required modules on machine foo.
Share c:\perl as perl.
Then, on the client machine you can run \\foo\perl\bin\perl
Title: Message
I
don't believea binary distributioncan be made available because of
Oracle's restrictive licensing on the Oracle client libraries. This has been a
major sore point. If memory serves, ActiveState was trying to work with Oracle
on a license change so that it could be
use strict;
use Win32::OLE qw(in with OVERLOAD);
# outlook profile
my $sender = Ken Cornetet 1;
my $passwd = ; # your password here
#
# PROGRAM STARTS HERE
#
# Create a new MAPI Session
#
print Initialising OLE MAPI...\n;
Win32::OLE-Initialize(Win32::OLE::COINIT_OLEINITIALIZE); # needs
You will not be able to use modules containing compiled code without
compiling them yourself.
However, I must say I *really* like the idea of using mingw to create
the standard windows binararies. Does anyone else think a mingw
compiled perl (vs MSVC) is a good idea?
-Original Message-
If your web server is windows based, you could use UserCheckPasswd from
Win32::AdminMisc
if( Win32::AdminMisc::UserCheckPassword(, $User, $Password)){
print Password is correct.\n;
}else{
print Password is not correct.\n;
}
If your web server is not windows based, you could use
Win32::AdminMisc has functions for doing this, but it has some major
limitations:
1. Doesn't always work (some files cause Perl to crash)
2. Doesn't work on Windows 9X/Me
3. Latest version requires MSVCR70.DLL
Here's what I've used as a replacement:
sub FileVersion {
use Win32::OLE;
I guess I'm old then, because I've actually done that. On my first co-op
I used an ancient HP 2100 mini computer (with 8K 16 bit words) of *core*
memory (that was when memory was really memory - it didn't go away when
you turned the machine off).
That machine didn't have any sort of boot rom
How about an alternate method?
Install Autoexnt from the NT resource kit.
Set your service to start manually.
Create an Autoexnt.bat that waits until the database service is started
before doing a net start YourServicehere.
-Original Message-
From: John Deighan [mailto:[EMAIL
I do not believe the following statement to be true:
A site ends up in the Internet zone based on whether the server name
has a dot in it.
I'm looking at my default home page right now (kww.my.kimball.com)
which is an intranet application using integrated authentication. The
bottom of the IE
Probably not quite what you are looking for, but works for me...
system(lame.exe --r3mix -V 0 -q 0 tmp.wav \$base.mp3\);
If you wanted to get a bit fancier, I suppose you could use the DLL
version of lame and Win32::OLE
If you are asking for a pure perl mp3 encoder, I don't think such a
beast
Title: Message
Use LDAP via the
Net::LDAP module.
Search with
filter: (samAccountname=userid) (where userid is the NT
userid).
Grab the CN
attribute or the DisplayName attribute.
I can provide
sample code if you like.
-Original Message-From:
[EMAIL PROTECTED]
Go back to the MS MDAC web site. Pay heed to the note about Access ODBC
drivers NOT being included in MDAC. The note goes on to explain how to get
Access ODBC drivers.
-Original Message-
From: Simon Oliver [mailto:simon.oliver;umist.ac.uk]
Sent: Wednesday, October 16, 2002 2:06 AM
To:
open PR //server/printer
print PR Yada, yada, yada;
close PR
-Original Message-
From: Adam Ingerman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 8:06 AM
To: [EMAIL PROTECTED]
Subject: Re: print to a printer
Hi all,
i having a problem in the beginning of a new hack. I
Title: RE: Exchange Server Log Files
Are you talking about Exchange 5.5? If so, the logs you are looking for are in the tracking.log share of your IMS server(s).
The log files are created one per day, and are tab delimited.
The log file names, and log timestamps are in GMT, so be
55 matches
Mail list logo