Raik Posted June 24, 2015 Share Posted June 24, 2015 I tried to automate the "PC Files list"-control in Recuva (file-recovery tool).Some controls resist Automation with native autoit-methods. My question is about the different ways, controls read Keyboard-/mouse-Events. I have read about "sendinput", about different "layers",on witch some controls read the Input, about DirectX, and so on.Can somebody please describe ways, different from the methods used in autoit, to automate such resistent controls, to send keybard-Events in a way, that works for such controls? AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) Link to comment Share on other sites More sharing options...
junkew Posted June 24, 2015 Share Posted June 24, 2015 please be more specific. But read IUIAutomation thread in examples section.But so far I can handle all controls with AutoIT and keyboard events.The worst case I have found to do a. Mousemove to location of the controlb. then do sendkeysand another approach is by putting stuff on clipboard and sending a mouse move to the control, click and then paste command FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Raik Posted June 24, 2015 Author Share Posted June 24, 2015 (edited) "PC Files list"-control looks like listview with style $LVS_EX_CHECKBOXES. With Send / ControlSend / ControlSetText ("{Space}"), ControlCommand ("Uncheck"), ControlClick or MouseClick switching the Checkbox enabled / disabled does not work.I have read about some controls do not read the windows-messages-stream but read the underlaying stream of Keyboard-data, if i understand this correctly. Games (not related for me atm.) may work with DirectX. I want to understand the difference between autoit--Keyboard-Events and a real keyevent from a real keyboard. Why some controls only do work with real Keyboard-Events, but resist the autoit-Events? Edited June 24, 2015 by Raik AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) Link to comment Share on other sites More sharing options...
Bert Posted June 24, 2015 Share Posted June 24, 2015 look here: The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
junkew Posted June 24, 2015 Share Posted June 24, 2015 (edited) I installed recuva and I can recognize with simplespy the controlswith a click on the right location I activate the filelist itemwith a send("{SPACE}") it toggles on/off as also happens with .invoke action au3inf is indeed seeing less compared to the simplespywith inspect.exe I see the same objects recognized and with iaccessible pattern a little more information can be seen.But anyway in the end it are hard to handle controls as if you want to see enabled/disabled checkbox you have to take snapshot of the lineitem and then look in the first few binary bytes if its enabled / disabledwith uiawrappers you could do _UIA_Action($lineItem,"screenshot") but I have not enough time to make a working demo (maybe in future I will add it in the examples of the whole uiawrappers.udf) This link can tell you more on keyboards https://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx Edited June 24, 2015 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Raik Posted June 27, 2015 Author Share Posted June 27, 2015 I had clicked a item of the control, switched over to my sourcecode-Editor (Notepad++), run the script (F6), witch sets Focus on the recuva-window, and to the control inside, but send("{SPACE}") does nothing. :-(If a checkbox is enabled, i check by PixelGetColor. (R=G=B = gray = not selected)I tried sendmessage with wm_keydown / wm_keyup and wm_syskeydown / wm_syskeyup, does'nt work too.Anyway controlfocus does not work, returns 0. AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) 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