Can urcap send and execute ur script within the program node?

You cannot insert the URScript directly in Java as above.

However check out the Communication interfaces as sending the motion command over e.g. the secondary client interface might create the desired action.