Jump to content
Sign in to follow this  

Howto write to a certain ListView item?

Recommended Posts


I suspect, that controlcommand() or controlsettext() might be my friend, but I can't see, how :).

I can get the content of the list items:

$Ctrl = "SysListView321"
$Title = "Exact Audio Copy"

$Elements = ControlListView($Title, "", $Ctrl, "GetItemCount")

ConsoleWrite("Number of List Entries = " & $Elements & @CRLF & @CRLF)

For $i = 1 To $Elements
    ConsoleWrite("Value of Entry #" & $i & " is: " & ControlListView($Title, "", $Ctrl, "GetText", $i - 1) & @CRLF)

ConsoleWrite(@CRLF & "done!" & @CRLF)

The result is OK:

Number of List Entries = 14

Value of Entry #1 is: Track01
Value of Entry #2 is: Track02
Value of Entry #3 is: Track03
Value of Entry #4 is: Track04
Value of Entry #5 is: Track05
Value of Entry #6 is: Track06
Value of Entry #7 is: Track07
Value of Entry #8 is: Track08
Value of Entry #9 is: Track09
Value of Entry #10 is: Track10
Value of Entry #11 is: Track11
Value of Entry #12 is: Track12
Value of Entry #13 is: Track13
Value of Entry #14 is: Track14


But now I want to WRITE text to the entries found above.

<edit> this shall replace the former text </edit>


This is working, but it's ulgy, as it stops working, when the EAC window isn't the active window any more...

; .... this goes below the end of the script above
ControlListView($Title, "", $Ctrl, "DeSelect", 0, $Elements - 1)
ControlListView($Title, "", $Ctrl, "Select", 0)
For $i = 1 To $Elements
    Send("{f2}Some new Track Description " & StringRight("0" & $i, 2) & "{enter}") ; ENTER puts the focus to the next listview element.



Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post

Link to post
Share on other sites



I missed a really big bunch of UDFs!

Amazing: When using the search function of the help, "guictrllist" just gives my one hit: History. (amazing, there must be something wrong with the general help search function of windows, I guess)

When searching for "listview", I see the _GUICtrlListview*() UDFs

:) Thanks, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...