Integrate getSelectedEntities into script

This commit adds functionality from the new getSelectedEntities function
to automatically populate the connector fields in the Tk widget with the
currently selected connectors.