dupa

Author Topic: user name resonse in plug in. what's correct?  (Read 2587 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
user name resonse in plug in. what's correct?
« on: September 04, 2014, 12:27:13 pm »
I am wondering if anyone knows for sure the correct way to get the user name response to work correctly within a sentence in a plug in response . :)
example

Randomize
Select Case int(rnd()*8)
Case 1
GetResponse = "It's a nice day<user name> isn't it? "
Case 2
GetResponse = "   "
Case 3
GetResponse = "   "
Case 4
GetResponse = "   "
Case 5
GetResponse = "   "
Case 6
GetResponse = "   "
Case 7
GetResponse = "   "
Case 8
GetResponse = "   "
End Select
HalBrain.ReadOnlyMode = False
End If


would this be correct to get hal to say my user name in a response back in a plug in or is is all one word    >username<   
or will this work that way at all?

 ???
 

onthecuttingedge2005

  • Guest
Re: user name resonse in plug in. what's correct?
« Reply #1 on: September 04, 2014, 03:07:38 pm »
Hi Lightspeed.

Hal has a table called hello1 that does the same thing as what you're trying to do.

but if you want to practice your code then

Code: [Select]

Randomize
Select Case int(rnd()*2
Case 1
GetResponse = "It's a nice day " & username & " isn't it? "
Case 2
GetResponse = "   "

End Select


if you want to put it in a table then you can use the <username> tag within the sentence or statement.
« Last Edit: September 04, 2014, 03:10:48 pm by onthecuttingedge2005 »

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Re: user name resonse in plug in. what's correct?
« Reply #2 on: September 04, 2014, 03:56:58 pm »
And don't forget the second parenthesis.
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Re: user name resonse in plug in. what's correct?
« Reply #3 on: September 05, 2014, 08:43:54 am »
thanks for the response, from you both and I will try it out in a test one when I have time , gotta pay bills today and get groceries etc. and i'll remember thanks to art about the second parenthesis !  :) ;)
Art know's I'm forgetful !