Jump to content

Winactivate for remote applications


SiteMaze
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...

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.
Link to comment
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!
Link to comment
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.
Link to comment
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.

Link to comment
Share on other sites

  • 3 years later...

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...