Sign in to follow this  
Followers 0
puneet

Remote Execution problems

5 posts in this topic

I have a simple script which works fine on the local machine.

When i try to execute the same script without the remote connection using *STAF* (a QA tool) the script starts but the send() calls just hangs. I am just opening a word document and sending some text. I want to create some cpu load and ideally connect a remote display (Windows RDP client) to this machine to simulate a data entry office worker.

Any ideas ?

I do something like this :

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

run("C:\Program Files\Microsoft Office\OFFICE11\winword.exe")

AutoItSetOption("WinTitleMatchMode",2) ; match any substring

WinWaitActive("Microsoft Word") ; wait till we get the string on the window

send("!{space}")

sleep(1000)

send("x") ; move to fullscreen mode

sleep (2000)

dim $word_text = "Random Junk goes here ! "

Opt("SendKeyDelay", 25) ; delay between keystrokes is 25 msec.

send (" Windows Terminal Server {enter} ")

Sleep(2000)

for $i=1 to 10

send ($word_text)

next

send("!f s")

send("MSWordDoc")

send("{enter}")

WinWaitActive("Microsoft Office Word")

send("{enter}")

sleep(1000)

send("!f c")

sleep(2000)

send("!f x")

Share this post


Link to post
Share on other sites



Also is there a way to start a RDP connection to a remote machine and start applications inside the RDP client.

I think AutoIT can not detect the windows inside the remote connection.

Share this post


Link to post
Share on other sites

Guys,

Any ideas here.

The problem is that if the remote display is not active the script doesn't work.

Since i have to start the script concurrently on 10 different machines to create load on a server i can not have all the remote displays active. The script works fine when the window is active. But when i remote execute the script it starts fine but fails to complete. The send() text calls just hang.

Any ideas ?

Share this post


Link to post
Share on other sites

Guys,

Any ideas here.

The problem is that if the remote display is not active the script doesn't work.

Since i have to start the script concurrently on 10 different machines to create load on a server i can not have all the remote displays active. The script works fine when the window is active. But when i remote execute the script it starts fine but fails to complete. The send() text calls just hang.

Any ideas ?

Unless the console is open the script will not run, you can change to Autologon in remote PC, then your scripts will run.

Share this post


Link to post
Share on other sites

Unless the console is open the script will not run, you can change to Autologon in remote PC, then your scripts will run.

I have the similar problem , but the it has nothing to do with autologon, e.g., create a script with winWait(), and other GUI operation script, and run script locally on remote PC, if the remote PC is on focus, the script will work very well, and if not , the script will mess up.

Run the script locally on remotePC does not involve any login issues but it work only when the remote machine window is on focus.

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  
Followers 0