Jump to content

Remote desktop with autoit problem...


vega7
 Share

Recommended Posts

I understand that autoit cannot properly run under remote desktop when logged out because no mouse control exists. I have checked the forums and the only solution to this is to use realvnc. I have done this, however, when I log out of the session and when the script launches it still doesn't execute properly. I log back into the session and see that it started to launch however it has not completed and froze. It is not dependable at all, unless I actually keep the remote session running.

Is there a way that I can have the autoit script running properly without freezing? I dont mind using realvnc as a partial solution. However, I would rather use remote desktop. The script automates a java based webpage client, so there are not automatable controls except just mouse coordinate clicking, etc... This is fine, the script works well and with no problems when I am logged in. However, I cannot always have the session logged in. I want to be able to log out and have it work in the already running session without constantly being logged in remotely.

Any help would be appreciated.

thanks in advance.

Edited by vega7
Link to comment
Share on other sites

I don't think that can be done without the computer it's running on is logged in and running. Well mouse clicking is not good at all when you are running it from a remote computer.. I know its a longshot, but is Tab, Ctrl + Tab and Ctrl + Shift + Tab a solution??

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

You may want to try launching the script using a runas with another account. it might stay working after you log off, just a guess.

Another option could be psexec.exe you can get it and it's options from Microsofts web site. I use it to launch scripts remotely but you may also be able to launch it locally on the pc you are remoted into and specify creds for it to run under.

Link to comment
Share on other sites

I've used AutoIt on remote system to which I don't currently have an active session. What did it for me was not using "Active" commands, such as WinWaitActive. With no active session, you can't have an active window. Just use WinWait instead.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Thanks for the suggestions. The control-tab options will not be good enough because the java applet that is running cannot be navigated with controls. It seems the only way to automate a java applet(running in internet explorer) is to use mouse coordinate clicking. Otherwise, that would probably be a good solution for regular apps (you can 'press' controls without resorting to actual mouse clicks).

I will also look into what MikeOSdx suggested with psexec and running script as another account.

I will try rewriting script without 'active' commands as lod3n suggested.

I think the main problem is that the java applet that I am automating cannot accept control other than with 'real' mouse clicks. By the way, what I am doing is making an automating script for Oanda's java client for automatic trading. It is working only if I am logged in remotely with session active. When I exit, still leaving session running on remote server, it freezes as there seems to be no 'real' mouse clicking.

I'll try what was suggested and do some more research, but I think I cannot get around that mouse clicking problem. I would rather do it without mouse clicks. Is it at all possible to automate Java applets with autoit without mouse coord click automation? I used 'autoit window info' tool and it does not 'see' any of the applet controls.

Link to comment
Share on other sites

I've tried the suggestions you guys told me, but unfortunately, they didnt help with my exact needs. I cannot subsitute the 'active' functions for others. The problem with this is that the java applet window is minimized normally and is not the 'active' window. The window must be active (foreground)in order for the mouse to click buttons on it. I wish there was a way of using controlIDs for java applets? If I could get rid of all the 'mouse clicks' then that would be 1 way to solve this problem. I could then use controlIDs and it wouldnt matter if window was active. So, in short, is there any way to uniquely press Java applet buttons and fields with Autoit without using mouse coord?

I looked into 'psexec' tool, but this wont suit my needs because I dont want to connect remotely to initiate script. The autoIT script must run without me logged in when it needs to. I dont think 'runas' will do anything either in my case. The script does run (although freezes because it cannot 'click mouse'). This isnt anything with permissions.

The RealVNC solution was closest to working, but there are some weird freezing probs as well.

Any more suggestions?

Thanks in advance.

Link to comment
Share on other sites

I cannot subsitute the 'active' functions for others. The problem with this is that the java applet window is minimized normally and is not the 'active' window. The window must be active (foreground)in order for the mouse to click buttons on it.

java apps, by definition, have their own runtime environment. It is essentially a black box to the operating system. Can you not simulate an alt-tab to switch to the desired window?

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

Flyingboz is correct. If you can't do it with ControlSend only (just send keystrokes to the control) you can't do it with AutoIt.

Have you taken a look at Watij?

http://watij.com/

It's a Unit Tester for Java apps run from within web pages. Which sounds a lot like what you're trying to do. And it's free.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Actually, reading my own link a bit more, it seems that it may just be an automation harnes for IE, WRITTEN in java, so that doesn't exactly help you. But take a look at this list:

http://www.junit.org/news/extension/web/index.htm

There are some more unit testers there that look like they are for testing Java. I think you're about to learn a lot more about Java than you ever wanted to. :)

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

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