\unexpanded\def\uncover[#1]%
{\ctxlua{
distance = simplesteps.distance_to_step(\!!bs#1\!!es)
...
}}
it works because the " is now only part of the string.
Thanks. That's what I needed. I guess
bs = begin string
es = end string.
Cheers,
André Caldas.