Jump to content
Sign in to follow this  
Traciatim

Remote Desktop

Recommended Posts

I've been using a timed winbatch script for some time to update a peice of software on a couple thousand remote machines. It's very touchy and needs to be watched very closeley or it will fail.

I was wondering if AutoIt has the ability to get information from a DOS window on a remote machine that I am connected to through a remote desktop connection. WinBatch does not which is why I just have to time everything.

Thanks,

Traciatim

Share this post


Link to post
Share on other sites

Can you please post what kind of info you need from the remote machine. If you are lucky you dont even need to use the remote desktop.


Were ever i lay my script is my home...

Share this post


Link to post
Share on other sites

I've been using a timed winbatch script for some time to update a peice of software on a couple thousand remote machines. It's very touchy and needs to be watched very closeley or it will fail.

I was wondering if AutoIt  has the ability to get information from a DOS window on a remote machine that I am connected to through a remote desktop connection. WinBatch does not which is why I just have to time everything.

Thanks,

Traciatim

<{POST_SNAPBACK}>

You could try using a screen scrape. Bascially putting the entire contents of the dos box into the clipboard, and then use AutoIt to manipulate it from there, wait for text, etc... I use screen scrapes a LOT in my job working with AS400 emulators...very similar in most respects to the cmd box.

Just scrape the box every 250 ms or so. Usually a right click on the cmd window's taks bar and a select all-copy is enough for the scrape.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

You could use something like the following inside a do-until or while-while loop:

Opt("WinTitleMatchMode", 2);substring
$title = @ComSpec;adjust as needed if title is more specific...
Run(@Comspec)

WinActivate($title)
WinWaitActive($title)
Send("!{Space}es{Enter}")
MsgBox(4096,"Copied to clipboard", ClipGet())

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Doxie, Trust me, I need to connect to the remote desktop session. For security and logging purposes I must first connect to a remote desktop server which launches a custom little GUI menu which I input an IP and select the type of connection needed then connect to the remote machine that I actually want to connect to, this single point of entry is the only way through to get inside the network I am working on.

The problem I've had with WinBatch was that it can't figure out which window is active inside the remote desktop session as well as can't collect info straight from the DOS window (SSH with Kermit 95) so that I know if things (Like an FTP Transfer, or update of a file) are successful or not.

Cyberslug, thanks for the great tip on 'screen scraping'. I would never have thought of using select all and analyzing the clip board instead.

Is the language of Auto-It similar to WinBatch? It sure looks like it and my 21 day trial of WinBatch is almost up and now I've stumbled on AutoIt.

Traciatim

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...