ss26 Posted April 19, 2015 Share Posted April 19, 2015 (edited) G'Day, I needed to automate one of those 'problem' applications. I guess it is similar to that which is mentioned by OP >here (mouse doesn't work). Even custom mouse functions by Zedna didn't help me. I was ready to give up on automating app with Autoit but then i found some kind of workaround on Stackoverflow - run Autoit script with admin privileges. And that is a solution (it is strange because UAC is disabled here). Nevertheless, i wanted to underline possible solution with "mouse problems" and send key problems, too: 1. Run script as admin 2. Use Zedna's custom functions (for mouse events): Try these my functions (instead of MouseClick/MouseMove): Func _MouseClickFast($x, $y) $x = $x*65535/@DesktopWidth $y = $y*65535/@DesktopHeight _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y) _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTDOWN), $x, $y) _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTUP), $x, $y) EndFunc Func _MouseMoveFast($x, $y) $x = $x*65535/@DesktopWidth $y = $y*65535/@DesktopHeight _WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y) EndFunc May be of some help for those who will struggle for days to make mouse or keyboard work in some applications. PS: Thanks to Zedna for his custom mouse functions, without this code i was not able to make it work. Edited April 19, 2015 by ss26 Link to comment Share on other sites More sharing options...
JohnOne Posted April 19, 2015 Share Posted April 19, 2015 You only need to use admin rights when the application is using admin rights. ss26 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ss26 Posted April 20, 2015 Author Share Posted April 20, 2015 (edited) However, this is not the case here. App is launched without admin rights. But it cannot be controled by Autoit unless Autoit script is run with admin rights. edit: In fact i just noticed Windows shield (sign of elevated priviliges) on app shortcut (despite shortcut is not configured to "run as admin"). Seems like JohnOne is right. Edited April 20, 2015 by ss26 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