March 19, 200916 yr I've attached a sample file for an address verification through display of www.anywho.com in a web viewer. So far so good. Except, that the site contains so much "junk" which I don't need to see... is there a way to only display the part of the website which contains the result?? Like Apple allows you to create a snipped with a part of a website and view it in the dashboard? Thanks for any tips and insights! See file attached. Address_Verification.fp7.zip
March 19, 200916 yr Author I also tried to "cover" part of the web viewer. But that doesn't work either. In fact, the web viewer acts like a black hole, swallowing everything you put on it... Could the info be inserted into FM fields, as opposed to even putting the web viewer on the layout? This is the source code from the page which contains the result: Michael Huber 145 W 129th St New York, NY 10027 (212) 690-4556 Add to Address Book | Nearby Businesses | Map | Driving Directions Remove Listing
March 20, 200916 yr Basically the Web Viewer is what they return to you via the URL to give them. You would have to parse out the part you wanted. Personally, I prefer to use some other tool, that returns the text directly. Since I'm mostly on a Mac, I use AppleScript and do shell script, to run "curl". You could do the same thing on a PC, using a combo of things (but I'll leave that as an exercise for others). You could just parse it out using FileMaker text functions, after getting the "content" of a (named) Web Viewer, via: GetLayoutObjectAttribute ( "WV" ; "content" ) In this case that would not be too difficult, as there is one line in the HTML that has all the info, the one with "vcard", which only appears once. The attached file gets the info using AppleScript. It does not require a Web Viewer at all. But you could parse it out of the Web Viewer contents using FileMaker also.
March 21, 200916 yr Author Wow! That's amazing. You're the ONE (aka Matrix, the movie) Of course my client uses PCs... no clue how I could translate that. But I'll do some digging how I can get the information out of the web viewer within FileMaker. If I understood correctly, that should be possible also?
March 21, 200916 yr Author Fenton, I took your approach in extracting text from the web viewer - I've attached the result. This should work on a PC as well as a MAC Thank you again for your help!! Address_Verification.fp7.zip
March 21, 200916 yr Yes. I was only using AppleScript so as not to use the Web Viewer. But after that, getting the line is much the same, because that vcard stuff is only in the content once, and the other calculations are much the same. I tend to just reach for AppleScript with do shell script in these situations, because it's cleaner and faster. But in most cases speed doesn't matter. If you hit their web site as fast as shell scripting can do (several times a second), they might block you anyway.
Create an account or sign in to comment