I posted the following in another topic, but it also resolves this topic, so I'm copying it here...
OK... I got it working by storing a SKIP value in a table, allowing the script to run for SKIP1, but doing an "Exit Function" for SKIP2 and SKIP3.
It works, but it sure is messy.
I'm holding out for a better possible answer from Robert. I sent him an email tonight asking him to take a look at this thread if he had time and try to put me on the right path if there is one.
In case anyone is interested in the messy code, here it is...
Keep in mind that I edited the brain to put PLUGINAREA2 just below
the 1st Function line, the UltraHal Function that starts...
"Function UltraHal(ByVal InputString,"
So that my PLUGIN2 starts before anything happens.
Here's the section of my plugin that does the SKIP...
'------------------
Rem PLUGIN: PLUGINAREA2
'The comment above tells Ultra Hal Assistant to insert the following code
'on-the-fly into the main brain code in the section referenced.
'------------------
'create skipit if needed-----------------------------------------------------
If HalBrain.TopicSearch("skipit", "ja1_vars") = "" Then
HalBrain.ReadOnlyMode = false
HalBrain.AddToTable "ja1_vars", "TopicSearch", "skipit", "skip1"
End If
-----------------------------------------------------------------------------
'skip code-------------------------------------------------------------------
HalBrain.ReadOnlyMode = false
ja1_skipit = HalBrain.TopicSearch("skipit", "ja1_vars")
'MsgBox "ja1_skipit = -" & ja1_skipit & "-"
'------------------
If ja1_skipit = "skip1" Then
ja1_skipit = "skip2"
HalBrain.ReadOnlyMode = false
HalBrain.RunQuery "UPDATE ja1_vars SET topic = """ & ja1_skipit & """ WHERE searchString = 'skipit'", ja1_tempVal
ja1_skipit = ""
End If
'------------------
If ja1_skipit = "skip2" Then
ja1_skipit = "skip3"
HalBrain.ReadOnlyMode = false
HalBrain.RunQuery "UPDATE ja1_vars SET topic = """ & ja1_skipit & """ WHERE searchString = 'skipit'", ja1_tempVal
ja1_skipit = ""
Exit Function
End If
'------------------
If ja1_skipit = "skip3" Then
ja1_skipit = "skip1"
HalBrain.ReadOnlyMode = false
HalBrain.RunQuery "UPDATE ja1_vars SET topic = """ & ja1_skipit & """ WHERE searchString = 'skipit'", ja1_tempVal
ja1_skipit = ""
Exit Function
End If
'----------------------------------------------------------------------------