PDA

View Full Version : ServerTagInfo[] details/ 2nd question... Closing a dialog on ENTER in python



jeric_synergy
09-28-2015, 02:03 PM
I'm attempting to use noisy_channel.py as a launch pad for my own script, as it seems to be the sole Python Channel Modifier example.

Just for starters EDIT: nvr mind: answered my own question-- jfyi, GE needs to close/reopen to update the channel modifier dropdown.

2nd question:

noisy_channel.py has a dialog for 4 parameters, but hitting either ENTER does not dismiss the dialog.

How does one get a python dialog to automatically close if the user hits ENTER rather than TAB?

Thanks!

ernpchan
09-28-2015, 02:26 PM
You might be able to do it by capturing the keyboard input which would in turn call the close panel command.

You can close the panel by hitting 'OK' or 'Cancel'.

jeric_synergy
09-28-2015, 02:30 PM
You might be able to do it by capturing the keyboard input which would in turn call the close panel command.

You can close the panel by hitting 'OK' or 'Cancel'.
(the last) Well, of course, but I think that's terrible UI: keeping the hands on the keyboard is so much faster, esp. the numpad.

Thanks for the workaround-- I'm a bit surprised the ENTER isn't a built-in function.