Save pose when button pressed

Hi, I’m trying to develop a URcap, I have to move the robot and when a digital input is 1 (there is where i got the button connected), then the pose is saved, and I have to save all those poses for a period of time. I have tried with the ScriptCommunicator (GitHub - BomMadsen/URCap-ScriptCommunicator: Exemplification of how to communicate with URControl from a URCap) but it doesn’t let me read the variable where I save the poses. Basically what would help me to solve this is, how to save a variable (in this case an array of poses) during a script sent with ScriptSender and be able to read it later with ScriptExporter.

Thank you very much in advance :slight_smile: