$t is a reference to an element on the window. You would use it if you wanted to delete the scroll box from the window. It is not a reference to the contents of the element. You need to add -textvariable -> $windowcontents to the definition statement for the scrolled window so you have access to the contents of that window. (maybe -variable.. ) Then you can stuff the results of the expect process into that variable so it can be seen on the window.