Okay habe ich auch sofort geändert in threading, ja und sonst weiß ich nicht so genau was du meinst ich kann mal ebend den code von einem thread hier zeigen, im prinzip sind die anderen auch so aufgebaut nur mit anderen Variablen:
Code: Alles auswählen
def funkrtw1():
global verfrtw1
global crtw1
global statrtw1
global freigabe
global einsatz
loop = 1
while loop == 1:
if verfrtw1 == 0:
c = random.randint(10,50)
time.sleep(c)
statrtw1 += 3
meld.insert("end",time.strftime('%H:%M:%S') + ">>RTW-1 Status 3")
crtw1.config(text = "3", bg = "red")
loop -= 1
while einsatz == 1:
if freigabe == 1:
meld.insert("end",time.strftime('%H:%M:%S') + ">>RTW-1 Status 4")
crtw1.config(text = "4", bg = "blue")
time.sleep(c)
meld.insert("end",time.strftime('%H:%M:%S') + ">>RTW-1 Status 1")
crtw1.config(text = "1", bg = "green")
verfrtw1 += 1
loop += 1