tmas73 Posted July 11, 2006 Posted July 11, 2006 I was playing around and it seems you are limited to receve of data to the pre defined web services, like google, fedex and so on. Would it be possible to recieve data from Amazon.com or imdb.com? Anyone knows? Will this be possible?
JerrySalem Posted July 11, 2006 Posted July 11, 2006 The web viewer also has access to the calculation engine. You can send a request to any web site. We are working on a help desk system that integrates with our existing Web pages. You aren't limited to the buttons at the 'top' of the setup screen. You can type anything in the bottom part. HTH Jerry
tmas73 Posted July 11, 2006 Author Posted July 11, 2006 Hi How would you go about in getting info from Amazon or IMDB, is it based on mySQL or the system they are using?
Vaughan Posted July 11, 2006 Posted July 11, 2006 The ability to get information from a web service depends solely on how the service has set up their query to get the results -- it has to be consistent -- and whether they publish the details of this query. Of course, if they decide to change their query string format everything will break.
tmas73 Posted July 11, 2006 Author Posted July 11, 2006 Thanks for the info! http://www.filemaker.com/products/fmp/integration.html States to get info from web sites into the database! I could not fined any sample projects or info on how to start doing so! Some info on this? Thanks
Fenton Posted July 12, 2006 Posted July 12, 2006 You can get the raw source html of the web page returned, as text, by using a calculation like: GetLayoutObjectAttribute ( "web object name" ; "content" ) You have to give that web viewer object a name first, in the Object Info palette (was Object Size I believe). Then you could parse the data from there. You have to have the web object on the layout. My take on this is that if you are just wanting to get data, but don't care to see the actual web page, you are likely better off using AppleScript with do shell script "curl 'http://www.the web site'". It's faster, and you can use command line tools such as grep to find and extract your data. Or, in case where there is already a web service available, such as Amazon, then you could use XML Import, with an XSL stylesheet, to get and import the data directly. But the web viewer is the ticket if you want to see the page and get some data; providing that you can parse it using FileMaker's text functions.
tmas73 Posted July 12, 2006 Author Posted July 12, 2006 Thanks for the reply. Ok what I did was: Ceated a Web Viewer Window (Object Name "IMDB" a URL pointing to the website I want to harvest, I created a field with a auto enter calculation "GetLayoutObjectAttribute ( "IMDB" ; "content")", then in browse mode nothing shows up in the text field no code or anything! What am I doing worng? Should it not show the sites html code? I'm lost! Please help!
tmas73 Posted July 12, 2006 Author Posted July 12, 2006 Got it to work! It has to be a calculation field! Thanks
tmas73 Posted July 12, 2006 Author Posted July 12, 2006 So the calculation is working but it wont refresh to the current website browsed! Iny clues on this one? T
Ted S Posted July 12, 2006 Posted July 12, 2006 You might try checking: "Do not store calculation results--recalculate when needed" I just making a wild guess.
tmas73 Posted July 12, 2006 Author Posted July 12, 2006 (edited) I did but its slow, it will take a while till it shows up! The Website is loaded and after a while and clicking around it will show up! Thanks Edited July 12, 2006 by Guest
Fenton Posted July 12, 2006 Posted July 12, 2006 Yes, I've since experimented a bit. And I have to say "We're not in Kansas anymore." The web viewer is different from other FileMaker objects, in that you have to wait until the page loads before the "content" is available. What this means is that it is very difficult to get that data into auto-entered text fields. i could get it to auto-enter into text fields using the Evaluate() function AND manually causing the URL to reset, either manual editing, or by copy/pasting; and it actually auto-entered from the previous URL (the same in this case); just setting it to itself did not work. The Reset option does not work for this, as it causes the content to refresh. So it really requires a script. You can set the field using the GetObjectAttributes() function. But you still have to wait until it loads. The best option I found was a loop with a 1 second pause, testing to see when it got the data. Do not do a loop without the pause, or it will take even longer, as it devotes considerable energy to running the loop. WebViewer_content.zip
tmas73 Posted July 13, 2006 Author Posted July 13, 2006 Thanks for your solution, really nice and helpfull, in the parsing progress u used a nice script to rip the title out of html. I do wonder if you have "" in html like for example Let ( [data = iMedia::Test; posTitle = Position ( data ; "" ; 1 ; 1 ) + 6 ; posTitleEnd = Position ( data ; "" ; 1 ; 1 ) ] ; Middle ( data ; posTitle; posTitleEnd - posTitle )) the "sans" gives a error but its the html it has to find!
Wim Decorte Posted July 13, 2006 Posted July 13, 2006 I have to second Fenton on this, while you can get the source of whatever the web viewer displays, it is primarily a "viewer". The OS scripting tools offer a lot more flexibility of getting the content (not the source) and interacting with a web page...
Recommended Posts
This topic is 6783 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