Oct-04-2022, 10:37 PM
If you want to use after() in the way the OP was going, it has to call itself.
def process(): ## replace for with after ##for i in range(100): if some_condition: ... root.after(milliseconds, process) # playing a midi-file hereOr look at one of the tkinter video players like https://pypi.org/project/tkvideoplayer/ I don't use them so don't know, but this one says it has pause and stop commands.