You'd need to send them through a commandToClient, exactly how you code it would depend on what you're doing with it.
If you have a large amount of variables that change values often, and having a delay between opening the GUI and getting a proper value is not an issue, have the bind to open the GUI also call a commandToServer, and have the serverCmd call a commandtoclient, and the clientCmd sets the values in the GUI.
If you have a small amount of variables, or a larger amount that doesn't change values often, and a delay is an issue, you could call a commandToClient every time the value of the variable changes, and the clientCmd would immediately change the value, even while the GUI is open.