Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: use Win32::IEAutomation;

by Khen1950fx (Canon)
on Dec 26, 2011 at 13:26 UTC ( [id://945111]=note: print w/replies, xml ) Need Help??


in reply to use Win32::IEAutomation;

Win32::IEAutomation's documentation is simple and clear. I would do something like this:
#!perl use strict; use warnings; use Win32::IEAutomation; my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1, warnings => 1, ); $ie->gotoURL('http://www.example.com'); $ie->getTextBox('name:', "importFile")-> SetValue("C:\test\9780547076034NIMAS.opf"); $ie->WaitForDone(); $ie->closeIE();
Make sure that you have Win32::OLE installed.

Replies are listed 'Best First'.
Re^2: use Win32::IEAutomation;
by johngg (Canon) on Dec 26, 2011 at 18:10 UTC

    Shouldn't the backslashes of the path in the SetValue() call be escaped since they're in a double-quoted string?

    Cheers,

    JohnGG

      Very much so. "\t" is a tab character, in that code. But backslashes often should be doubled even when they are inside a single-quoted string. That wouldn't be required for any of these particular backslashes (if the quotes were changed to single quotes), but it might be wise, depending on your style choices and programming habits.

      - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-29 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found