Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Sending {ENTER} with _GUICtrlListView_SetItem ?

$
0
0

Hello,

 

My quetion stems from this thread: http://www.autoitscript.com/forum/topic/167935-script-sometimes-skipping-keystrokes-jumping-to-wrong-cells/

 

So, I have finally been able to get _GUICtrlListView_SetItem to work, setting values to cell I need it to. However, the application that Im setting the values to requires that after I set the values, I need to press ENTER or TAB. If I dont do that, it will automatically revert back to the old values after a few seconds.

 

I can not use _GUICtrlListView_SetItem and put {ENTER}, as it will litelly send the string to the cell and not simulate pressing the enter key. I have tried using ASCII chars aswell, but no go.

 

Furthermore, Ive tried _IsPressed() but that doesnt work because no keys actually get pressed with the SetItem method.

 

Screenshot of my application that I need to set values in:

 

Screen_Vplus_Auto_IT.jpg

 

I need to set the values in cells row 1, index 1 and index 2

and in row 2, index 1 and index 2

 

My code:

AutoIt         
#include <GuiListView.au3> #include <Misc.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,"17777777",$iRowToEdit,$iSubItemToEdit) ;Target Speed value Index 1 in Vtable $iRowToEdit = 1 $iSubItemToEdit = 2 _GUICtrlListView_SetItem($hControl,"1638400",$iRowToEdit,$iSubItemToEdit) ;-------------------------------------- ; Index 2 ;-------------------------------------- ;Target position value Index 2 in Vtable $iRowToEdit = 0 $iSubItemToEdit = 3 _GUICtrlListView_SetItem($hControl,"100002",$iRowToEdit,$iSubItemToEdit) ;Target Speed value Index 2 in Vtable $iRowToEdit = 1 $iSubItemToEdit = 3 _GUICtrlListView_SetItem($hControl,"1638400",$iRowToEdit,$iSubItemToEdit)

Really hope anyone can help, its the last piece of this puzzle that Ive been struggling with for days now


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>