AutoHotkey Community

It is currently May 27th, 2012, 6:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: September 21st, 2009, 7:35 pm 
Offline

Joined: January 10th, 2009, 6:40 pm
Posts: 32
Listview Supplementary Library wrote:
DOWNLOAD LIBRARY
DOWNLOAD SANDBOX AND EXAMPLE


Listview Supplementary Library v1.0

Functions:
- LVG_Search()
- LVG_Get()
- LVG_Count_Un()
- LVG_GetNext_Un()
- LVG_Check()
- LVG_Select()
- LVG_Delete()
  • LVG_Search()
    Returns the...
    - Total number of the rows, that contain "Search string" and that are...
    - Row numbers of all rows (comma separated list), that contain "Search string" and that are...
    - Row number of the next row, that contains "Search string" and that's...

    * Selected
    * Deselected
    * Checked
    * Unchecked
    * Selected AND checked
    * Deselected AND unchecked
    * Selected AND unchecked
    * Deselected AND checked

    ...from the user specified row/column range.

    Quick example:
    Let's say you've got a Gui with the number 23 assigned to it (Gui, 23:...), and it has a Listview
    with 150 rows. You want to get the row numbers of the selected rows from the first twenty rows, but you only want the rows,
    that contain the word "Scripting" in their second field (column). Here's how to do it:

    Code:
    LVG_Search(23,"Selected","List","1-20","2","Scripting")


    -----------------------------------------------------------------------------------
  • LVG_Get()
    Returns the...
    - Total number of rows, that are...
    - Row numbers of all rows (comma separated list), that are...
    - Row number of the next row, that's...

    * Selected
    * Deselected
    * Checked
    * Unchecked
    * Selected AND checked
    * Deselected AND unchecked
    * Selected AND unchecked
    * Deselected AND checked

    ...from the user specified row range

    Quick example:
    Code:
    LVG_Get(1,"Unchecked","List","1-12;23-55;89;82")

    ...will return a comma-separated list, that contains the row numbers of the unchecked rows from these row range: 1-12 or 23-55 or 89 or 82.

    -----------------------------------------------------------------------------------
  • LVG_Count_Un()
    Returns the row number of the next:
    * Unchecked
    * Deselected
    ...row.

    Quick example:
    Code:
    LVG_Count_Un(1,"Deselected")

    ...will return the total number of the deselected rows from the default Listview of GUI1.

    -----------------------------------------------------------------------------------
  • LVG_GetNext_Un()
    Returns the row number of the next:
    * Unchecked
    * Deselected
    ...row.

    Quick example:
    Code:
    LVG_GetNext_Un(65,"Unchecked")

    ...will return the next unchecked row from the default Listview of GUI65.

    -----------------------------------------------------------------------------------
  • LVG_Check()
    Checks/Unchecks all the rows that are...

    * Checked
    * Unchecked
    * Selected
    * Deselected

    * Reverts checks

    Quick example:
    Code:
    LVG_Select(1,"CheckAll")

    ...will check all the unchecked rows.

    -----------------------------------------------------------------------------------
  • LVG_Select()
    Selects/Deselects all the rows that are...

    * Selected
    * Deselected
    * Checked
    * Unchecked

    * Reverts selection

    Quick example:
    Code:
    LVG_Select(1,"Reverse")

    ...will select all the deselected rows, and deselect all the selected ones.

    -----------------------------------------------------------------------------------
  • LVG_Delete()
    Deletes all the rows that are...

    * Selected
    * Deselected
    * Checked
    * Unchecked
    * Selected AND checked
    * Deselected AND unchecked
    * Selected AND unchecked
    * Deselected AND checked

    Quick example:
    Code:
    LVG_Delete(1,"Unchecked")

    ...will delete any unchecked rows.
    -----------------------------------------------------------------------------------

    Remarks:
    - For further info on the functions' parameters see the descriptions by each function in the library file.
    - It's not heavily commented (or should I say not commented at all)... So, if you have questions, don't hesitate to ask 'em in the forum topic.
    - The uncheck/check-related features work only if the Listview has "Checked" specified among its options
    - I ceated a simple sandbox to test the library, and it serves as a working example too.

    About:
    - Version: 1.1 by gahks http://www.autohotkey.net/~gahks
    - License: Attribution-Share Alike 3.0 Unported: http://creativecommons.org/licenses/by-sa/3.0/
    - Forum topic: http://www.autohotkey.com/forum/topic49091.html

    Changes:
    1.1:
    - renamed library file to LVG.ahk for compatibility reasons
    - new feature: in lvg_search(), mode: All; search in all rows


Last edited by gahks on October 4th, 2009, 11:02 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 22nd, 2009, 12:17 pm 
Offline
User avatar

Joined: July 17th, 2008, 12:58 am
Posts: 270
great thanks
ill have a look at it when i find some time :)

_________________
QuickSubs | Popcorn Movie Db
All my scripts are just in AutoHotkey v1.0.48.05


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: October 4th, 2009, 11:01 am 
Offline

Joined: January 10th, 2009, 6:40 pm
Posts: 32
Delusion wrote:
ll have a look at it when i find some time

Please post any bugs, opinions, suggestions, if you do.
I hope this library will spare y'all some time. :)

Update: 1.1
- renamed library file to LVG.ahk for compatibility reasons
- new feature: Search in all rows regardless of their selected/checked state


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 6:29 pm 
Offline
User avatar

Joined: July 17th, 2008, 12:58 am
Posts: 270
i recently needed this library again but im having some problems

when i have a listview containing fields like this :
Code:
District 9;District 9 (2009) DVDRip XviD-MAXSPEED;http://www.imdb.com/title/tt1136608/;Action, Sci-Fi;2009;DVD Rip;Aliens;Yes;{T066795}


and i use

Code:
LVG_Search(1,"All","List","All","1","District 9")


it gives me the row number correctly

but when i use

Code:
LVG_Search(1,"All","List","All","9","{T066795}")


it returns nothing.its just blank
i tried it with the imdb link also like this :

Code:
LVG_Search(1,"All","List","All","3","http://www.imdb.com/title/tt1136608/")


but that doesnt work either

any ideas?

_________________
QuickSubs | Popcorn Movie Db
All my scripts are just in AutoHotkey v1.0.48.05


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Google Feedfetcher, JamixZol, rbrtryn, Stigg and 20 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