I'm dealing with this exact issue. All works great when I'm actively on the Terminal Server session. However, if it's minimized (or disconnected), it doesn't work.
I was originally using SEND(), but tried to switch to ControlSend(), based upong this thread/posting. I'm having a difficult time getting it to work, and I think it's because of how the silly CLASS is named by this application. I'm curious if the embedded colons are the problem?
The Class is: Afx:3ae0000:8:10003:0:0
The Instance is: 4
The ClassnameNN is: Afx:3ae0000:8:10003:0:04
It seems like NOTHING I try related to this control works.
I'm simply trying to select a certain menu option within this application. However, WinMenuSelectItem() does NOT work, as I'm guessing this application does NOT use Standard menus (as warned in the WinMenuSelectItem() help info).
All I can ever get to go through is the ALT to activate the menu system, but NO keystrokes ever go through the application from that point forward. I've tried every alternative I can come up with, to no avail.
When using ControlSend(), I don't even have to specific a CONTROL, and the ALT "activates" the menus, as desired. However, I CANNOT get ANYTHING else to work.
The normal keystrokes for this menu are ALT-T (to activate the Tools menu) and then E and S. E is the sub-menu option and S is the actual item being selected.
This works GREAT when actively watching:
Send("!tes")
I've tried BOTH entering the keystrokes (TES) and entering cursor controls (right, down, etc., once the menus are activated). No luck.
Some things I've tried:
ControlSend("FrontRange GoldMine Premium Edition","","Afx:3ae0000:8:10003:0:04","!tes")
ControlSend("FrontRange GoldMine Premium Edition","","[CLASSNN:Afx:3ae0000:8:10003:0:04]","!tes")
ControlSend("FrontRange GoldMine Premium Edition","","[CLASS:Afx:3ae0000:8:10003:0:0;INSTANCE:4]","!tes")
ControlSend("FrontRange GoldMine Premium Edition","","[TEXT:Menu Bar]","!tes")
I've altered the "!tes" in multiple ways, again, with no success.
Any and all help would be greatly appreciated. Thanks in advance.