Sub Globals
Dim SiteNoIp As String
Dim job2 As HttpJob
Dim lb As Label
Dim ButtonTest As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
SiteNoIp = "http://nomesito.no-ip.com/"
Activity.Title = "How to run scripts .py and .sh"
Activity.Color = Colors.White
ButtonTest.Initialize ("ButtonTest")
Activity.AddView (ButtonTest,5dip,20dip,140dip, 60dip)
ButtonTest.text = "TEST"
lb.Initialize ("Lb")
Activity.AddView (lb,5dip,120dip,200dip,100dip)
lb.Text = "......."
lb.TextColor = Colors.Black : lb.color = Colors.white
End Sub
Sub ButtonTest_click
job2.Initialize("Job2", Me)
job2.PostString(SiteNoIp & "print2.php", "p1=first value&p2=value2")
job2.PostString(SiteNoIp & "testwrite.php", "")
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job2"
Log(Job.GetString)
lb.Text = Job.GetString
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub