Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    Problem getting HTML data from Web object

    Hi, I have a little problem getting HTML source from a secured website.
    I need a Table with Data thats on this website
    (HTTPS with logins/coockies and sessions and ...?)

    This website is very tricky, but browsing with Web object is no problem ! event right click and view source works, but it shuold be an automated task.
    I tried HTTPS.DownloadSecure / HTTP.SubmitSecure with correct ports and Logins to get file locally but no solution.

    Now I created a new Generic TextOnly Printer, to store a file locally and use Web.Print to store the Text Data in a file. Then I process this data to a Table and back to HTML again ... ... But this is very sloppy and timeconsuming since the table is messed up by Text2File printing.

    Does anybody have a more proper solution, to get the HTML source from the Web object ... ?

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    do you want the source or the content on the page?

  3. #3
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129
    Quote Originally Posted by Worm
    do you want the source or the content on the page?
    I would like to have the source.
    This is because it's easier to get Data from the tables in the webpage

  4. #4
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    additional info requested by Worm

    Quote Originally Posted by Worm
    do you want the source or the content on the page?
    Some additional info:

    I would like to login on a Website (the tricky one, see first post) with the Web Object

    in AMS I'll make a button wich navigates to particular page on this server(this is already O.K.), get source code of displayed page, extract some data from HTML source code, run some statistics and create a local HTML file with a report of the calculations.

    This is why I would like to be able to access HTML Source code from the page currently being displayed in the web object

    This would make my AMS project really usefull.

    PS
    the second issue would be cool to automate a search on this website and see the results in the Web.Object,
    but then I would need to POST Data to the WEB.OBJECT
    the search URL is like:
    https://aaa.bbb.com:1234/ABC/search_doc.jsp
    Post DATA like:
    Parameter: (Mime Type) Value application/x-www-form-urlencoded
    Parameter: docid Value:123456789-012
    tried HTTP.Submitsecure, but it seems it's not the same session as the WEB OBJECT so this fails, The only thing I seem to be able to automate is Browsing this website with the web object.

    Any Help would really be arappriciated

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Getting the source is simple enough once you're on the page

    Code:
    Web.LoadURL("Web1", "javascript:alert(document.all[0].outerHTML)")
    How to get that info into AMS is the hard part. I tried passing it in the URL, but it is truncated. I thought maybe it could be set as a cookie, then retrieved within AMS some other way, but haven't had much of a chance to try that.

    Another thought would be to use:
    Code:
    Web.LoadURL("Web1", "javascript:document.execCommand(\"SaveAs\",\"false\", \"C:\\\\htmlsource.txt\")")
    In conjunction with the KeyStrokes dll to automate the save, but that doesn't seem real clean either. I'll see what I can come up with, but that's the best I have so far.


    ")
    Last edited by Worm; 08-11-2005 at 09:20 AM.

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    This isn't pretty, but it seems to do the trick. There has to be a better way.

    Cookies are limited to 4K, so thats out...
    Attached Files

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Here's a much cleaner solution... it uses the luaCom plugin from (http://www.icynorth.com)

  8. #8
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    Smile

    Quote Originally Posted by Worm
    Here's a much cleaner solution... it uses the luaCom plugin from (http://www.icynorth.com)
    Thnx Worm for your interest, and helping me ...

    I'll Try all of your solutions right now, so I'll be busy for a while

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Okay, sorry to keep going on this, but this is too cool to not share.

    I extended the luaCom project a little more. The issue before was that your user couldn't really interact with the "automated" Internet Explorer Window. It hit me that I might be able to embed the Internet Explorer Window in AMS to emulate the web object.

    Guess What!? I can, and did! With a couple handy API calls to remove the title bar and to set it's parent, I was able to take the Internet Explorer Window and make it look like the Web Object within the AMS project. Now, you can control the Internet Explorer Window within your AMS project via luaCom, plus the users can interact with it too.

    Anyhow, this should give you a seamless solution. This goes to prove to me, yet again, how powerful AMS can be.

  10. #10
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    [Can't resist]

    "You don't know the power of the Code Side! Come Worm, join me... we will rule the galaxy together... as goofy guy 1 and ... goofy guy2!"

    [/Can't resist]

    Code:
    Hard.Message("Dee", "Har-Har!")


    (btw, this is pretty nifTAY!)
    Intrigued

  11. #11
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    Cool

    Quote Originally Posted by Worm
    Okay, sorry to keep going on this, but this is too cool to not share.

    I extended the luaCom project a little more. The issue before was that your user couldn't really interact with the "automated" Internet Explorer Window. It hit me that I might be able to embed the Internet Explorer Window in AMS to emulate the web object.

    Guess What!? I can, and did! With a couple handy API calls to remove the title bar and to set it's parent, I was able to take the Internet Explorer Window and make it look like the Web Object within the AMS project. Now, you can control the Internet Explorer Window within your AMS project via luaCom, plus the users can interact with it too.

    Anyhow, this should give you a seamless solution. This goes to prove to me, yet again, how powerful AMS can be.
    Yep, this is to COOL to be true THNX very much, you even provided solution before I could ask the question, because your previous "luaComGetSource" started another inctance of IE and I would end at the logonpage for that website, this one should solve this issue.

    I'm not very expirienced so where can I find more info on controlling this Internet Explorer Window with the LUAcom plugin for (Back-Fwd button, get displayed url (like e_URL on loaded) or even Post data to this IE window.

  12. #12
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    WOW I just discovered info on controlling IE instance, in AMS project
    This is more than I asked for ....

    MSDN info in iternetexplorer object

    This is really COOooooollll
    THNX again Worm for your effort

    on minor drawback, is when th IE object has focus, the onmouse-over effect in AMS is gone till I click AMS window, but I can live with this. The control of this IE object is a boost for my creativity for me for now ... Lots of hours of playtime to go to expand my project ....

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by johnraus
    one minor drawback, is when th IE object has focus, the onmouse-over effect in AMS is gone till I click AMS window, but I can live with this.
    No need to live with it when it can be overcome...

    Here's the fix, I used my mouse.dll to determine which window the pointer is over, then use the User32.dll function SetFocus to put the focus on the correct window.

    When/If you do more automation with IE, I'd love to see what you come up with.

    I agree with you on this one... it opens up a whole new avenue with web integration. I'm very interested in how well this will perform. Please keep me updated.
    Last edited by Worm; 08-11-2005 at 08:39 PM.

  14. #14
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    Thumbs down COooollll

    Hey Worm, you did it again
    I'll keep you posted...

  15. #15
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Bug fix:

    In On Preload the action:
    oIE.Resizable = false;

    needs to come after the DLL.CallFunction statements. Otherwise the IE window is resizable inside the AMS app. Although that's kinda cool, its not the what you're looking to do.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Web Object Navigational Problem
    By rayamin in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-26-2005, 08:25 AM
  2. Problem at runtime with an HTML object
    By Martin_SBT in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 02-12-2003, 12:37 PM
  3. HOW TO: Return a Web Browser Object to the Original URL after a Page Jump
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 02-03-2003, 09:18 AM
  4. Web Browser Object Problem
    By Merlin1102 in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 10-31-2002, 05:44 AM
  5. Replies: 0
    Last Post: 10-04-2002, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts