I found this sample code on an old forum post, and I was wondering if there was a way to make it a sort of tag-based data search. I'm having a difficult time explaining this well, so bear with me.
Code: Select all
Gui, Add, Checkbox, vOpt1, Contains Chocolate
Gui, Add, Checkbox, vOpt2, Contains Dairy
Gui, Add, Button, gLabel, Click here to submit
Gui, Show, w450 h100, Dessert Selection
Return
Label:
Gui, Submit, NoHide
If Opt1 = 1
MsgBox, you checked the first box
If Opt1 = 0
MsgBox, you didnt check the first box
If Opt2 = 1
MsgBox, you checked the second box
If Opt2 = 0
MsgBox, you didnt check the second box
Return
For example, if I were to somehow create an item called "Chocolate Ice Cream", and somehow tag it as "Contains Chocolate" and "Contains Dairy," then create another item called "Vanilla Ice Cream" and tag it as "Contains Dairy," then another item called "Baked Apples" and tag it as "Contains Chocolate," could I make something that displays every item that contains ALL of the corresponding tags. So if I only check "Contains Chocolate," then only Chocolate Ice Cream and Baked Apples appear in a message box or something similar, but if I check "Contains Dairy," Chocolate Ice Cream and Vanilla Ice Cream appear.
I am going to want to have about a dozen tags and roughly 100 items in the "database," but I'd just like an example to reference.
If you have any questions about what I'm trying to explain please don't hesitate.