 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
gahks
Joined: 10 Jan 2009 Posts: 32
|
Posted: Mon Sep 21, 2009 6:35 pm Post subject: [Library] Listview G v1.1 search, get, select, check, delete |
|
|
| 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 Sun Oct 04, 2009 10:02 am; edited 2 times in total |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 210 Location: Greece/Rhodos
|
|
| Back to top |
|
 |
gahks
Joined: 10 Jan 2009 Posts: 32
|
Posted: Sun Oct 04, 2009 10:01 am Post subject: Re: |
|
|
| 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 |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 210 Location: Greece/Rhodos
|
Posted: Tue Nov 30, 2010 5:29 pm Post subject: |
|
|
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? _________________ Popcorn Movie Db
Simple Apnea Trainer |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|