I am a newbie to Revolution so I'm not sure if this is doable or has already been done. But here's my question anyway. The project I am working on is to create a dictionary with words and definitions. In trying to collect this information, is it possible to have a script in Revolution Studio that does a search on a selected website and find the revelant text and retrieve it in a file format. For example. I would do a search in a selected site (say google) for the word "abundance". Once the definition for the word was found, it would retrieve the text and save it in a flie to be accessed and/or exported to another document later. If not doable, any workaround suggestions?
Thanks,
Earl
Search and Retrieve
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
That's doable.
To get web pages just use commands similar to:
And to write to a file the following is of use:
To get web pages just use commands similar to:
Code: Select all
put url "http://www.google.com/search?q=abundance" into myWebPage
Code: Select all
on writeFile
answer folder "Please choose a folder for" && the short name of this stack && "to write in."
put it into theOutputFolder
put theOutputFolder & "/" & "dataFile.xls" into myPath
set the filetype to "XCELTEXT"
open file myPath for text write
if the result is not empty then answer "Error !" & return & the result & return & "while opening." with "Damit"
write myData to file myPath
if the result is not empty then answer "Error !" & return & the result & return & "while writing." with "Damit"
close file myPath
end writeFile
on readFile
global myData
--
answer file "A tab-sperated text file is expected"
put it into theFilePath
open file theFilePath for text read
if the result is not empty then answer "Error"
read from file theFilePath until EOF
if the result is not "eof" then answer "Error"
put it into myData
close file theFilePath
end readFile
-
- Posts: 179
- Joined: Sat Apr 08, 2006 11:08 pm
- Location: London, UK
- Contact: