User Tag List

Results 1 to 2 of 2

Thread: RTF Object - Replace Selection

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RTF Object - Replace Selection

    Why does the RTF object's Replace Selection action trigger (and input the text) even if nothing is selected? Because there's no way to test whether or not text is selected, and there's no way to test how many of a single character exists in the RTF object, I don't see any way, for example, to change every "a" in the text to "c".

    Is there a work-around for this, or is it a known bug?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create a new condition from the Special object named Compare two general values.
    Take the first value from the Rich Edit object: Text > Get selection
    To know if something is selected you need to get the lenght of this string variable, so put it inbetween the Len() expression.
    Then set the comparison to different and the second value you can leave 0.

    So your condition should be Len(GetSelection$( "Rich Edit Object" ) ) <> 0 then something is selected.


    The Rich Edit isn't a string manipulator. If you want to count or change (single) signs you can use the String Parser object.

    At first you have to use Set source string. Then you can receive the number of substrings of one kind (here "a") exists in this string using the expression numberOfSub( "String Parser", "a" ).
    You also can change easily all "a" into "c" using the Set source string action again including the expression replace$( "String Parser", "a", "c" ).

    Just play around with the String Parser a bit. It can do a lot of string manipulation.

Similar Threads

  1. Replies: 7
    Last Post: 24th February 2014, 04:01 PM
  2. A way to reset/remove pattern from Substring Replace Auto Replace
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th January 2014, 05:08 PM
  3. Object selection
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 2nd September 2009, 10:56 PM
  4. Replace Object ??
    By RageO in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st May 2009, 06:12 AM
  5. Replace by Another Object
    By Pkeod in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th September 2006, 08:15 AM

Posting Permissions

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