take one phrase in the "string"
Hello, you can take from "string" a word even if this string are included in other characters such as:
I write a phrase on the edit box and use the function:
Always-edit box sets the value of "string"
everything that I write of edit box, is also written to string
I want, if I write the word on the edit box "Hello World" sets the Global value A to value = 1
This is simple, but I want the global value A is set to 1, even when I write "ftdrf hello world4"
is possible just take that word even if I hold most of the characters?
hello world, of course must be written correctly, but I was not able to find this function. please help me with a small example, or with a. I MMF2 Dev
Thanks
Re: take one phrase in the "string"
Special Object -> Find string in string
It's pretty self-explanatory (or read the help file).
Re: take one phrase in the "string"
Special Object??
I not find this extension on my mmf2 dev
Re: take one phrase in the "string"
comare two general values
string "pippo" = to string edit box "pippo"
set global value a=1
this is correct but
string "23pippogrg" = to string edit box "pippo"
set global value a=1
This is an condition particular
This is a special condition. I must find the word "Pippo" in a string even if the word foo is accompanied by other characters, like this example:
"Pippo" set glob val A = 1
"SASDPIPPO" set glob val A = 1
I have to find a system that when it finds the word "Pippo" into a "string", I can have in an event such as' example of adding one to the variable
Re: take one phrase in the "string"
Quote:
Originally Posted by daniele
Special Object??
I not find this extension on my mmf2 dev
It is the first/leftmost built-in object:
http://www.LB-Stuff.com/MMF2/SpecialObject.png
Right Click -> Strings -> Find String in String ;)
Re: take one phrase in the "string"
ld Hello, I'm sorry but I do not have that feature in the 'special item. I only compare to a global string, but that is not my function. maybe I have not explained well my problem.
you know the "search"
if I write "Pippo" is also search engine (pippop) or (aspippol)
I have a string that shows a word every few time.
if the string appears "pippols" or (asdfpipposd) I have to have an event. 's important is that I have to find a function that searches for the word "Pippo" although this word has other characters in it.
Re: take one phrase in the "string"
Use the Special object and use "compare two values" option. Then for one of the values you would pick the special object and choose the "find string" function, and the other value to compare to would be <> -1, as -1 means it did not find the string.
If the find string fuction finds the string, it will return the index of where the string starts... so a string like "asdf hello world" where you are finding string "hello world" will return the value 5. As "h" is at the index 5. Again, if the string is not found, the find string function will return -1.
Re: take one phrase in the "string"
Hello, I tried all day but I could not do this.
when I compare two objects, and after I go to find string, I get a function that I do not know and this is:
Find(>Enter string to look into<, >Enter string to look for<, >Enter first character<)
Please, can explain this expression?
I put the second object in the different value = -1
but when I go to write "close" nothing appears.
Please, if you know this little work, you may attach a sample file?
look this my example:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=download&Number=6225&filename=s pecial%20function%20character.mfa
you can also have a function that relies on the counter down, each time a character is entered in the edit box?
is very important for my voice-controlled software
thanks
Re: take one phrase in the "string"
You do it like this:
http://mfa.aquadasoft.com/view/1315527462-TypeCloseToClose
The parameters explain themselves literally ;)
Re: take one phrase in the "string"
hello LB, you have been exceptional. now my voice control software is spectacular.
this function is very precise because if you pronounce a phrase, even if it is present in the edit box of the characters, the instruction is made, however. without your support I do not know how.
I will still do so much publicity with my interface usb lab-domotic 3000 to be programmed with mmf2.
I'm publishing an 'other software for the card, LAB-voice control, which is essential to turn my 24 labdomotic 3000 relay card with software made MMF2.
I hope to always have your support and praise for this wonderful software.
Thanks alot.