1. See the Insert From URL script step
2. You'll need to do a lot of text parsing. There are many text functions available in FileMaker and if you have advanced there are additional custom functions available. (There are web sites that share FileMaker custom functions that you can google.) You can give the substitute function a list of words for which it substitutes an empty string to filter out text, such as HTML tags from the downloaded mass of text.
3. See the leftwords, middlewords and rightwords functions.
4. You'll probably need to parse your filtered text into a table with one record per word and then sort them (To group same words together) in order to get statistics on each word. A looping script comes to mind as a way to extract the words one at a time from the text field storing test with the HTML tags removed (or you can just skip over them in this looping script.)
The main thing that you will need is probably a pause after the Insert From URL possibly with a loop that checks to see if the field getting the data from this step is empty or not. Don't see a need for a button click to do the text analyzing as a separate step though that may be the simpler option.
thanks for your reply. I managed to execute steps 1-3. Can you give me a hint on how to do step 4? How can I store each word in an own record from a script? Do you have a link to a tutorial or an example on how to do it?
The following script assumes that you have the following table and relationships:
WebPage::__pkPageID = WordStats::_fkPageID
This script would be run from a layout based on WebPage after the text from the web page has been inserted and the HTML Tags removed. (Or you could add code after set variable [$Word... that skips the next five steps if $Word is an HTML tag.
Set Variable [$PageID ; WebPage::__pkWebPageID ]
Set Variable [$K ; value: $K + 1 ]
Exit Loop If [ $K > WordCount ( WebPage::PageTextField ) ]
Set Variable [$Word ; value: MiddleWords ( WebPage::TextField ; $K ; 1 ) ]
Go to Layout ["WordStats" (WordStats) ]
Set Field [WordStats::_fkPageID ; $PageID ]
Set Field [ WordStats::Word ; $Word ]
Go To Layout [original layout]
For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained
awesome! It really worked! Thank you so much!