Code: Select all
on mouseUp
local tBrowserId
put "http://finance.yahoo.com/q?s=AAPL" into tURL
put revBrowserOpen(the windowId of this stack, tURL) into tBrowserId
revBrowserSet tBrowserId, "rect", "10,50,500,500"
if tBrowserId is not an integer then
answer "Failed to open browser"
exit mouseup
end if
wait 10 seconds
put revBrowserGet(tBrowserId, "htmltext") into tString
put offset("Last Trade:",tString) into tStart
If tStart > 0 then
put char tStart to tStart + 250 of tString into tResult
put offset("<span",tResult) into tStart
put char tStart+7 to -1 of tResult into tResult
put offset("</span>",tResult) into tStart
put char 1 to tStart-1 of tResult into tResult
replace ">" with space in tResult
put last word of tResult into tResult
answer tResult
else
answer warning "Error connecting to Yahoo Quote."
end if
revBrowserClose tBrowserID
end mouseUp
Regards,
Larry