title: How to make Rscript stay open until gWidgets gui is closed
body: <p>I have a script which launches various <code>gWidgets</code> windows with buttons that have functions attached.  I'd like to be able to launch this with rscript.exe so others can use it without seeing R.  My problem is that when I launch the script using <code>rscript.exe myscript.r</code> an rscript instance shows up in task manager, it loads all the packages, the widget pops up for a second, and then it's gone (including the rscript process from task manager) before the user can even do anything.  How can I make the instance of <code>rscript</code> stay active until all the <code>gWidgets</code> windows are closed?  If I launch the script from either Rstudio or Rgui it stays open until done.  As a similar question, is there also a way to prevent the dialog box showing the various commands from coming up too?  I'm using Windows 7 by the way.</p>