0

Hello Stackoverflow Community,

In my previous thread i had problems with the loop which the community solved.

Link : How can i end the Loop and move on with the Code?

Now i got another Problem. My Programm executes until the Shutdown including the Shutdown and then dont Press any keys.

In my opinion does my program crash because it cant get the Values of the Input am i right?

Code:

import os #Für Shutdown
import time #Für Access auf Zeit
import pyautogui #Zugang zu Keyboard & Mouse Funktionen

repeat = True


while repeat is True:

    Zeit = int(input("Gebe eine Sekundenzahl ein bis man Essen & Trinken soll: "))
    if Zeit > 3200:
        print("Deine Taschen werden überfüllt sein, wähle weniger Sekunden");
        continue
    else:
        while repeat is True:   
                Trinken = int(input("In welcher Tasche hast du dein Trinken: "))
                if Trinken > 6:
                    print("Es gibt keinen Slot nach 6")
                    continue
                else:
                    Essen = int(input("In welcher Tasche hast du dein Essen: "));
                    if Essen > 6:
                        print("Es gibt keinen Slot nach 6")
                        continue
                    else:
                        repeat = False
                        continue

os.system("shutdown /s /t 19200");

while repeat is False:
    time.sleep (7); # Zeit um IC zu gehen
    pyautogui.press(Trinken)
    time.sleep(7) # Zeitfenster für Trinkvorgang
    pyautogui.press(Essen) 


    time.sleep(Zeit) #Zeit zwischen den jeweiligen Ess und Trinkvorgängen
    pyautogui.press(Trinken)
    time.sleep(7) # Zeitfenster für Trinkvorgang
    pyautogui.press(Essen) 
IIIIII
  • 3
  • 3

0 Answers0