AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get row count only using my LV variable and GUI number??

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
acowbear



Joined: 14 May 2006
Posts: 45

PostPosted: Sat Feb 23, 2008 4:48 am    Post subject: Get row count only using my LV variable and GUI number?? Reply with quote

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
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Sat Feb 23, 2008 4:52 am    Post subject: Reply with quote

http://www.autohotkey.com/forum/viewtopic.php?t=27626
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
acowbear



Joined: 14 May 2006
Posts: 45

PostPosted: Sat Feb 23, 2008 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Sat Feb 23, 2008 6:19 am    Post subject: Reply with quote

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

PostPosted: Sun Feb 24, 2008 12:08 am    Post subject: Reply with quote

Sweet! So simple and great! Thanks! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group