Sign in to follow this  
Followers 0
JadeGolem

Can't interact with .NET managed forms in Win 7 Pro?

4 posts in this topic

#1 ·  Posted (edited)

I've been trying to get a VERY simple script to select a menu item in a .NET managed form.

I've tried with the following methods:

;Optimal solution
Opt("WinTitleMatchMode", 1)
WinActivate("Untitled")
WinMenuSelectItem("Untitled","","Find","Search") ;Using "&Find" doesn't work either
and

;This key sequence works manually from the keyboard
Opt("WinTitleMatchMode", 1)
WinActivate("Untitled")
Send("!f") ;File
Send("!f") ;Find
Send("{DOWN}") ;Search
Send("{ENTER}")
and

;This key sequence works manually using the mouse and keyboard
Opt("WinTitleMatchMode", 1)
WinActivate("Untitled")
MouseClick("primary", 92, 32, 1, $Speed) ;Find
Send("{DOWN}") ;Search
Send("{ENTER}")

All three methods work great with Windows 7 apps (ie Notepad), and the .NET app behaves just fine if I manually use my mouse and/or keyboard.

Anyone seen this before or have any ideas how to fix/work around it?

I don't have the source for the .NET form/app I'm trying to automate. I have Windows 7 Professional 64 bit, with .NET Framework 3.5 w/SP1 installed. I've tried installing AutoIt with the install option "use 64-bit code when possible" turned on and off.

Thanks in advance,

Ken

(edited to clarify my environment)

Edited by JadeGolem

Share this post


Link to post
Share on other sites



Is the application in question being run under the administrator account? If so, your script will also need to be run that way. This is the first potential problem I see.

Apart from that, I have no idea why something like mouse clicking or keyboard operation would be blocked.

Share this post


Link to post
Share on other sites

Is the application in question being run under the administrator account? If so, your script will also need to be run that way.

Ka-ching! You nailed it, that's the problem. Has this requirement/behavior changed from Vista? I'm pretty certain we run the app as admin, but don't have to run the script as admin in Vista.

Thanks for the answer!

Share this post


Link to post
Share on other sites

Yes it's a security feature. Applications that can make system level changes should only be accessible by system level admins. That includes programs. It means that unless a virus runs as admin, it can't go tweaking other admin apps.

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