trifox Posted January 16, 2016 Share Posted January 16, 2016 hello, i experience that sending the keyboard events, especially the arrow keys {LEFT,RIGHT,UP,DOWN}... are not received by a keyboard controlled html page, this is what i do: au3.WinActivate(selectedWindowName); au3.Send("{UP}"); here is the website i want to control using autoit c# http://www.duesseldorf-gigapixel-panorama.360-up.com/ what actually only works right now is mouse controlling the app, it is a panoramic photo viewer, and mousedown/mouseup/mousemove work as expected, but not the keyboard stuff, any hints on how browser control names are called to send the commands to ? here is what i get from internet explorer win10 "ApplicationFrameTitleBarWindow\n Windows.UI.Core.CoreWindow\n Spartan ServiceUI XAML-To-Trident Input Routing Window\n Spartan XAML-To-Trident Input Routing Window\n Spartan Tab XAML-To-Trident Input Routing Window\n TabWindowClass\n Windows.UI.Core.CoreComponentInputSource\n Internet Explorer_Server\n Spartan ServiceUI XAML-To-Trident Input Routing Window\n Spartan ServiceUI XAML-To-Trident Input Routing Window\n ApplicationFrameInputSinkWindow\n" any help and hints are greatly appreciated, thank you Link to comment Share on other sites More sharing options...
trifox Posted January 16, 2016 Author Share Posted January 16, 2016 this seems to be the answer http://stackoverflow.com/questions/30156913/sending-keyboard-key-to-browser-in-c-sharp-using-sendkey-function Link to comment Share on other sites More sharing options...
trifox Posted January 16, 2016 Author Share Posted January 16, 2016 (edited) ... but the provided code looses its process data structure somehow, so i would like to retrieve a Window.Process class instance from a ProcessID retrieved by autoit hrm, not really satisfying that solution, for once because of the starting of chrome, but even though the chrome is started just once, the sending of a keyboard command does not work Edited January 16, 2016 by trifox Link to comment Share on other sites More sharing options...
trifox Posted January 16, 2016 Author Share Posted January 16, 2016 and btw, the browser does not matter, either InternetExplorer, Chrome, Firefox, any hint on how to send a keyboard event to such a browser would be helpful Link to comment Share on other sites More sharing options...
JohnOne Posted January 16, 2016 Share Posted January 16, 2016 SendKeys.Send("{UP}"); Works perfectly fine for me in all browsers. 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...
trifox Posted January 16, 2016 Author Share Posted January 16, 2016 ah, thank you, this seems to work, was not aware to use the windows system function for that Link to comment Share on other sites More sharing options...
trifox Posted January 17, 2016 Author Share Posted January 17, 2016 one more info, because it was hard to simulate a key-down state, i found this utility library which provides keydown/keyup/keypress methods, and it works just nicely https://inputsimulator.codeplex.com/ 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