Run program created in Polyscope from script

We have a UR5e witch is set up now by running “programs” that have coordinates programmed in the hard code. This is a PITA to modify easily, and wondering if its possible to easy run a program that has been created on the teach pendant from a script, making it a function or something that can call the correct program from PolyScope itself. Its running from a JavaScript config file, with all the coordinates on each operation, over network.