D DGAP New Member Mar 10, 2014 #1 hello guys I need to do the following: read the file http blablabla.txt (the file has 3 lines only) B4X: 0 1.0.0.0 http://... and use as follows: B4X: state = line 1 version = line 2 link = line 3 but do not know how to do: ( I've seen several examples here in the forum but can not apply to what I want...
hello guys I need to do the following: read the file http blablabla.txt (the file has 3 lines only) B4X: 0 1.0.0.0 http://... and use as follows: B4X: state = line 1 version = line 2 link = line 3 but do not know how to do: ( I've seen several examples here in the forum but can not apply to what I want...
Erel B4X founder Staff member Licensed User Longtime User Mar 10, 2014 #2 B4X: Dim lines As List = File.ReadList(...) state = lines.Get(0) version = lines.Get(1) link = lines.Get(2) Upvote 0
B4X: Dim lines As List = File.ReadList(...) state = lines.Get(0) version = lines.Get(1) link = lines.Get(2)
D DGAP New Member Mar 10, 2014 #3 Erel said: B4X: Dim lines As List = File.ReadList(...) state = lines.Get(0) version = lines.Get(1) link = lines.Get(2) Click to expand... Dim lines AsList = File.ReadList("http://...") but it gives error p.s. I have all active library Last edited: Mar 10, 2014 Upvote 0
Erel said: B4X: Dim lines As List = File.ReadList(...) state = lines.Get(0) version = lines.Get(1) link = lines.Get(2) Click to expand... Dim lines AsList = File.ReadList("http://...") but it gives error p.s. I have all active library
Erel B4X founder Staff member Licensed User Longtime User Mar 10, 2014 #4 This is a bit more complicated. You need to use HttpUtils2 to first download the file. Then in JobDone you will need to do something like: B4X: Dim tr As TextReader tr.Initialize(Job.GetInputStream) Dim lines As List = tr.ReadList tr.Close Upvote 0
This is a bit more complicated. You need to use HttpUtils2 to first download the file. Then in JobDone you will need to do something like: B4X: Dim tr As TextReader tr.Initialize(Job.GetInputStream) Dim lines As List = tr.ReadList tr.Close
D DGAP New Member Mar 10, 2014 #5 Erel said: This is a bit more complicated. You need to use HttpUtils2 to first download the file. Then in JobDone you will need to do something like: B4X: Dim tr As TextReader tr.Initialize(Job.GetInputStream) Dim lines As List = tr.ReadList tr.Close Click to expand... Can you give me an example? thx Upvote 0
Erel said: This is a bit more complicated. You need to use HttpUtils2 to first download the file. Then in JobDone you will need to do something like: B4X: Dim tr As TextReader tr.Initialize(Job.GetInputStream) Dim lines As List = tr.ReadList tr.Close Click to expand... Can you give me an example? thx
Erel B4X founder Staff member Licensed User Longtime User Mar 10, 2014 #6 See HttpUtils2 tutorial. http://www.b4x.com/search?query=HttpUtils2 Upvote 0