Hi Erel,
I've been studying it and... yes, it's much more easy. Here my (your) modified code for anyone who could need it.
Now, it's time to learn DBUtils
Thanks Erel.
Best regards!
Sub Process_Globals
Dim Job2Links As List
Dim text As String
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("mylayout.bal")
End Sub
Sub Activity_Resume
'Check whether a job has finished while the activity was paused.
If HttpUtils.Complete = True Then JobDone(HttpUtils.Job)
End Sub
Sub UrlDone(Url As String)
Log(Url & " done")
End Sub
Sub JobDone (Job As String)
For i = 0 To HttpUtils.Tasks.Size - 1
link = HttpUtils.Tasks.Get(i)
If HttpUtils.IsSuccess(link) Then
text=text & HttpUtils.GetString(link)
End If
Next
File.WriteString(File.DirRootExternal,"fullarchive.txt",texto) HttpUtils.Complete = False 'Turn off the complete flag so we won't handle it again if the activity is resumed.
Msgbox("Download finished!!","")
End Sub
Sub Button1_Click
text=""
HttpUtils.CallbackActivity = "Main"
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.CallbackUrlDoneSub = "UrlDone"
Job2Links.Initialize
Job2Links.AddAll(Array As String("http://your www.","https://your
https://www. (yes! even https works!!)")
HttpUtils.DownloadList("Job2", Job2Links)
End Sub