To test it we copied the Perl Script from the Perl Tutorial web pace and entered the obvious modifications:
Code: Select all
use Win32::OLE;
$b = Win32::OLE->new('imacros') or die "iMacros Browser could not be started by Win32:OLE\n";
$b->{Visible} = 1;
$b->iimInit("-ie");
my $macro = 'TASE_index_intraday';
$b->iimPlay($macro);
&err ();
$b->iimExit();
########################################################################
# Get the last message reported from iMacros upon macro completion status#
########################################################################
sub err {
$lastMessage = $b->iimGetLastErrorMessage();
if ($lastMessage =~ /Macro completed/) {
print("Success <$macro> $lastMessage\n");
#write a logger here for Success $lastMessage
}
else{
print("Failure <$macro> $lastMessage\n");
#write a logger here for Failure $lastMessage
}
}
__END__
Code: Select all
Navigation to the webpage was canceled
What you can try:
Retype the address.
The IE Address line displayed was:
"about:blankfile:///C:\Program%20Files\iMacros\Welcome_plugin.htm?authorizeAll=false&pipeUuid=a4a3b540_43aa_498c_b785_ea20f394057e&creatorUuid=b57f485a_37fe_4919_8e35_5f9e98323358"
This is strange! Why is the address appended and not replaced???)
The 'TASE_index_intraday' macro is:
Code: Select all
VERSION BUILD=6801021
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.tase.co.il/TASEENG
TAG POS=1 TYPE=FONT ATTR=TXT:Market<SP>Data
TAG POS=1 TYPE=FONT ATTR=ID:font2{5DD28B33-02B9-4319-AD0F-7F31CC10894D}
TAG POS=1 TYPE=A ATTR=TXT:Market<SP>Cap.
'New page loaded
TAG POS=1 TYPE=TD ATTR=ID:TabIndexCreator1_tabHistory
'New page loaded
TAG POS=1 TYPE=TD ATTR=ID:history1
TAG POS=2 TYPE=INPUT:BUTTON FORM=NAME:Form1 ATTR=VALUE:Display<SP>Data
'New page loaded
TAG POS=1 TYPE=TD ATTR=TXT:<SP>Export<SP>Table<SP>Data<SP><SP>
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}
TAG POS=1 TYPE=A ATTR=TXT:TSV
TAB T=2
'New page loaded
And finaly, the log file contents was:
09/01/2010 20:43:55 248 Running in IE Integration Mode
Any clue?