Here is a working example of the script I need to fix....
Code: Select all
#SingleInstance, Force
e1=
(Ltrim Join`r`n
What have I played this gig?
What have I played in the last month?
Uncategorized
Unavailable (inaccessible) Items
In "pop" category and rating above 4
In "Wedding" and 'Love' in title\artist
Both 'Beatles' and 'love' in title\artist
Shorter than 70 seconds (ad/promo?)
Longer than or equal to 6 minutes
BPM between 120 and 140 (inclusive)
Karaoke items
Karaoke items shorter than 4 minutes
Video items
Video *and* ABM items
Video *or* ABM items
ABM with an intro *and* outro
ABM intro *or* outro, but not both
Clear OMQL Field
Clear Search Field
1- Clear OMQL & Search fields
)
Gui,Add, Edit, x10 y10 w580 vSrch1 gFind hwndHFind,
Gui,Add, listview, w580 xp y35 r9 Grid vLV1 +altsubmit -multi -Hdr ,Description
LV_ModifyCol(1,558)
gosub, LoadPresets
Gui,Show, autosize
Return
;
LoadPresets:
{ Gui,listview, LV1
LV_Delete()
Loop, Parse, e1, `n
LV_Add("", A_LoopField)
LV_ModifyCol(1, "Sort CaseLocale") ; or "Sort CaseLocale"
LV_Modify(1,"+Select")
LV_Modify(1, "Vis") ;scrolls down
Return
}
;
Find:
{ Gui,Submit, Nohide
Gui,listview, LV1
ex := e1
src:= % srch1
if (SRC=) ; If search is now empty, reload list with complete list
Return
LV_Delete() ; if Search is not empty, delete listview content, and refill will search results.
loop,parse,ex,`n
{ LR=%A_loopfield%
StringReplace, SRC,SRC,%A_Space%, `,,A ; Make spaces wildcards
if SRC<>
{ if LR Contains %SRC%
LV_Add("",LR)
}
else
continue
}
LV_ModifyCol(1, "Sort CaseLocale") ; or "Sort CaseLocale"
LV_Modify(1,"+Select")
LV_Modify(1, "Vis")
if (SRC="")
gosub, LoadPresets
Return
}
Run it, and type in "abm or" and see what happens when you add the "or". I want to take the 4 results from "ABM", and narrow to the 2 results that contain both "ABM" & "Or", instead of expanding it to 9 results.