athanasia has asked for the wisdom of the Perl Monks concerning the following question:
use Tk; use Win32; use Win32::OLE qw(EVENTS); $mw = new MainWindow (-title => "Application to replicate user data fr +om web page"); # simple buttons to close IE or application $mw->geometry("350x100+200+200"); $mw->resizable(0,0); $customfont = "helvetica 10"; my $closeexlorerbutton = $mw -> Button(-text => "Close IE", -font => "fixed 10 bold", -height => "1", -width => "14", -command =>\&closeie) -> place(-x => 200, '-y' => 50); my $exitbutton = $mw -> Button(-text => "Cancel", -font => "fixed 10 bold", -height => "1", -width => "14", -command =>\&exitProgram) -> place(-x => 50, '-y' => 50); # open browser window and navigate to URL my $URL = "http://www.google.co.uk"; $IE = Win32::OLE->new("InternetExplorer.Application") || die "Could not start Internet Explorer.Application, Win32::OLE: +:LastError()\n"; Win32::OLE->WithEvents($IE,\&Event,"DWebBrowserEvents2"); $IE->{visible} = 1; $IE->Navigate($URL); Win32::OLE->MessageLoop(); MainLoop; sub exitProgram { my $response = $mw -> messageBox(-message=>"Are you sure you want +to exit?", -type=>'yesno', -icon=>'question'); if ( $response eq "yes" or $response eq "Yes" ) { exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Grab text from web page using Win32::OLE
by ikegami (Patriarch) on Oct 10, 2008 at 14:09 UTC | |
by athanasia (Pilgrim) on Oct 13, 2008 at 10:14 UTC | |
by athanasia (Pilgrim) on Oct 13, 2008 at 13:19 UTC | |
by ikegami (Patriarch) on Oct 13, 2008 at 14:14 UTC | |
by athanasia (Pilgrim) on Oct 13, 2008 at 14:42 UTC | |
|