Stock Indexes

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Stock Indexes

Post by mwieder » Sat Aug 18, 2012 3:23 am

You have to examine the returned data (either look at the page source with a web browser or set a breakpoint after retrieving data into myRetrieve) to figure out the format. The string just before the percentage is
id="yfs_p20_^dji">
,

so to get it you'd want

Code: Select all

if matchtext(myRetrieve, "(?i)yfs_p20_.*" & char 2 to -1 of tStocks & quote & ">([()%0-9,.]+)" , tPercentage) then
    answer "found:" & tPercentage
end if
My guess is that "yfs" is "Yahoo Financial Services".

Post Reply