Scroll Back selection custom button refusing to stop working!

Hi
V5
scroll Back selection custom button refusing to stop working !
it says press esc to cese but that doesnt stop it !
nothing will, except an end task ctrl alt del, lost an hrs work yesterday and 30 mins today
as forgot it was that buttonto avoid !
How can I show you whats in ita cosing, right click I thought would show an edit code or something.
It was by Mitch.
I have found a text file on my PC

Mitch script to scroll back through created objects.
for V5

right mouse click or spacebar to scroll through, esc to stop.
last object selected stays selected.

import rhinoscriptsyntax as rs
import scriptcontext as sc

def ScrollBackInTime():
objs=rs.NormalObjects()
if objs:
for i in range(len(objs)):
rs.UnselectAllObjects()
rs.SelectObject(objs[i])
msg=“Object #{} selected.”.format(i+1)
check=rs.GetString(msg+" Press enter to continue, Esc to stop")
if sc.escape_test(False):
break
print “Oldest object reached, exiting function”
ScrollBackInTime()

obviously V5 dislikes it ! or you could say likes it :upside_down_face:as it wont stop, esc simply goes backwards in time shows the preceding next created object !

Steve