Hi,
trying to learn "wait for" in a non ui app. I get the error "Program terminated (StartMessageLoop was not called)." Here is my code.
trying to learn "wait for" in a non ui app. I get the error "Program terminated (StartMessageLoop was not called)." Here is my code.
Non ui app:
Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
Wait For (getUrl) Complete (Result As Boolean)
Log("Hello world!!!")
StartMessageLoop
End Sub
Sub getUrl() As ResumableSub
Dim client As HttpJob
client.Initialize("",Me)
client.Download("https://www.google.com")
Wait For (client) JobDone (res As HttpJob)
If res.Success=False Then
Log("error")
Return False
End If
Dim CookieContainer As String = res.Response.GetHeaders.Get("set-cookie")
Log(CookieContainer)
Return True
End Sub