« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Full Range of Web Access Support
Display a Progress Bar
Download data from websites and display progress indicators.
In[1]:=
X
urls = {"http://google.com", "http://exampledata.wolfram.com/5mb.dat", "http://exampledata.wolfram.com/10mb.dat"}; progressBars[_] := 0.; progFunction[asyncObj_, "progress", {dlnow_, dltotal_, _, _}] := Quiet[progressBars[asyncObj] = dlnow/dltotal]
In[2]:=
X
asyncObjs = URLFetchAsynchronous[#, progFunction, "Progress" -> True] & /@ urls;
In[3]:=
X
Dynamic[Grid[{Style[First[#], FontFamily -> "SansSerif"], ProgressIndicator[progressBars[#]]} & /@ asyncObjs, Alignment -> Left]]
Out[3]=