Hi again
Basically what I currently have is 3 list boxes that have Checkboxes,
And a button that is the only button that will be pressed.
When this button is pressed I need to take the information from the list boxes and feed it into a predefined text document, save it as a .otm file and then run it.
Is this possible?
So far this is my code, I am able to get Text boxes to report the selected items, but that is as far as I have come before asking for help.
Here are my factors that will need to be met.
List box 1, will have either 1 option selected, or multiple. Listbox 2 & 3 will only have 1 option selected.
This is the text document that needs to be created, in bold is the parts where the listboxes will be fed into.. I'll do my best to show that,
-----------
# Global options:
~length hours=8
# Iteration:
~priority lastplay=80, rating=20, random=100
~iq avail & rating >= 1 & ("Listbox1-Value" | "Listbox1-Value" | "Listbox1-Value") & bpm > Listbox2-Value & bpm < Listbox3-Value & lastplay > 7 hours & itemsep artist > 10 & itemsep title > 20
-----------
This is another possibility, if only 1 thing is checked in Listbox1
-----------
# Global options:
~length hours=8
# Iteration:
~priority lastplay=80, rating=20, random=100
~iq avail & rating >= 1 & ("Listbox1-Value") & bpm > Listbox2-Value & bpm < Listbox3-Value & lastplay > 7 hours & itemsep artist > 10 & itemsep title > 20
-----------
Pic also of form to help understand.
![Name: ezp.jpg
Views: 2
Size: 201.2 KB]()
Basically what I currently have is 3 list boxes that have Checkboxes,
And a button that is the only button that will be pressed.
When this button is pressed I need to take the information from the list boxes and feed it into a predefined text document, save it as a .otm file and then run it.
Is this possible?
So far this is my code, I am able to get Text boxes to report the selected items, but that is as far as I have come before asking for help.
vb Code:
Public Class Form1 'Dim WhatIsChecked() As ListBox Private Sub WhatIsChecked() ' Display in a message box all the items that are checked. Dim itemChecked As Object Const quote As String = """" ' Next show the object title and check state for each item selected. For Each itemChecked In CheckedListBox1.CheckedItems ' Use the IndexOf method to get the index of an item. MessageBox.Show("CATEGORY SELECTED: " + quote + itemChecked.ToString() + quote) Next For Each itemChecked In CheckedListBox2.CheckedItems MessageBox.Show("BPM LOW: " + quote + itemChecked.ToString() + quote) Next For Each itemChecked In CheckedListBox3.CheckedItems MessageBox.Show("BPM HIGH: " + quote + itemChecked.ToString() + quote) Next End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form2.Show() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click WhatIsChecked() End Sub End Class
Here are my factors that will need to be met.
List box 1, will have either 1 option selected, or multiple. Listbox 2 & 3 will only have 1 option selected.
This is the text document that needs to be created, in bold is the parts where the listboxes will be fed into.. I'll do my best to show that,
-----------
# Global options:
~length hours=8
# Iteration:
~priority lastplay=80, rating=20, random=100
~iq avail & rating >= 1 & ("Listbox1-Value" | "Listbox1-Value" | "Listbox1-Value") & bpm > Listbox2-Value & bpm < Listbox3-Value & lastplay > 7 hours & itemsep artist > 10 & itemsep title > 20
-----------
This is another possibility, if only 1 thing is checked in Listbox1
-----------
# Global options:
~length hours=8
# Iteration:
~priority lastplay=80, rating=20, random=100
~iq avail & rating >= 1 & ("Listbox1-Value") & bpm > Listbox2-Value & bpm < Listbox3-Value & lastplay > 7 hours & itemsep artist > 10 & itemsep title > 20
-----------
Pic also of form to help understand.