JadeGolem Posted June 25, 2010 Share Posted June 25, 2010 (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 June 25, 2010 by JadeGolem Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 25, 2010 Share Posted June 25, 2010 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. Link to comment Share on other sites More sharing options...
JadeGolem Posted June 25, 2010 Author Share Posted June 25, 2010 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! Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 25, 2010 Share Posted June 25, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now