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:


<table cellpadding="2" cellspacing="2" border="0" width="100%">
<td valign="top"><br>
<a href=""><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>
<dd align="center"><b><br>
<li><small>slingshot is for killing bugs</small></li>
<li><small>hat is backwards, good catch</small></li>
<td valign="top" align="center">

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 = ""; 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)