I think the <AUTO></AUTO> command function stopped working after Roberts last bug fix, I can't remember which bug it was but it was.
I wrote an AUTO-IDLE plugin that allows a user to choose a time variable on the fly from brain options, there are no errors and it should be working, but isn't.
Here is a template sample of the plugin for testing.
Rem Type=Plugin
Rem Name=Auto Idle Control
Rem Author=ONTHECUTTINGEDGE2005
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'Test Variable
lblPlugin(0).Caption = "Auto Idle Timer Control"
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
cmdPlugin(0).Move 120, 250, 850, 300
cmdPlugin(0).Caption = "Help"
cmdPlugin(0).Visible = True
'Test Variable
lblPlugin(1).Caption = "Auto Idle Time Variable:"
lblPlugin(1).Move 120, 550, 2150, 900
lblPlugin(1).WordWrap = True
lblPlugin(1).Visible = True
cboPlugin(0).Move 120, 780, 1200
cboPlugin(0).AddItem "100000"
cboPlugin(0).AddItem "200000"
cboPlugin(0).AddItem "300000"
cboPlugin(0).AddItem "400000"
cboPlugin(0).Visible = True
cmdPlugin(1).Caption = "Apply"
cmdPlugin(1).Move 120, 1200, 850, 300
cmdPlugin(1).Visible = True
'VARIABLE CASE VALUE
Select Case MyVariable
Case "100000"
cboPlugin(0).Text = "100000"
Case "200000"
cboPlugin(0).Text = "200000"
Case "300000"
cboPlugin(0).Text = "300000"
Case "400000"
cboPlugin(0).Text = "400000"
End Select
End Sub
Sub cmdPlugin_Click(Index)
Dim TempQuery()
Dim MyVariable
'Any Help Files can be used here that can be accessed by the Brain options panel.
Select Case Index
Case 0
HalMenu.HalCommand "<RUNPROG>SomeHelpFile.txt</RUNPROG>"
Case 1
'VARIABLE CASE VALUE
Select Case cboPlugin(0).Text
Case "100000"
MyVariable = "100000"
Case "200000"
MyVariable = "200000"
Case "300000"
MyVariable = "300000"
Case "400000"
MyVariable = "400000"
End Select
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
'This portion of the template deletes and recreates any files with need for 'variable' storage that can be
'passed down to script in the plugin area below.
TempModule = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\AutoIdleTimer.brn"
If FileSys.FileExists(TempModule) = True Then FS.DeleteFile "C:\Program Files\Zabaware\Ultra Hal Assistant 6\AutoIdleTimer.brn"
If FileSys.FileExists(TempModule) = False Then
HalXBrain.AppendFile TempModule, MyVariable & vbCrLf & MyVariable & vbCrLf & MyVariable
End If
End Select
End Sub
Rem PLUGIN: AUTO-IDLE
UltraHal = "The Debug Test is Good!"
Rem PLUGIN: POST-PROCESS
Auto_Variable = AutoVariable()
HalCommands = "<AUTO>" & Auto_Variable & "</AUTO>"
HalCommands = HalCommands
Rem PLUGIN: PLUGINAREA1
Auto_Variable = AutoVariable()
HalCommands = "<AUTO>" & Auto_Variable & "</AUTO>"
HalCommands = HalCommands
Rem PLUGIN: SCRIPT_LOAD
'Here we store our chosen variable from HAL's Brain options for use in this plugin template.
'This AutoVariable() function can be passed down into script.
Auto_Variable = AutoVariable()
Script_Load = "<AUTO>" & Auto_Variable & "</AUTO>"
Script_Load = Script_Load
Rem PLUGIN: FUNCTIONS
'Here we store our chosen variable from HAL's Brain options for use in this plugin template.
Function AutoVariable()
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
TempFolder = "C:\Program Files\Zabaware\Ultra Hal Assistant 6\"
AutoVariable = HalXBrain.ChooseSentenceFromFile(TempFolder & "AutoIdleTimer.brn")
End Function
Jerry