AutoHotkey Community

It is currently May 26th, 2012, 6:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 23rd, 2008, 5:48 am 
Offline

Joined: May 14th, 2006, 8:31 pm
Posts: 45
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 5:52 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
http://www.autohotkey.com/forum/viewtopic.php?t=27626

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 6:11 am 
Offline

Joined: May 14th, 2006, 8:31 pm
Posts: 45
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....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 7:19 am 
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...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2008, 1:08 am 
Offline

Joined: May 14th, 2006, 8:31 pm
Posts: 45
Sweet! So simple and great! Thanks! :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Bing [Bot], bobbysoon, Google Feedfetcher, JSLover, LazyMan, Tipsy3000 and 65 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group