Sign in to follow this  
Followers 0
SiteMaze

Winactivate for remote applications

6 posts in this topic

Hello all,

I have a simple code

if WinWait("JMP","",5) == 0 then exit
        WinActivate("JMP")
        WinWaitActive("JMP","",5)

Above code works with any other desktop applications.

But in our company, we run the JMP application from a central server remotely, through Citrix MetaFrame Presentation Server Client for 32-bit Windows.

The window title on the taskbar shows "JMP -- /remote".

AU3info shows the same title.

But it doesn't seem to activate the window.

Any ideas????

post-20362-1171874517_thumb.gif

post-20362-1171874524_thumb.gif

Share this post


Link to post
Share on other sites



Hello all,

I have a simple code

if WinWait("JMP","",5) == 0 then exit
        WinActivate("JMP")
        WinWaitActive("JMP","",5)

Above code works with any other desktop applications.

But in our company, we run the JMP application from a central server remotely, through Citrix MetaFrame Presentation Server Client for 32-bit Windows.

The window title on the taskbar shows "JMP -- /remote".

AU3info shows the same title.

But it doesn't seem to activate the window.

Any ideas????

I believe it actually has to do with it coming through citrix. I noticed in the AutoIt info box it said Transparent window. Citrix is simliar to terminal services and if you are running the ica desktop client it might not recognize the window since its a published app. If you use the browser version of Citrix it would only activate the main window you are running the session through which would be the title of your Internet browser window. Hope that helps but I'm sure it has to do at how it see the Citrix window.

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

; Might help?

Opt("WinSearchChildren", 1)

Opt("WinDetectHiddenText", 1)

#cs

WinDetectHiddenText Specifies if hidden window text can be "seen" by the window matching functions.

0 = Do not detect hidden text (default)

1 = Detect hidden text

WinSearchChildren Allows the window search routines to search child windows as well as top-level windows.

0 = Only search top-level windows (default)

1 = Search top-level and child windows

#ce


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

; Might help?

Opt("WinSearchChildren", 1)

Opt("WinDetectHiddenText", 1)

#cs

WinDetectHiddenText Specifies if hidden window text can be "seen" by the window matching functions.

0 = Do not detect hidden text (default)

1 = Detect hidden text

WinSearchChildren Allows the window search routines to search child windows as well as top-level windows.

0 = Only search top-level windows (default)

1 = Search top-level and child windows

#ce

Nice suggestion to try.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Nice suggestion to try.

The title shows "JMP - [changes according to subwindow] // Remote".

I read in another thread to increase the characters to have a better reliability.

So instead of winactivate("JMP") I tried winactivate("JMP - ") and it is having 100% hit rate.

I also use wingethandle("JMP - ") = wingethandle("Remote") to be double sure.

Hope it helps others.

Share this post


Link to post
Share on other sites

This will work.

Try this.

AutoItSetOption("WinTitleMatchMode", 2)

$MyApp="JMP"

_WinWaitActivate($MyApp,"",5)

Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

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