Perl script: "Navigation to the webpage was canceled"

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Sat Jan 09, 2010 7:52 pm

I just downloaded and installed iMacro ver. 6.80 on IE ver. 7.0.5730.13. First macro recorded and can be played back manually from the IE side bar with no problem. The main application of it however is going to be from a Perl script.
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__
It failed with the following IE Screen:

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?
Regards,
Meir
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Sun Jan 10, 2010 9:20 am

And another clue:
I placed "print" statements liberally as followed:

Code: Select all

 
use strict;
use Win32::OLE;
 print "Just started\n";
 my $b = Win32::OLE->new('imacros') or die "iMacros Browser could not be started by Win32:OLE\n";
 $b->{Visible} = 1;
 print "After invoking the IE\n";

 #Start the iMacros Browser - Use iimInit("-ie"/"-fx") to start iMacros for IE/Firefox instead.
 $b->iimInit("-ie");
 print "After init\n";
 my $macro = "C:\Documents and Settings\All Users\Documents\iMacros\Macros\TASE Site - Indices.iim";

 $b->iimPlay($macro);
 print "After initiating the iMacro\n";
 &err ();
 $b->iimExit();
 
 ########################################################################
 # Get the last message reported from iMacros upon macro completion status#
 ########################################################################
 sub err {
    my $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__
and it is strange! The IE page withe the "... canceled..." error message appears immediatly, even before the constractor is invoked. Then the script hangs for about 20 seconds and all the print messages are executed at once.
Hmmmm....
Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Fri Feb 05, 2010 12:22 pm

Hello, we apologize for coming back to you only after a long period of time. Before I start on it, please tell me if this issue is still relevant?
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Fri Feb 05, 2010 1:14 pm

Oh yest, it is.
Regretabley, I am doing these manually, but I sure would like to automate it.
I almost gave up on you. I was doing something else so I hadn't time to uninstall iMacro.
Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Sat Feb 06, 2010 2:28 pm

Hello,

Again, I am really sorry this topic slipped through our fingers. I have just tried basically same code with Visual Basic:

Code: Select all

Dim macro
macro= "CODE:"
macro = macro + "       VERSION BUILD=6801021     " + vbNewLine 
macro = macro + "       TAB T=1     " + vbNewLine 
macro = macro + "       TAB CLOSEALLOTHERS     " + vbNewLine 
macro = macro + "       URL GOTO=http://www.tase.co.il/TASEENG     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=FONT ATTR=TXT:Market<SP>Data   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=FONT ATTR=ID:font2{5DD28B33-02B9-4319-AD0F-7F31CC10894D}   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=A ATTR=TXT:Market<SP>Cap.   " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=ID:TabIndexCreator1_tabHistory   " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=ID:history1   " + vbNewLine 
macro = macro + "       TAG POS=2 TYPE=INPUT:BUTTON FORM=NAME:Form1 ATTR=VALUE:Display<SP>Data " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=TXT:<SP>Export<SP>Table<SP>Data<SP><SP>   " + vbNewLine 
macro = macro + "       ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=A ATTR=TXT:TSV   " + vbNewLine 
macro = macro + "       TAB T=2     " + vbNewLine 
macro = macro + "       'New page loaded" + vbNewLine 

Set iim1 = CreateObject("imacros")
iret = iim1.iimInit("-ie")
iret = iim1.iimPlay(Macro)
It worked just fine. Could you try running it (save it to a .vbs file), to determine if that issue is specific to Perl or if it is an installation issue? If it shows to be a Perl specific issue, I will install Perl and run this macro on it. Could you tell me which Perl version you're using? Is it Active Perl?

As soon as I get a reply from you, I will start working on it and give this issue a priority as it is highly overdue.

Best regards,
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Sat Feb 06, 2010 5:34 pm

Sorry Daniel, but it seems to me that it displays the same symptoms.

What I did is to copy (clicked the "Select All" of the code), pasting it into a text editor, and then saving it with a ".VBS" extension. I then invoked it with a double click which immediately showed the IE page with the following contents:

Navigation to the webpage was canceled

What you can try:
Retype the address.


Also, whatever the url is, it was appended to my "home page" url which is "about:blank". It was:

Code: Select all

about:blankfile:///C:\Program%20Files\iMacros\Welcome_plugin.htm?authorizeAll=false&pipeUuid=296516d4_5373_48d0_a8b6_31180c021070&creatorUuid=d18d951d_75b2_4fb6_9fea_239903e976b8
#############################################

Second and third tries:

I again did the same, this time the code seems different. (Unfortunetly I can't show the previous one since I overwritten the first with the new.)

This time there was an error pane:
iMacro.jpg
iMacro.jpg (57.29 KiB) Viewed 6981 times
#############################################

Fourth try:

I now looked again at your VBS code on the forum page and I can see now that in the second and thirs tries what was different is the lack of the macro = macro + clause at the beginning of most lines.

This time the phennomena were the same as in the first try.

May be the culprit is the IE security settings???

Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Mon Feb 08, 2010 1:15 pm

Hi Meir,

Well, this does look like a browser related issue. Very strange actually. That vbs code runs perfectly here.
What do you get if you execute something like

Code: Select all

iexplore http://www.google.com
in the Start-Run?

Now, to make sure it is Internet Explorer related issue, could you try this vbs script, which should run Firefox (basically same script, but -ie is replaced with -fx):

Code: Select all

Dim macro
macro= "CODE:"
macro = macro + "       VERSION BUILD=6801021     " + vbNewLine 
macro = macro + "       TAB T=1     " + vbNewLine 
macro = macro + "       TAB CLOSEALLOTHERS     " + vbNewLine 
macro = macro + "       URL GOTO=http://www.tase.co.il/TASEENG     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=FONT ATTR=TXT:Market<SP>Data   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=FONT ATTR=ID:font2{5DD28B33-02B9-4319-AD0F-7F31CC10894D}   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=A ATTR=TXT:Market<SP>Cap.   " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=ID:TabIndexCreator1_tabHistory   " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=ID:history1   " + vbNewLine 
macro = macro + "       TAG POS=2 TYPE=INPUT:BUTTON FORM=NAME:Form1 ATTR=VALUE:Display<SP>Data " + vbNewLine 
macro = macro + "       'New page loaded     " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=TD ATTR=TXT:<SP>Export<SP>Table<SP>Data<SP><SP>   " + vbNewLine 
macro = macro + "       ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}   " + vbNewLine 
macro = macro + "       TAG POS=1 TYPE=A ATTR=TXT:TSV   " + vbNewLine 
macro = macro + "       TAB T=2     " + vbNewLine 
macro = macro + "       'New page loaded" + vbNewLine 

Set iim1 = CreateObject("imacros")
iret = iim1.iimInit("-fx")
iret = iim1.iimPlay(Macro)
Good luck with that!
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Thu Feb 11, 2010 2:06 pm

Dear Daniel,

OK!

First: Start -> Run "iexplore http://www.google.com" opened the Google homepage in the IE with no problem.

Second: I downloaded and installed FireFox and the iMacro for it. I then invoked the VBS script you sent me and I observed as followed:

1) The initial address line was at least similar to its IE version. At least something was appended to the home page "about:blank" string.

2) Once the macro was loaded, the address was changed to the target page address and the macro executed.

3) Unlike the IE, the FX version did execute successfully, as intended :D .

4) During the execution however, the following error message appeared, even though the macro ran to completion:
iMacro_error_fx.jpg
iMacro_error_fx.jpg (53.64 KiB) Viewed 6938 times
The same error message appeared even when I manually run the iMacro I re-recorded (see below) in FX. It seems to me that an anti-robot embedded function failed, but it didn't fool iMacro :lol: !

Third: Back to Perl: to see how is my FireFox dealing with it, I re-recorded the macro from within FX. I then modified the Perl script to be as follows:

Code: Select all

 use strict;
 use Win32::OLE;
 print "Just started\n";
 my $b = Win32::OLE->new('imacros') or die "iMacros Browser could not be started by Win32:OLE\n";
 $b->{Visible} = 1;
 print "After invoking OLE\n";

 #Start the iMacros Browser - Use iimInit("-ie"/"-fx") to start iMacros for IE/Firefox instead.
 $b->iimInit("-fx");
 print "After init\n";
 
 my $macro = "C:/Dad's Documents/iMacros/Macros/TASE_intraday_index_TA25.iim";
 $b->iimPlay($macro);
 print "After initiating the iMacro\n";
 &err ();
 print "After the call to err()\n";

 $b->iimExit();
 
 ########################################################################
 # Get the last message reported from iMacros upon macro completion status#
 ########################################################################
 sub err {
    my $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__
And here is the "TASE_intraday_index_TA25.iim":

Code: Select all

VERSION BUILD=6500125 RECORDER=FX
TAB T=1
URL GOTO=http://www.tase.co.il/TASEEng/homepage.htm
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.
TAG POS=1 TYPE=TD ATTR=ID:TabIndexCreator1_tabHistory
TAG POS=1 TYPE=TD ATTR=ID:history1
TAG POS=2 TYPE=INPUT:BUTTON FORM=ID:Form1 ATTR=VALUE:Display<SP>Data
TAG POS=1 TYPE=TD ATTR=TXT:Export<SP>Table<SP>Data
TAG POS=1 TYPE=A ATTR=TXT:TSV
TAB T=2
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAB T=2
TAB CLOSE
TAB T=1
The result was different now. A window flashed for a fraction of a second (I couldn't determine which, IE or FX) and Perl quit with the error path ( the "else" clause of the "if" in the err() subroutine).

Commenting out the call to the "err()" subroutine didn't change much, the same flashing of a window opening and then immediately closing.

However, I tried to run it about ten times, and once the same strange address line of before appeared and there the Firefox remained stuck as a doornail!:

about:blank?authorizeAll=false&pipeUuid=59bc1baa_f7e2_4720_93f6_f2d64ed4e969&creatorUuid=4888f1af_5cab_4476_ad3c_d49c6efcbf80

(It seems that this address is always sent to whatever is the browser. It must be taken from somewhere in the Registry. I commented out everything from line 12 to the end, and a Firefox window appeared with that cursed address line!)

Please analyze the Firefox behavior. I would be more than happy to use it rather than the IE.

Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Fri Feb 12, 2010 11:53 am

Shalom Meir,

Actually, this line "about:blank?authorizeAll=false&pipeUuid=59bc1baa_f7e2_4720_93f6_f2d64ed4e969&creatorUuid=4888f1af_5cab_4476_ad3c_d49c6efcbf80" in Firefox is absolutely normal. I would need to ask our developers why it is so, but in any case, that's the way it works and this is ok. However this "about:blankfile:///C" in Internet Explorer didn't seem ok to me at all. See, in Firefox it isn't simply concatenated.

And now I tried VBS with the last macro code you posted. And it worked fine.
Here it is:

Code: Select all

Dim macro
macro= "CODE:"
macro = macro + "    VERSION BUILD=6500125 RECORDER=FX" + vbNewLine 
macro = macro + "    TAB T=1" + vbNewLine 
macro = macro + "    URL GOTO=http://www.tase.co.il/TASEEng/homepage.htm" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=FONT ATTR=TXT:Market<SP>Data" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=FONT ATTR=ID:font2{5DD28B33-02B9-4319-AD0F-7F31CC10894D}" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=A ATTR=TXT:Market<SP>Cap." + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=TD ATTR=ID:TabIndexCreator1_tabHistory" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=TD ATTR=ID:history1" + vbNewLine 
macro = macro + "    TAG POS=2 TYPE=INPUT:BUTTON FORM=ID:Form1 ATTR=VALUE:Display<SP>Data" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=TD ATTR=TXT:Export<SP>Table<SP>Data" + vbNewLine 
macro = macro + "    TAG POS=1 TYPE=A ATTR=TXT:TSV" + vbNewLine 
macro = macro + "    TAB T=2" + vbNewLine 
macro = macro + "    ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES" + vbNewLine 
macro = macro + "    TAB T=2" + vbNewLine 
macro = macro + "    TAB CLOSE" + vbNewLine 
macro = macro + "    TAB T=1" + vbNewLine 

Set iim1 = CreateObject("imacros")
iret = iim1.iimInit("-fx")
iret = iim1.iimPlay(macro)
Could you tell me what Perl version you're using and I will install and try it with Perl?

Hope we will fix it soon now :)

Best regards,
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Sat Feb 13, 2010 9:49 am

Shalom Daniel!

First: Your VBS macro works like a charm, no problem!

Second: The Perl I work with is:

Code: Select all

This is perl, v5.10.1 built for MSWin32-x86-multi-thread
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Binary build 1006 [291086] provided by ActiveState http://www.ActiveState.com
Built Aug 24 2009 13:48:26

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Third: IMHO, the culprit is the iimPlay($macro) method of the Win32::OLE "imacros" class. It returns immediately and with a returned value of UNDEF. No macro playing!

To prove my point, here is the modified Perl script, this time with "sleep" statements between "imacros" class method invocations and testing for the return value of the iimPlay method:

Code: Select all

use strict;
use Win32::OLE;
print "Just started\n";
my $b = Win32::OLE->new("imacros") or die "iMacros Browser could not be started by Win32:OLE\n";
$b->{Visible} = 1;
print "After invoking the OLE\n";
sleep 10;
# Start the iMacros Browser - Use iimInit("-ie"/"-fx") to start iMacros for IE/Firefox instead.
$b->iimInit("-fx");
print "After iimInit\n";
sleep 10;
my $macro = "C:/My Documents/iMacros/Macros/TASE_intraday_index_TA25.iim";
print "\$macro = $macro\n";
$b->iimPlay($macro);
print "After 'playing' the iMacro\n";
sleep 10;
my $lastMessage = $b->iimGetLastErrorMessage();
if (defined $lastMessage) {
 print sprintf ("%X", $lastMessage)."\n";
}else{
 print "\$lastMessage is UNDEF\n"
};
#&err ();
sleep 10;
print "After sleeping\n";
$b->iimExit();

########################################################################
# Get the last message reported from iMacros upon macro completion status#
########################################################################
sub err {
  my $lastMessage = $b->iimGetLastErrorMessage();
  if ($lastMessage = undef) {print "$lastMessage\n";}
      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__
(Please note that the call to err() is commented out.)

BTW, the value sent to the browser as a result of the iimInit method is indeed:
about:blank?authorizeAll=false&pipeUuid=3294d51d_8349_4a89_9092_6dfde8b14c4e&creatorUuid=e9f15b98_f7e8_4a18_b703_89d21523d33e (no "file:///C" there, so I see no problem by this either.)

Regards,
Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Tue Feb 16, 2010 6:38 pm

Shalom Meir,

Well, I haven't used Perl for quite a few years, so this did take some time, but the solution was actually simple (it always is after you find it...):

The script didn't work with

Code: Select all

my $macro = "C:/Documents and Settings/ds.iopus/My Documents/Client scripts/Perl/iim.iim";
The behaviour was 100% similar to what you described.

However with this:

Code: Select all

my $macro = "C:\\iim.iim";
and this

Code: Select all

my $macro = 'C:\\Documents and Settings\\ds.iopus\\My Documents\\Client scripts\\Perl\\iim.iim';
it worked just fine :). Hope it also does so on your computer!! :)

Best regards,
Daniel, iOpus Support
mguttman
Posts: 31
Joined: Sat Jan 09, 2010 7:32 pm

Re: Perl script: "Navigation to the webpage was canceled"

Post by mguttman » Tue Feb 16, 2010 8:45 pm

Dear Daniel,

Oh God! (This is the religious corner, isn't it?) That simple!

Two points though:

1) Is it documented somewhere? I can't recall any such directive. Come to think of it though, it is not surprising. In Perl on Windows you can indeed use, without escaping, straight slashes as folder separators. But this is not Perl! This is iMacro, and all this presumably Perl method does is to pass a string to iMacro. And this string must obey iMacro rules, not Perl's! Elementary Watson! :D

2) To the best of my knowledge, the $b->iimGetLastErrorMessage() method though returns undef rather than anything resembling "Macro completed". It is not a major issue though, but I think something need to be done about it (if I am right of course) or be documented.

I can now automate a lot of things, so I'll be busy for the next couple of days. But I am aware of another issue. But this one is an iMacro issue, not a Perl one. So I'll open it in a separate thread when I am done.

Many, many thanks Daniel!
Meir
Regards,
Meir
Daniel, Tech Support
Posts: 1483
Joined: Tue Jan 26, 2010 11:35 am

Re: Perl script: "Navigation to the webpage was canceled"

Post by Daniel, Tech Support » Fri Feb 19, 2010 11:44 am

Shalom Meir,

You're right, this isn't documented and I just tried this:

Code: Select all

my $b = Win32::OLE->new('Word.Application') or die "MS Word could not be started by Win32:OLE\n";
$b->Documents->Open($macro);
with both versions of the path and both worked. So this is in deed iMacros related. Thanks for helping us to figure it out! :)
We will work on it, but for now I will update our Perl examples in wiki, to make users aware of the fact.

Best regards,
Daniel, iOpus Support
Post Reply