Sign in to follow this  
Followers 0
capsandiego

Send Command fails when the server is locked via MSTCS

4 posts in this topic

Hi All,

I have a very strange problem. If I run the simple PHP script on the server while I'm logged in via MSTSC (Desktop Remote) it works. But if I log out (always via MSTCS) and schedule the script to run, the Send() command fails and nothing is written to the Notepad page.

I tried several times and it's related to the Send() command only. Does the MSTCS program lock AutoIt somehow? Is there something I have to configure on my XP server?

Thanks in advance, best Regards.

$autoIt = new COM('AutoItX3.Control');

$autoIt->Run('notepad.exe');

$autoIt->WinActivate("Untitled","");

$autoIt->Send("Hello World!","Untitled");

Share this post


Link to post
Share on other sites



There is no actual screen session to send keystrokes to when you schedule the script.

Used ControlSend() as that should work.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

There is no actual screen session to send keystrokes to when you schedule the script.

Used ControlSend() as that should work.

Jos

Hi Jos,

Thanks very much... this is something I didn't think of... and it has a big impact on the script... I need to replace all Send() with ControlSend() so I'm forced to specify the Control ID/NN for all the input fields I want to populate.... since there is no other way to do it I'll do...

Thanks again

Regards

Sergio

Share this post


Link to post
Share on other sites

There is no actual screen session to send keystrokes to when you schedule the script.

Used ControlSend() as that should work.

Jos

Hi Jos, the function WinWaitActive() is also affected by the schedule? It seems it doesn't work...

Thanks in advance

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