diff --git a/Uptated-Prototype/PiperTTS-GUI-Test.py b/Uptated-Prototype/PiperTTS-GUI-Test.py index 9c570a8..c63fc9b 100644 --- a/Uptated-Prototype/PiperTTS-GUI-Test.py +++ b/Uptated-Prototype/PiperTTS-GUI-Test.py @@ -37,7 +37,7 @@ def PiperTTS_GUI_Play(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Playing?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) C_Button_Pause["state"] == "normal" C_Button_Pause["state"] = "disabled" except: @@ -49,7 +49,7 @@ def PiperTTS_GUI_Pause(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Pause?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) C_Button_Pause["state"] == "disabled" C_Button_Pause["state"] = "normal" except: @@ -61,7 +61,7 @@ def PiperTTS_GUI_Stop(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Stop?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) except: print("An exception occurred - when pressing Stop Button.") @@ -71,7 +71,7 @@ def PiperTTS_GUI_Previous(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Previous?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) except: print("An exception occurred - when pressing Previous Button.") @@ -81,7 +81,7 @@ def PiperTTS_GUI_Next(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Next?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) except: print("An exception occurred - when pressing Next Button.") @@ -91,7 +91,7 @@ def PiperTTS_GUI_Clipboard(): try: PiperTTS_GUI_Hide_All_Labels() My_Label = Label(Root_Window, text="Clipboard?").grid(row=3, column=0, columnspan=5) - labels.append(My_Label) + global labels.append(My_Label) except: print("An exception occurred - when pressing Clipboard Button.") @@ -100,7 +100,7 @@ def PiperTTS_GUI_Clipboard(): def PiperTTS_GUI_Hide_All_Labels(): try: for label in labels: - label.destroy() + global label.destroy() except: print("An exception occurred - when attempting to hide previous messages.")