images/littlesamie.jpg (853 bytes)

sub ClickImage {#$imageName,[$popup,$nowait]

Description: Clicks on an  Image

How To:

Find the alt image name in your html with View Source:

Example:

<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tbody>
<tr>
<td valign="top"><br>
<a href="http://sourceforge.net/projects/samie"><img
src="samie.jpg" alt="little samie"
style="border: 0px solid ; width: 208px; height: 350px;"
title="samie lives" border="0" width="208" height="350">
</a> <br>
<b></b>
<dl>
<dd align="center"><b><br>
Samie</b></dd>
</dl>
<ul>
<li><small>slingshot is for killing bugs</small></li>
<li><small>hat is backwards, good catch</small></li>
</ul>
</td>
<td valign="top" align="center">
<h1>SAMIE</h1>

If you want to click on samie.jpg:

ClickImage("little samie");

Cookbook Recipe:

use Win32::OLE;
use Win32::SAM;
#use Win32::Slingshot;
$| = 1; my $URL = "http://samie.sf.net/ImageLink.html"; my $seconds;
$Win32::OLE::Warn = 3;
StartIE(); $seconds = Navigate($URL); print "simpleform.html page took $seconds seconds to load\n"; $seconds = ClickImage("samie"); print "Samie Link took $seconds seconds to load\n";
Further Notes:

The second parameter $popup is optional.
It tells samie that the FormButton is going to raise a popup window.

The third parameter $nowwait is optional. It is used when you don't want samie to call WaitForDocumentComplete
or WaitForDocumentCompleteForPopup after you click the button.

images/littlesamie.jpg (853 bytes)