Jump to content
Sign in to follow this  

Inactive window

Recommended Posts



I'm new to all this but have been experimenting.

I'm trying to control an application that runs via a citrix logon. I can start citrix within an IE window and send the logon credentials and even send the url to launch the application. However, its here that I get stuck.

I know the script works fine when I'm logged on to the server but when I schedule the script and it runs under the console session I can't activate the application window.

I've tried the following snippets all to no avail:

$var = WinList()

For $i = 1 to $var[0][0]

If $var[$i][0] = $iPharmString[$Session] Then

$WinHandle= $var[$i][1]





While Not (WinExists($iPharmString[$Session],""))

MsgBox(1,"Does Not Exist","Window, " & $iPharmString[$Session] & " does not exists",600)


WinSetState($iPharmString[$Session], "", @SW_ENABLE)

WinSetState($iPharmString[$Session], "", @SW_MAXIMIZE)

While Not (WinActive($iPharmString[$Session],""))


MsgBox(1,"Not Active","$iPharmString[$Session] is not active:" & $iPharmString[$Session],60)


All I get is ,"Not Active"!

Any suggestions?

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.