caramen Posted March 9, 2015 Share Posted March 9, 2015 (edited) #include <Misc.au3> If _ispressed ("{Enter}") then Send ("{") Send ("ENTER") Send ("}") EndIf play with that Edited March 9, 2015 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
jdelaney Posted March 9, 2015 Share Posted March 9, 2015 There is no reason to send enter or tab...just move to the cell you need to work in. Like I've said before, sends are not the way to go. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Marss Posted March 9, 2015 Author Share Posted March 9, 2015 unfortunately, there is a need that the enter key be pressed. Your method works great, and it sends the values perfectly, but the application is weird in a sense that even if I set the values it needs enter to be pressed or it will not process the values. If I just move to the next cell it will automatically revert back to the old values. Link to comment Share on other sites More sharing options...
jdelaney Posted March 9, 2015 Share Posted March 9, 2015 (edited) Ah. Then that is one of the cases where the send might be required...stick with controlsend then. There might be another _guictrllistview* to 'commit' or something similar. An edit is created, right? And you need to get out of it? Get the handle via: _GUICtrlListView_GetEditControl And send the enter at that. Edited March 9, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Marss Posted March 9, 2015 Author Share Posted March 9, 2015 I've quickly scanned through the option because I have to run out. It looks promising, will get to work on it tomorrow. Thanks a lot for sticking with me and offering help, it is appreciated! Really cool to see how Ive went from a sluggish macro to a quick short script Link to comment Share on other sites More sharing options...
Marss Posted March 10, 2015 Author Share Posted March 10, 2015 (edited) I've tried getting the handle but the function does not allow me to enter the coordinates for the cell or the index of the cell. So far I gotten to this: #include <GuiListView.au3> ;--------------------------------------- ; Define Variables ;--------------------------------------- $windowTitle = "VTable 8.04 (COM3 [115200]) - [1: - 603 206 000 ; 12087363]" $windowControlID = "[CLASS:SysListView32; INSTANCE:6]" $hWin = WinGetHandle($windowTitle) $hControl = ControlGetHandle($hWin,"",$windowControlID) ;-------------------------------------- ; Start Script ;-------------------------------------- ;-------------------------------------- ; Index 1 ;-------------------------------------- ;Target Position value Index 1 in Vtable $iRowToEdit = 0 $iSubItemToEdit = 2 _GUICtrlListView_SetItem($hControl,"100001",$iRowToEdit,$iSubItemToEdit) $editControl = _GUICtrlListView_GetEditControl($hControl) ControlSend($hWin,"",$editControl,"666666") I've used "666666" just to see if the value is being sent but nothing happens. I thinks it's because it is now sending it to the window instead of using the rows and subitems values. I have no idea how to go from here, the example of GetEditControl is very confusing. Edit: When showing $editControl in the Console it shows a value of 00000000. When I use the script from jdelaneys sig (GetAllWindowControls) it shows the Handle as [0x000D04E8]. Neither works with ControlSend though. Edited March 10, 2015 by Marss 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