Sign in to follow this  
Followers 0
will never learn

Problem with WinActive on Server

2 posts in this topic

#1 ·  Posted (edited)

Hello everybody,

I have built a script that is supposed to run on a server every night. It works fine if I start it manually and if I sit in front of the server. However, when I have the User Session blocked (CTRL+ALT+DEL, block session), the script does not recognise the open window.

This is my code:

Run('C:\proALPHA\dlc\bin\prowin32.exe')
WinWait("Production Anmeldung in proALPHA","")
If Not WinActive("Production Anmeldung in proALPHA","") Then WinActivate("Production Anmeldung in proALPHA","")
WinWaitActive("Production Anmeldung in proALPHA","")
Sleep(2000)
ControlSetText("Production Anmeldung in proALPHA","",15,"sometext")

When I open the server session the next morning and activate the above mentioned window, by clicking on it, the script runs on like a charm. Just like when I start it manually at the active screen.

It seems to me like the "WinActivate" command does not work in this setting.

Does anyone have experience here and can can help me out??

Thank you very much.

Christoph

Edited by will never learn

Share this post


Link to post
Share on other sites



I just re-read the header and the real problem of course is probably with the WinActivate and not with WinActive. Anyhow : Problem still there >_

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