Change Unwrap UVW Grid via hotkey / script

So I want to be able to have a script so I can change my grid settings in the unwrap window without having to go into the actual options like I can with my main viewport grid but I see no way of this being exposed.

Any thoughts? Ideas?