User Tag List

Results 1 to 5 of 5

Thread: Search inside edit box for text, trigger event.

  1. #1
    No Products Registered

    Join Date
    Jun 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search inside edit box for text, trigger event.

    I am having trouble finding any tutorials or examples to help me out for searching.

    So heres what i need help for:

    I have an edit box with text inside it.
    I want to find the word "poop" inside that edit box.
    If the word "poop" is found, trigger an event.
    If the word "poop" is not found, trigger a different event.

    Sounds simple right? I just cant seem to figure out how to do this by either using the string parser, or some other object that does this in a very simple manner.

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search inside edit box for text, trigger event.

    you should just be able to use find. if it finds it it'll return 0 or higher; if not it will return -1:

    [Button pressed or whatever]
    + find(edittext$("Edit Box"), "poop", 0) >= 0
    --> [trigger event]

    [Button pressed or whatever]
    + find(edittext$("Edit Box"), "poop", 0) < 0
    --> [trigger other event]

    EDIT: it probably wouldn't be a bad idea to store the result of the find operation in a variable since you have to use the result twice

  3. #3
    No Products Registered

    Join Date
    Jun 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search inside edit box for text, trigger event.

    is that using the special object or what?

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search inside edit box for text, trigger event.

    yes

  5. #5
    No Products Registered

    Join Date
    Jun 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Search inside edit box for text, trigger event.

    i dont see a "find" option anywhere...

    Edit: nevermind. I found it under "compare 2 general values" and then when the dialog opens up, retrieve data from an object then select the special object. and further in the "strings" subcategory.

    blah. i knew it was simple and obvious. normally always is.

Similar Threads

  1. Edit application menu text from event editor
    By Kracker in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st October 2011, 07:05 PM
  2. trigger event when all enemies are same state
    By ionside in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 20th January 2010, 11:07 AM
  3. How would you trigger an event after a fastloop?
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th April 2009, 12:57 PM
  4. search inside files?
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 24th November 2008, 03:02 AM
  5. Search and edit sentence in text
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd August 2008, 05:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •