This only print()s the track-names when the script is started from Window > Scripting. The dialog window remains unchanged.