so, what part is failing?
I ran the second script with 4.12 and 4.20 beta

no problems what so ever.
anyway, as you have the looping there, it makes the setfocus cry and runs cpu usage to 100%

when took of that "looping" line, it ran just fine.
_________________________
!

download KiXnet