little samie

Index   Next

This document will explain how to use slingshot to write Samie Scripts.  It assumes that you have already installed Active Perl, Samie and Slingshot.  You can receive your slingshot files and installation directions by making an $11 donation to samie.  Just go to the samie home page and click on the Paypal button.

This script will allow you to start a blank slingshot.

use Win32::OLE;
use Win32::SAM;
use Win32::Slingshot;

$Win32::OLE::Warn = 3;

FireSlingshot();

Copy the 5 lines of code above to a file named slingshot.pl and run it by typing it at the command line or clicking on it from an explorer window. 
A window like the one below should appear:

 

Enter the URL that you like to start at in the URL: Edit box.  For example http://www.google.com

Click on the Load URL button to the right of the URL: Edit box.

Notice the Document 1 folder in the DOM tree that runs down the left hand side of slingshot.  This folder represents all controls in the new Internet Explorer Window that has appeared on your desktop.

Click on the Folder.  The Dom Tree should now look like this:

Click on the all folder and expand it.  The Dom Tree should now look like this:

At anytime you can create a new samie script in slingshot.  To do this, select File New from the menu.  Notice that the Samie Script tab in slingshot now displays this code. Because you have navigated to www.google.com.  It appears in your samie script.

To save the file select File Save as.  Pick any file name you want like foo.pl.  Notice that the Samie Script tab now shows the filename like this:

Index   Next

little samie