Home: Perl Programming Help: Win32 Programming Help:
automating keyboard commands with Setupsup

New User

Apr 26, 2002, 4:24 PM

Views: 8171
automating keyboard commands with Setupsup

i am writing a program which opens a webpage and copies the data on the wepage into a notepad. i want to use the menu functions of the explorere window to Select All and copy and then paste the contents to the notepad.
i have written the program using LWP and Setupsup modules. i can get the webpage but the selectall-copy-paste is not working.
can anybody tell the right way to do it,
thanks a lot,

#!perl/bin/perl -w 
use Win32::OLE;
use win32::Setupsup qw(WaitForAnyWindow GetWindowProperties SendKeys);
Win32::OLE::CreateObject("InternetExplorer.Application.1",$ie) || die "CreateObject: $!";
WaitForAnyWindow("*-Microsoft Internet Explorer", \my $window, 60_000,500);
GetWindowProperties($windows,['rect'], \my %hash);
SendKeys($window, '\alt+\E\alt-\A', 1);

please help in getting this code work.