Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Timer And EventTimer() = 123
Buffer = ReceiveHTTPMemory(url)
If buffer
string=Str(PeekC(Buffer))
EndIf
URL = SetURLPart(URL, "pin", "leer")
EndIf
Select Event
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #vor
URL = SetURLPart(URL, "pin", "vor")
EndIf
If EventGadget = #zur
URL = SetURLPart(URL, "pin", "zur")
EndIf
If EventGadget = #links
URL = SetURLPart(URL, "pin", "links")
EndIf
If EventGadget = #hlinks
URL = SetURLPart(URL, "pin", "hlinks")
EndIf
If EventGadget = #rechts
URL = SetURLPart(URL, "pin", "rechts")
EndIf
If EventGadget = #hrechts
URL = SetURLPart(URL, "pin", "hrechts")
EndIf
If EventGadget = #mitte
URL = SetURLPart(URL, "pin", "mitte")
EndIf
If EventGadget = #v0
URL = SetURLPart(URL, "pin", "v0")
EndIf
If EventGadget = #v1
URL = SetURLPart(URL, "pin", "v1")
EndIf
If EventGadget = #v2
URL = SetURLPart(URL, "pin", "v2")
EndIf
If EventGadget = #servo0
URL = SetURLPart(URL, "pin", "ser0")
EndIf
If EventGadget = #servo1
URL = SetURLPart(URL, "pin", "ser1")
TEST=1
winkel=0
wd=2
EndIf
If EventGadget = #sharp
URL = SetURLPart(URL, "pin", "sharp")
TEST=2
winkel=0
wd=1.8
EndIf
If EventGadget = #ton
URL = SetURLPart(URL, "pin", "ton")
EndIf
If EventGadget = #cls
text_e=""
SetGadgetText(#Editor_0, text_e)
wTEST=3
EndIf
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
CloseWindow(#Window_0)
Break
EndIf
EndSelect
ForEver