Source language: Translate to:

Question

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Question

Postby Neobook » Tue Nov 07, 2006 11:30 am

Hi,

I have a problem, and I need a string application but I don't
know how to do this :

When I write in TextEntry1 :
You will say to Catherine that I am in the baker on behalf of
Neobook

I click of a PushButton
The propertie of the PushButton is cuting and savin this :
Catherine; in the baker; Neobook
1 2 3

When Catherine write :
Where is Neobook ?

In the result it will be write :
Neobook is in the baker
3 is 2

Or

It cans have an automatic message all the 5 min :
Catherine, Neobook is in the baker
1 , 3 is 2


Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby carlos » Wed Nov 08, 2006 10:38 am

I ask you:


Your text is variable or always will be same?


Carlos
User avatar
carlos
 
Posts: 95
Joined: Sat Jul 01, 2006 10:45 pm
Location: Colombia

Postby Neobook » Wed Nov 08, 2006 10:55 am

It the same, it's mean it will be alwas :
You will say to * that I am * on behalf of *
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby carlos » Thu Nov 09, 2006 9:17 am

ok, first parse your phrase in separeted words

Code: Select all
StrParse "[TextEntry1]" " " "[Word]" "[Count_word]"


It code result the follow variables

    [Word1] = You
    [Word2] = will
    [Word3] = say
    [Word4] = to
    [Word5] = Catherine
    [Word6] = that
    [Word7] = I
    [Word8] = am
    [Word9] = in
    [Word10] = the
    [Word11] = baker
    [Word12] = on
    [Word13] = behalf
    [Word14] = of
    [Word15] = Neobook

You put other TextEntry2 with next code:

Code: Select all
If "[TextEntry2]" "=" "Where is Neobook?"
Setvar "[answer]" "[Word15] is [Word9] [Word10] [Word11]"
endif


And you can put a Timer with 60000 miliseconds by minute with next code:
Code: Select all
setvar "[minute]" "[minute]+1"
if "[minute]" "=" "5"
Setvar "[answer]" "[Word5], [Word15] is [Word9] [Word10] [Word11]"
endif


Ok, I hope that those codes work for you.

Carlos
User avatar
carlos
 
Posts: 95
Joined: Sat Jul 01, 2006 10:45 pm
Location: Colombia

Postby Neobook » Thu Nov 09, 2006 11:27 am

Thanks,

But if it's not Neobook or Catherine but Vadim or another, and if I go in hollyday or some share of other how can I do this ?

Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby carlos » Thu Nov 09, 2006 12:26 pm

I don't understand completly, but, If you modificate in TextEntry1 Catherine for Vladimir, this code will result.

and if you change neobook for vehicle, same.

Carlos
User avatar
carlos
 
Posts: 95
Joined: Sat Jul 01, 2006 10:45 pm
Location: Colombia

Postby Neobook » Fri Nov 10, 2006 10:33 am

Thanks,

But I f I write a another phrase, it will be not working

Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby dpayer » Fri Nov 10, 2006 10:47 am

Neobook wrote:Thanks,

But I f I write a another phrase, it will be not working

Thanks


Looks like you will need to write unique code for each unique phrase. Or make all your phrases be more universal.

D
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neobook » Fri Nov 10, 2006 10:49 am

No,

Is there not a another possibility ?
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby carlos » Fri Nov 10, 2006 10:55 am

No, you should explicate more your idea. And somebody maybe can help you.

Carlos

Tip. Maybe if you put a textentry for the name, for the site and complement. Or write all phrases and patronize them. I don't know.
User avatar
carlos
 
Posts: 95
Joined: Sat Jul 01, 2006 10:45 pm
Location: Colombia

Postby dpayer » Fri Nov 10, 2006 11:22 am

Neobook wrote:No,

Is there not a another possibility ?


Have you tried using magic or conjuring spirits for help?

If all else fails, you could actually contract with someone to do it for you.

D

(don't take my post too seriously, it was meant as a joke and not to ridicule you - Your rejection of a suggestion without offering any other information caused me to think you may not have considered all your options as of yet.)
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neobook » Fri Nov 10, 2006 11:26 am

When I write :
You will say to Catherine that I am in the baker on behalf of
-----a---- ------b------
Neobook
----c----

The program know the word and delete it :
You will say to that I am on behalf of
--------1------- -----2----- ------3------

So when some body write in the Text Entry :
Where is Neobook ?

the program do a full sentence with this : "," "is"
It's mean :
Catherine, Neobook is in the baker

The "," and the "is" are in the program, and it knows when it has take it


Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Neobook » Wed Nov 15, 2006 7:09 am

Help !!!
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby dpayer » Wed Nov 15, 2006 8:34 am

Neobook wrote:Help !!!


Remember the basics:

You are breaking sentances up into segments which you can identify as variables:

"hello, my name is David" can be expressed as:

"[greeting], [pronoun] [identifier] [verb] [firstname]"

And then when you gather information from the person, you use that instance of data in the variable to replace it in the sentance.

If you change the sentance, you have to be sure you have gathered the right data into variables that can be manipulated into a new sentance. If not, you need to gather the information before continuing. So if you change your phrase, you need to be sure you have a counterpart in the data you want to display. Example: if you have captured "neobook is in the bakery" and then someone asks, "when are you going on vacation" you don't have similar data.

You may need to 'suggest' data via a drop down list so it remains within context.

You may want to collect into a string or array or database information from anyone who interacts with your program so you can display the appropriate information as needed in your program.

I know English is not your native language so I hope my response is appropriate to your question.

David
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neobook » Sat Nov 18, 2006 9:24 am

Thank you David.

Have any budy an another idea ?

It's very important.

Thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Next

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron