[ This post is the a continuation of my previous work on the subject. ]

Solved!!

Right from the start, I was dismayed at the lack of documentation of PostData's type. (Saying Variant is totally meaningless.) After lots of research, I found how to format the data to IE's liking.

use strict; use warnings; use Win32::OLE qw( ); use Win32::OLE::Variant; # qw( Variant VT_* ); my $IE = Win32::OLE->new("InternetExplorer.Application") or die("Could not start Internet Explorer.Application\n"); $IE->{visible} = 1; my $url = "http://amos.shop.com/amos/cc/main/ccn_search/ccsyn/15 +0/stid/6150608"; my $post_data = "search_form=&st=socks&sy=products&search_button.x=39& +search_button.y=12"; $IE->Navigate( $url, undef, undef, Variant(VT_UI1, $post_data), "Content-Type: application/x-www-form-urlencoded\r\n", ); # Alternative Syntax # ================== # # $IE->Navigate($url, { # PostData => Variant(VT_UI1, $post_data), # Headers => "Content-Type: application/x-www-form-urlencoded\r\n" +, # });

The CGI script I used for debugging returned:

REQUEST_METHOD=POST CONTENT_LENGTH=71 CONTENT_TYPE=application/x-www-form-urlencoded Content length: 71 Content (hex): 7365617263685f666f726d3d2673743d736f636b732673793d7072 +6f6475637473267365617263685f627574746f6e2e783d3339267365617263685f627 +574746f6e2e793d3132 Content: search_form=&st=socks&sy=products&search_button.x=39&s +earch_button.y=12

In reply to Re: Win32::OLE VBA to Perl Translation Question about Internet Explorer (solution) by ikegami
in thread Win32::OLE VBA to Perl Translation Question about Internet Explorer by sailortailorson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.