
mdhassans
New User
Apr 26, 2002, 4:24 PM
Post #1 of 1
(7570 views)
|
automating keyboard commands with Setupsup
|
Can't Post
|
|
hi! 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: $!"; $ie->{Visible}=1; $ie->Navigate("http://www.yahoo.com"); WaitForAnyWindow("*-Microsoft Internet Explorer", \my $window, 60_000,500); SetFocus($window); GetWindowProperties($windows,['rect'], \my %hash); SendKeys($window, '\alt+\E\alt-\A', 1); ...... ....... please help in getting this code work.
|