Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get string from List / ListItem?
#1
Help me please.
I'm a new to Qucik Macros.

How do I get the text string in a List/ListItem control? for example, the text in column 2, row 3 or a specific row? I want to save this text into a file.

I'd try acc
Code:
Copy      Help
Acc context=acc("cat" "LISTITEM" "Monitor" "TListView" "" 0x1001)
str str_txt=context.Description
mes- str_txt

but it show nothing in message box.

What should I do?

Thank you very much!
#2
The code is correct. It should show a comma-separated list of column strings. I don't know why it does not work. For example, when I use the following code for a file in My Documents folder

Acc a=acc("Doc1.doc" "LISTITEM" "My Documents" "SysListView32" "" 0x1405)
str s=a.Description
out s

I get this text:

Size: 25 KB, Type: Microsoft Word Document, Date Modified: 6/18/2005 11:39

And, I tested, this works for TListView controls too.
#3
Thank you very much!

mm....It's still empty :? .
I can't see any thing after "out s" command.

but if i put some chars in front of a.description

str s= "a" & a.description
out s

it shows 16256000.
:roll:
#4
In QM, & operator is not used with strings. To join two strings, can be used for example this:

str s.from("a" a.Description)


Forum Jump:


Users browsing this thread: 1 Guest(s)