User Tag List

Results 1 to 6 of 6

Thread: INI++ Replace NewLine$ in string with a delimiter or just remove NewLine$

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    139
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    INI++ Replace NewLine$ in string with a delimiter or just remove NewLine$

    I am trying to figure out if it's possible to have an ini file handled with the INI++ object remove line breaks (i.e. carriage returns / NewLine$) from the file so a value can be retrieved from multiple lines?

    For example:

    [group]
    item=this is one string on one line
    [group2]
    item=this is one
    continuous string on two lines


    I can use any number of string replacer or parser objects to remove a TAB and replace it with a delimiter, or just an empty "", but no matter what I do to remove a line break, including cutting and pasting a carriage return, or using NewLine$ as a line break, I cannot get fusion to recognize the line break in an INI file.

    I played around with enabling "Escape characters" in the INI++ properties but that didn't seem to help.

    Has anyone been able to get Fusion 2.5 to load a string from an item with a line break?

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    369
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Substring Replace Unicode
    When adding the text on the expression editor, use it to replace newline$ with "" or " " if you need a space

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    139
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Substring Replace Unicode
    When adding the text on the expression editor, use it to replace newline$ with "" or " " if you need a space
    I appreciate the suggestion, but it doesn't work.

    I have attached a sample so you can see my attempt to implement this.

    https://gofile.io/d/ccpePc

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    139
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post

    I forgot I could upload and attach files here.

    substring replace test.zip

  5. #5
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2006
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation here you go

    I use personally use weird named delimiters in ini for new lines and tabs
    so in the ini
    item1=this is line 1(?NeWlInE?)this is line 2
    Code:
    Replace$( "Substring Replace Unicode", GetItemString$( "Ini++ v1.5 Object", "group1", "item1", "" ), "(?NeWlInE?)", " " )
    I haven't had success with using Unicode characters as delimiters with ini++.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    139
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've been doing that as well, but I wanted to be able to have multiple lines in an ini file work as a single item, so instead of using a code as a delimiter I could use a NewLine$ as a delimiter, and maybe even some tabs, so my ini file could be easier to read. For example, using your delimiter, the current way looks like this:

    item1=string1(?NeWlInE?)string2(?NeWlInE?)string3(?NeWlInE?)string4(?NeWlInE?)string5(?NeWlInE?)string6(?NeWlInE?)string7(?NeWlInE?)string8(?NeWlInE?)

    But if we can get Fusion to recognize a NewLine$ in an INI++ file, it could look like this:

    item1=
    string1

    string2
    string3
    string4
    string5
    string6
    string7
    string8


    Quote Originally Posted by bubba_damage View Post
    I use personally use weird named delimiters in ini for new lines and tabs
    so in the ini
    item1=this is line 1(?NeWlInE?)this is line 2
    Code:
    Replace$( "Substring Replace Unicode", GetItemString$( "Ini++ v1.5 Object", "group1", "item1", "" ), "(?NeWlInE?)", " " )
    I haven't had success with using Unicode characters as delimiters with ini++.

Similar Threads

  1. StringParser2 Replace newline$ does not work for me
    By StingRay in forum iOS Export Module 2.5
    Replies: 0
    Last Post: 18th July 2014, 05:05 PM
  2. help with newline$ in string object
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 13th January 2014, 06:05 PM
  3. String, the length before a newline problem. Could use help :)
    By Radical in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 11th November 2013, 07:43 PM
  4. [BUG 256.34] newline$ char in String object
    By Olivier in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th February 2013, 06:27 AM
  5. Beta RC3- [BUG] Newline$ as Delimiter
    By Kisguri in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 3rd January 2013, 09:54 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
  •