Jump to content

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?

Link to comment
Share on other sites

  • 4 weeks later...

Did you even try? :)

Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
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")
MouseMove(583,404)
MouseDown("left")
MouseUp("left")
Send("{ENTER}")

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... :)

SIGNATURE_0X800007D NOT FOUND

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...