GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:

Monks
Got a quick question. I asked in #perl if it was possible to read text from an Active X object. I was told "to run away" by a channel op I believe. Just want to make sure that there is no way before I abandon all hope and start copying and pasting.

Replies are listed 'Best First'.
Re: Reading from an ActiveX Object
by GrandFather (Saint) on Jul 08, 2008 at 04:59 UTC

    Give us more context. In general if you can do it from VB or VB script you can do it from Perl. How you do it depends on what it is you are actually trying to do.


    Perl is environmentally friendly - it saves trees
      Hi:

      Well, here's the site I'm trying to read from:
      http://www.jp.playstation.com/software/

      As you'll notice, the item index is generated within an ActiveX object. I would basically like to read from there and get the pertinent info. Each item's title, release date, publisher.

      I did search through CPAN but what I looked at all seemed server side. A point in the right direction would be very appreciated.

        ActiveX is always client side - it is code that runs on your system. My Japanese is nonexistent so I can't easily determine what you are trying to retrieve. Try looking at the page source in your browser to see if the information you want is buried there somewhere.


        Perl is environmentally friendly - it saves trees

        If you use firefox with the firebug plugin you can trace request made via the XMLHttpRequest object(probably the ActiveX component in question on IE). Doing so I was able to find the content of the search at this url:

        http://www.jp.playstation.com/software/search.cgi?ITEM_NAME=& FORMAT_PS3=0&SORT=1&START=&FORMAT_PSP=0&FORMAT_PS2=0&FORMAT_PS=0& JP_GENRE_CODE=&MAKER_CODE=&START_YM=&END_YM=&ONLY_DISC=0& ONLY_ONLINE=0&BEST_FLAG=0&ARCHIVES=0&ON_SALE=1

        If you twiddle some of the URL params you should be able to mimic the search criteria you are looking for.

Re: Reading from an ActiveX Object
by pc88mxer (Vicar) on Jul 08, 2008 at 04:56 UTC
    I don't know much about ActiveX, but searching for it on CPAN yields quite a few hits.