From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jan 23 2019 - 23:45:27 CST

I'd suggest using one of the basic Tcl/Tk GUI tutorials and
then progressing from there:
  http://www.tcl.tk/doc/

Best,
  John

On Mon, Jan 21, 2019 at 01:05:45AM +0000, Patrick Charchar wrote:
> Hi John,
>
> Thanks for the info and reply!
>
> I think a GUI would be a great addition to my script. Since I'm not familiar with writing a Tk GUI, can you point me to some links/tutorials to get me started?
>
> Best wishes,
> Patrick
>
> -----Original Message-----
> From: John Stone <johns_at_ks.uiuc.edu>
> Sent: Saturday, 19 January 2019 9:44 AM
> To: Patrick Charchar <patrick.charchar_at_rmit.edu.au>
> Cc: vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: Pause script, make display interactive, then resume script after user input
>
> Hi,
> There isn't a convenient way of waiting for console input without blocking the VMD Tcl interpreter due to the way console handling works. That being said, it is _easy_ to do this within a Tk GUI, and Tk GUIs are simple to write. So, since your goal is to do some simple user interaction, I would suggest writing a tiny little Tk GUI for it.
>
> Tk is event-driven, so when you interact with the window, it triggers actions that call Tcl procs, and you can make them as simple or as complex as you like. This is how the VMD plugin GUI interfaces are all written.
>
> Best,
> John Stone
> vmd_at_ks.uiuc.edu
>
>
> On Thu, Jan 17, 2019 at 01:59:54AM +0000, Patrick Charchar wrote:
> > Hello,
> >
> >
> >
> > The below tcl code updates the display and prompts for user input before
> > proceeding, but the display is unresponsive to the mouse.
> >
> >
> >
> > display resetview ; display update
> >
> > puts "\nLook at screen and pick which direction (1, 2, 3): "
> >
> > gets stdin direct
> >
> >
> >
> > Is there a way to make the display interactive prior to the input?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Patrick
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> https://apac01.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.ks.uiuc.edu%2F~johns%2F&amp;data=02%7C01%7C%7C94fe1cfb5e8c40ca1f6608d67d98b704%7Cd1323671cdbe4417b4d4bdb24b51316b%7C0%7C0%7C636834492238928292&amp;sdata=5mv6aCzYKHm7lEHp6ltYRfyHsBf03XE1QJOp7FAyUZc%3D&amp;reserved=0 Phone: 217-244-3349
> https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ks.uiuc.edu%2FResearch%2Fvmd%2F&amp;data=02%7C01%7C%7C94fe1cfb5e8c40ca1f6608d67d98b704%7Cd1323671cdbe4417b4d4bdb24b51316b%7C0%7C0%7C636834492238928292&amp;sdata=UsBq11nUSrhCSa05stoIcGmtqkIW%2BonZ3jhouGX4V10%3D&amp;reserved=0
>

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/