<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl

use strict;
use Win32::IEAutomation;
my $VERSION = "1.0";

if($#ARGV != 1)
	{
		print "\n";
		print "************************************************************\n";
		print "Usage: Gmail.pl &lt;username&gt; &lt;password&gt;\n";
		print "Gmail.pl - Login to gmail account with Internet Explorer.\n";
		print "- Chetan Giridhar \n";
		print "************************************************************\n";
		exit(0);
	}
        
# Creating new instance of Internet Explorer.
my $ie = Win32::IEAutomation-&gt;new( visible =&gt; 1, maximize =&gt; 1);
        
# Navigating to www.google.com.
$ie-&gt;gotoURL('http://www.google.com');
        
# Finding hyperlinks and clicking them
# Using 'linktext:' option (text of the link shown on web page)   
$ie-&gt;getLink('linktext:', "Gmail")-&gt;Click;   

my $user = $ARGV[0];
my $password = $ARGV[1];

# Using 'name:' option ( &lt;input type="text" name="username" .......&gt; )
$ie-&gt;getTextBox('name:', "Email")-&gt;SetValue($user);
$ie-&gt;getTextBox('name:', "Passwd")-&gt;SetValue($password);


# Finding button and clicking it
# using 'caption:' option
$ie-&gt;getButton('caption:', "Sign in")-&gt;Click;

=head1 NAME

Gmail.pl - Utility Perl Script to log in to gmail account using Internet Explorer browser.

=head1 DESCRIPTION

This script helps users to login to their gmail account using IE browser.

=head1 README

Gmail.pl - Utility Perl Script to log in to gmail account using Internet Explorer.
This script helps users to login to their gmail account using IE browser.

I wrote this script so that I need not manually write my username and password to login to Gmail.
Please email me at cjgiridhar@gmail.com with feature requests and bugs. 
Enjoy!

Gmail.pl is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v3 as published by
the Free Software Foundation; 

Gmail.pl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

=head1 PREREQUISITES

This script requires the Win32::IEAutomation module.
Internet Explorer browser.
Windows XP and above OS.

=head1 COREQUISITES

Win32::IEAutomation.

=pod OSNAMES

Windows XP/ Vista and Win7. 
Internet Explorer.

=pod SCRIPT CATEGORIES

Fun/Educational

=cut</pre></body></html>