Jump to content
Sign in to follow this  

issuing an enter key through mstsc.exe

Recommended Posts


I'm trying to come up with a script that will send an enter keystroke through a logged in mstsc.exe (remote desktop) session to a TSO instance on a mainframe. This will basically keep the TSO session logged in. Is there a way I can do this with autoit installed on my home computer?

Share this post

Link to post
Share on other sites

Did you even try? :)

WinWait("xxx.xx.xxx.xx - Remote Desktop Connection","xxx.xx.xxx.xx - Remo")
If Not WinActive("xxx.xx.xxx.xx - Remote Desktop Connection","xxx.xx.xxx.xx - Remo") Then WinActivate("xxx.xx.xxx.xx - Remote Desktop Connection","xxx.xx.xxx.xx - Remo")
WinWaitActive("xxx.xx.xxx.xx - Remote Desktop Connection","xxx.xx.xxx.xx - Remo")

I simply opened RemoteDesktop connected to one of my servers, and used Au3 recorder... Yes, there are better ways... but here is a quick and dirty snippet to get you started... :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this