我点击按钮,但进度条没有移动。批处理文件可以很好地工作。
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from subprocess import call
def runBat():
p.start()
call ("mp3.bat")
root = Tk()
photobutton3 = PhotoImage(file="smile.png")
button3 = Button(root, image=photobutton3, command=runBat)
button3.grid()
p = ttk.Progressbar(root, orient=HORIZONTAL, length=200, mode='indeterminate')
p.grid()
root.mainloop()