I create a tkinter window ('window3' as shown) by a button trigger. I want have a function that takes data from 'KonuIcerik' ScrolledText on 'window3' then sends it to function 'def Finish():'
I know my problem is about using functions but i couldnt fix it. I need a little help
Error: "KonuIcerik" is not defined
def KonuOlusturButtonu():
window3= Toplevel(root)
window3.geometry(f'{root_width}x{root_height}+{center_x}+{center_y}')
window3.title("Konu Oluştur")
window3.resizable(False, False)
window3.configure(background='#0a0a0a')
# Create ScrolledText widget
KonuIcerik = ScrolledText(window3, width=96, height=30)
KonuIcerik.place(relx=0.5, rely=0.55, anchor=CENTER)
# Create Button widget
button_konubitir = Button(window3, text ="Bitir ve Yayınla", command = Finish())
button_konubitir.config( height = 2, width = 30 )
button_konubitir.place(relx=0.5, rely=0.92, anchor=CENTER)
def Finish():
KonuIcerikText = KonuIcerik.get()
print(KonuIcerikText);