Hey Doony:
I caught up on some new stuff
Thought id throw my hat in the ring here.
Wana go over miss S.A.L.L.I.E
Arknight : Look at what Gretta media is doing here:
Take a close look at the top of this plugin (gretta mood)
This can be used to cut in an option for Dream out loud.
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'------------------
' Define the Help
'------------------
lblPlugin(0).Caption = "GRETTA will be able to play your favourite songs. Click below for more info"
lblPlugin(0).Move 120, 120, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
cmdPlugin(0).Move 320, 650, 2100, 375
cmdPlugin(0).Caption = "Help on this plugin"
cmdPlugin(0).Visible = True
'------------------
' Define the Musical Mood listbox
'------------------
lblPlugin(1).Caption = "GRETTA Media Mood level"
lblPlugin(1).Move 320, 1300, 4000, 1000
lblPlugin(1).WordWrap = True
lblPlugin(1).Visible = True
cboPlugin(0).Move 320, 1600, 1800
cboPlugin(0).AddItem "Very high"
cboPlugin(0).AddItem "High"
cboPlugin(0).AddItem "Average"
cboPlugin(0).AddItem "Low"
cboPlugin(0).AddItem "Very Low"
cboPlugin(0).Visible = True
cmdPlugin(1).Caption = "Apply Changes"
cmdPlugin(1).Move 320, 2100, 1600, 375
cmdPlugin(1).Visible = True
'------------------
' Update the listbox with the current value stored in the table
'------------------
If HalBrain.CheckTableExistence("vrParameter") = True Then
vrMusicMood = HalBrain.TopicSearch("MUSIC", "vrParameter")
If vrMusicMood = "" Then vrMusicMood = 1
Select Case vrMusicMood
Case 50
cboPlugin(0).Text = "Very high"
Case 40
cboPlugin(0).Text = "High"
Case 30
cboPlugin(0).Text = "Average"
Case 20
cboPlugin(0).Text = "Low"
Case 10
cboPlugin(0).Text = "Very Low"
End Select
End If
End Sub
Sub cmdPlugin_Click(Index)
Dim vrTempQuery()
Dim vrMusic, vrMusicMood
Select Case Index
Case 0
HalMenu.HalCommand "<RUNPROG>vrMP3Help.html</RUNPROG>"
Case 1
'------------------
' Convert the listbox in a value
'------------------
Select Case cboPlugin(0).Text
Case "Very high"
vrMusicMood = 50 <<<< this once this varaible is set , that's it. ON
Case "High"
vrMusicMood = 40 cut out here
Case "Average"
vrMusicMood = 30 cut out here
Case "Low"
vrMusicMood = 20 cut out here
Case "Very Low"
vrMusicMood = 10 <<<< this once this varaible is set , that's it. OFF
End Select
'------------------ Below, just swap out al the music ****z for the table name you want.
' If the Parameter table does not exist, I create it
'------------------
HalBrain.ReadOnlyMode = False
vrTableName = "vrParameter"
If HalBrain.CheckTableExistence(vrTableName) = False Then
'Create table if it doesn't exist
HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
End If
'------------------
' Search if it contains the MusicMood parameter
'------------------
vrMusic = "MUSIC"
If HalBrain.TopicSearch(vrMusic, vrTableName) = "" Then
'------------------
'Creates the record storing the new value
'------------------
HalBrain.AddToTable vrTableName, "TopicSearch", vrMusic, vrMusicMood
Else
'------------------
'Updates the record storing the new value
'------------------
HalBrain.RunQuery "UPDATE " & vrTableName & " SET topic = " & vrMusicMood & " WHERE searchString = " & """" & vrMusic & """", vrTempQuery
End If
End Select
End Sub
************************************
Or, you can use the dream out loud function as separate plugin and turn it on and off at will, which maybe by Robert did it in the first place....
Not like you can turn it off and on once Hal is runnning anyway.... think!!!!
Remember : Once you assign a Variable in the header, your pretty much Stuck with it.
S.A.L.L.I.E hmmmm
best wishes cyber jedi