GUI DragWindow script

Hi,

I'm creating a GUI with a draggable window. The code is in a script called myGUI.

I need to create a button to activate/deactivate the movement of a GameObject, and I was thinking about creating the button calling the OnGUI function on the script applied to the object.

Question: is it possible to create a GUI button on another script and include it on the drag window created on myGUI?

Thanks

Yes, is possible, just create one flag that notifies the other script wheter it has been activated or deactivated. Hope it helps.