Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Win32::OLE VBA to Perl Translation Question about Internet Explorer (work)

by ikegami (Patriarch)
on Jan 17, 2007 at 05:07 UTC ( [id://595025]=note: print w/replies, xml ) Need Help??


in reply to Win32::OLE VBA to Perl Translation Question about Internet Explorer

All three version produce a GET request.

Some searching revealed

The post data specified by PostData is passed as a SAFEARRAY Data Type structure. The VARIANT should be of type VT_ARRAY and point to a SAFEARRAY Data Type. The SAFEARRAY Data Type should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

Armed with that knowledge, I tried

$IE->Navigate("http://...", undef, undef, [ ord('A'), ord('='), ord('B +') ]);

Yay! It produced a POST request! Unforunately, the data is kinda weird. I get the following 48 bytes of data (shown in hex).

03 00 00 00 00 00 00 00 41 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 3D 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 42 00 00 00 00 00 00 00

In python, the solution is to use buffer("...post data...") as the argument, but I don't know the Perl equivalent.

This page provides a workaround.

I wish I could solve this (using Win32::OLE::Variant?), but I need to go. I'll try tomorrow. [ Bingo! See my followup for details. ]

Replies are listed 'Best First'.
Re^2: Win32::OLE VBA to Perl Translation Question about Internet Explorer
by sailortailorson (Scribe) on Jan 17, 2007 at 05:41 UTC
    Well, thanks for making something work, confirming that it is not a piece of cake, and for explaining how it works elsewhere and giving pointers to other resources.

    This is great!

    I would effuse more, but I have some late night testing to do. Thank you Ikegami.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://595025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2025-01-15 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (49 votes). Check out past polls.