Hi, I'm just starting with AutoHotkey and I don't understand how to get and set values in a listview of another application.
The listview looks like:
Header Value
zone true
time 1600
factor 1.5
I can get the values into SelectedItems with this:
ControlGet, SelectedItems, List,, SysListView321, Format Strategy
But then I would like to check the value of row 1 and column 2 (zone=true). If it is true I want to change the value to false. And then do similar checks with row 3/column 2 and row 4/column as well (check value and then set it to something new)-
Any tips how this should be done, please?
Change values in listview Topic is solved
Re: Change values in listview Topic is solved
You are near, for the first part.
I think, more directly would be via sending a message LVM_GETITEMTEXT.
That way you could later even send a message LVM_SETITEMTEXT.
However sending a message requires knowledge how to get/set info from/to a
Maybe some one else will help you (and me too - to learn)!
Code: Select all
ControlGet, ColItems, List, col3, SysListView321, Format Strategy
;MsgBox % colItems
loop, parse, colItems, `n
{
if (A_Index = 2) {
col3row2:=A_LoopField
break
}
}
MsgBox % col3row2
That way you could later even send a message LVM_SETITEMTEXT.
However sending a message requires knowledge how to get/set info from/to a
struct
, which I can't.Maybe some one else will help you (and me too - to learn)!
-
- Posts: 4326
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Change values in listview
But what's the point to change the values in the window of another application? The values themselves won't change, only the text in the window will change.
Re: Change values in listview
I tried some listview examples , add/modify/delete , print/calculate/formatted text ...
cn
https://www.autohotkey.com/boards/viewtopic.php?f=28&t=3384
pt
https://www.autohotkey.com/boards/viewtopic.php?f=69&t=63445
cn
https://www.autohotkey.com/boards/viewtopic.php?f=28&t=3384
pt
https://www.autohotkey.com/boards/viewtopic.php?f=69&t=63445
Re: Change values in listview
There's an LVSetText function, in this library, which works on external GUIs, however, I only really use it for internal GUIs:
GUIs via DllCall: text functions (get/set internal/external control text) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40514
GUIs via DllCall: text functions (get/set internal/external control text) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40514
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Lamron750 and 369 guests