Zabaware Forums > Programming using the Ultra Hal Brain Editor

Pick And Pull Scripts

<< < (2/2)

onthecuttingedge2005:
I still love candy.


--- Code: ---'As String translated from visual basic for use in vbscript.-As String.
Do While HalFeedBack = "  "', <-double spaces
'some reference to a table here as HalFeedBack. -on this line.
Delimiter = " "', one space. punctuation can be used here.
   HalFeedBack = Split(HalFeedBack, Delimiter)
   HalFeedBack = Join(HalFeedBack, Delimiter)
   HalFeedBack = Replace(HalFeedBack, "  ", " ", 1, - 1, vbTextCompare)
   'String output cleaned.
   'one can use ReadAll in this candy package as well.
   Loop

--- End code ---

this is for educational experience, you can change your flavor
of candy to whatever you like.
some people like butterscotch but I think I'll stick to my Licorice.

Happy Holidays for you and yours.
Jerry :)

onthecuttingedge2005:
'A wikipedia tag filter.


--- Code: ---'Rem Type=Plugin
'Rem Name=Wikipedia tag filter 01_03_2018
'Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
'Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Formats and removes wikipedia tags i.e [1] to [1000]."
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: CUSTOMMEM
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.
   
'wiki tag type Filter if existing tags exist.
For i = 1 To 1000
   OriginalSentence = Replace(OriginalSentence, ("[" & i & "]"), "", 1, - 1, vbTextCompare)
   UserSentence = Replace(UserSentence, ("[" & i & "]"), "", 1, - 1, vbTextCompare)
Next

 Rem PLUGIN: CUSTOMMEM2
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.

'wiki tag type Filter if existing tags exist.
For i = 1 To 1000
   GetResponse = Replace(GetResponse, ("[" & i & "]"), "", 1, - 1, vbTextCompare)
Next

--- End code ---

or download plug below, slip into your Hal 6 or 7 folder
choose plug via brain options.

Jerry 8)

onthecuttingedge2005:
'Math scripts will be added below over time.

Hi Rob.

You can add this to your Hal 7 Math script.

MathSent = Replace(MathSent, " IS?", " = ?", 1, -1, vbTextCompare)

works very well
Jerry

Navigation

[0] Message Index

[*] Previous page

Go to full version