Hi I have a program to load slideshow images pickedup from my server
The images add by a number
I use a timer for it So that i everytime get a new image (the images are numers 01.jpg, 02.jpg.
job3.Initialize("Job3", Me)
job3.Download("http://mysitei/" & nummer & ".JPG")
It works fin! But how canI set the nummer to 0 agin if the latest file not exist?
For example 10.JPGis not on my server then the count number must be 0
Also if the if image is not avalable i get a succes!
So what do i wrong?
The images add by a number
I use a timer for it So that i everytime get a new image (the images are numers 01.jpg, 02.jpg.
job3.Initialize("Job3", Me)
job3.Download("http://mysitei/" & nummer & ".JPG")
It works fin! But how canI set the nummer to 0 agin if the latest file not exist?
For example 10.JPGis not on my server then the count number must be 0
Also if the if image is not avalable i get a succes!
B4X:
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1", "Job2"
'print the result to the logs
Log(Job.GetString)
Case "Job3"
'show the downloaded image
Activity.SetBackgroundImage(Job.GetBitmap)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub tijd_Tick
nummer = "0" & (nummer + 1)
Log (nummer)
job3.Initialize("Job3", Me)
job3.Download("http://appie21.com/adri/" & nummer & ".JPG")
End Sub
So what do i wrong?