Jason Hyde wrote:
I can access the webpages I want through the Web-Layout
I am not sure what you mean by "the Web-Layout". If you meant a web viewer, you can get its source HTML by using the GetLayoutObjectAttribute() function.
I meant the 'web viewer tool' in Layout view.
I'll look into the GetLayoutObjectAttribute() function.
That's exactly the function I need to get the HTML out. Fantastic. Now to solve the problem of parsing the data from the code.
Thanks very much for your help,
I am not sure what you're up against, but I would parse HTML only as the last resort - lots of work, and liable to break down at the slightest change in the web page's code.
I'm trying to pull information about chemicals from an online DB. Entering this information by hand is very time consuming and prone to mistakes. There are a couple of pages that have good info, but require you to enter a unique code, which I do not have access to directly; I can search with a CAS number that I do have though, and the first hit search results provide me with the unique code. This is what I need to parse out of the HTML - I don't think it will change very much, and I could set the field not to refresh if it already has content, i.e. only new entries (or unviewed) will go and collect the data.
However... I can't seem to get the GetLayoutObjectAttribute command to work.
I set the field to 'Calculation' with the formula
My Object is named "WebView1" in the info palette. I can get results for "bounds", "hasFocus", "Left" etc, but I can't seem to get any data back from "source" and "content".. I have tried setting the field to 'text' and 'container' but nothing works.
Can anyone point me in the right direction?
Thanks in advance.
Make sure that the calculation field is unstored. The result type should be Text.