I use IBM's AS400 Client Access software for work and over the last year or so have figured out how to connect to the session itself. This greatly simplifies sending and getting text as controlsend and clipget functions are not necessary. This will obviously be a little confusing to users who do not currently automate their AS400 tasks, but trust me it's much easier and infinitely more reliable using this method to send/get text. The below code is very rudimentary, I have offered it up so that s