innodat Posted March 19, 2009 Posted March 19, 2009 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
innodat Posted March 19, 2009 Author Posted March 19, 2009 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
Fenton Posted March 20, 2009 Posted March 20, 2009 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.
innodat Posted March 21, 2009 Author Posted March 21, 2009 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?
innodat Posted March 21, 2009 Author Posted March 21, 2009 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
Fenton Posted March 21, 2009 Posted March 21, 2009 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.
Recommended Posts
This topic is 5738 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now