Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: spydaz on November 11, 2006, 08:10:57 pm
-
'RESPOND : HALCAPITALS
If InStr(userinput, "WHAT") > 0 Or InStr(userinput, "WHERE") > 0 Then
If Len(halbrain.UsCaps(userinput)) > 4 Then
capitals = Trim(halbrain.UsCaps(userinput))
End If
If Len(halbrain.WorldCaps(userinput)) > 4 Then
capitals = Trim(halbrain.WorldCaps(userinput))
End If
If capitals <> "" Then
GeTResponse = GeTResponse & capitals & " . " & vbCrLf
SearchWords = ""
If SearchWords = "" Then SearchWords = halbrain.SearchPattern(UCase(capitals), "THE CAPITAL OF * IS *", 2)
path = "http://www.google.com/local?q=" + SearchWords
'NEEDED THE command to open webrowser & PATH
HalCommands = "<RUNPROG>" & path & "</RUNPROG>"
HalCommands = HalCommands
End If
End If
-
quote:
Originally posted by spydaz
'RESPOND : HALCAPITALS
If InStr(userinput, "WHAT") > 0 Or InStr(userinput, "WHERE") > 0 Then
If Len(halbrain.UsCaps(userinput)) > 4 Then
capitals = Trim(halbrain.UsCaps(userinput))
End If
If Len(halbrain.WorldCaps(userinput)) > 4 Then
capitals = Trim(halbrain.WorldCaps(userinput))
End If
If capitals <> "" Then
GeTResponse = GeTResponse & capitals & " . " & vbCrLf
SearchWords = ""
If SearchWords = "" Then SearchWords = halbrain.SearchPattern(UCase(capitals), "THE CAPITAL OF * IS *", 2)
path = "http://www.google.com/local?q=" + SearchWords
'NEEDED THE command to open webrowser & PATH
HalCommands = "<RUNPROG>" & path & "</RUNPROG>"
HalCommands = HalCommands
End If
End If
a hal5 script NEEDS CONVERTING TO HAL6 (im on hal5) This plugin is an extestion to the original It just opens the location of the capital city inside google search engine. Taken from the websurfer plugin thanks.