How to set up samie 1.1...

1) Go to http://www.activeperl.com and download and Install Active Perl 5.8.0 build 806 Windows MSI
2) Download samie.zip, extract to any directory and click on setup.exe
3) Try the test.pl and test1.pl scripts found in the product directory. (for example: c:\Program Files\Premium Quality Inc\samie)

The main file used by samie is found here by default c:\Perl\site\lib\Win32\SAM.pm. Take a look in this file to see how samie was written. And to see what each subroutine takes as a parameter, some of them are optional.

EXAMPLE FOUND HERE

Here is some boiler plate stuff to help you get started...

use strict;
use Win32::OLE;
use Win32::SAM;
#use Win32::Slingshot;

$| = 1;
my $URL = "http://www.amazon.com/exec/obidos/subst/home/home.html/103-9172868-6219849";
my $seconds;

$Win32::OLE::Warn = 3;

StartIE();
$seconds = Navigate($URL);
print "First Page took $seconds seconds to load\n";
SetListBoxItem("url","index=baby");
SetEditBox("field-keywords","Diaper");
$seconds = ClickFormImage("Go");
print "Second Page took $seconds seconds to load\n";

-------------------------------------------------------------------------------

A little explanation:

sub SetListBoxItem { #$SelectName, $ItemName
Notice SetListBoxItem uses "url" and "Baby", look at Amazon's view source html

&ltselect name=url>
&ltoption value="index=aps" selected&gtAll Products
&ltoption value="index=books"&gtBooks
&ltoption value="index=music"&gtPopular Music
&ltoption value="index=music-dd"&gtMusic Downloads
&ltoption value="index=classical"&gtClassical Music
&ltoption value="index=dvd"&gtDVD
&ltoption value="index=vhs"&gtVHS
&ltoption value="index=restaurants"&gtRestaurants (Beta)
&ltoption value="index=theatrical"&gtMovie Showtimes
&ltoption value="index=toys"&gtToys
&ltoption value="index=baby"&gtBaby

sub SetEditBox { #$name, $value
Notice SetEditBox uses "field-keywords" and "diaper" look at Amazon's view source html
&ltinput type="text" name="field-keywords" size="15">

Finally sub ClickFormImage { #$imageName, TRUE
Notice ClickFormImage uses "Go"

This could be confusing we actually are using the alt=  or the value=

look at Amazon's view source html
&ltinput type=image name="Go" value="Go!" border=0 alt="Go!" src=http://g-images.amazon.com/images/G/01/v9/search-browse/go-button-gateway.gif width=21 height=21 border=0 align=absmiddle >