| View previous topic :: View next topic |
| Author |
Message |
acowbear
Joined: 14 May 2006 Posts: 45
|
Posted: Sat Feb 23, 2008 4:48 am Post subject: Get row count only using my LV variable and GUI number?? |
|
|
Hi! I want to retrieve the number of rows in a specific Listview.
This works.....
ControlGet, Outputvar, List, count, SysListView321,my gui1
...but the thing is, I have many Listviews and I need to be able to retreive row counts on the fly based on the Assosiated variables of the LV's.
I am trying to make a function that takes...
Parameter1 - The LV's associated variable
Parameter2 - The GUI number
...and then returns the number of rows in that LV.
Any ideas how to do this? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
|
| Back to top |
|
 |
acowbear
Joined: 14 May 2006 Posts: 45
|
Posted: Sat Feb 23, 2008 5:11 am Post subject: |
|
|
I'm not seeing how the above post helps?
That specifies which LV you want to use with the Built-in LV Functions, but I did not find any Built-in LV Functions that count rows.... |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Feb 23, 2008 6:19 am Post subject: |
|
|
| acowbear wrote: | | ...but I did not find any Built-in LV Functions that count rows... |
...LV_GetCount() with no param does...
| Code: | ListView_GetCount(p_lv="", p_type="", p_gui="") {
if (p_gui!="")
Gui, %p_gui%:Default
if (p_lv!="")
Gui, ListView, %p_lv%
return LV_GetCount(p_type)
} |
...sorry, that's not tested, but really should work...& actually all the builtin ListView functions need these params...but not Gui-num params, Gui hwnd, params... |
|
| Back to top |
|
 |
acowbear
Joined: 14 May 2006 Posts: 45
|
Posted: Sun Feb 24, 2008 12:08 am Post subject: |
|
|
Sweet! So simple and great! Thanks!  |
|
| Back to top |
|
 |
|