User Tag List

Results 1 to 9 of 9

Thread: [Request] INI object

  1. #1
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] INI object

    This object is very powerful because it's a simple and fast format and it can be edited with a simple text editor.

    Is it possible to update it to let us :
    - Count the number of groups
    - Count the number of items in a group
    - Load an INI from a string
    - Save the INI string loaded (and potentially modified) in a file

    The 3rd is the most important.

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    - Load an INI from a string
    Set current file -->

    Apppath$ + "mydirectory\" + "myini.ini"

    or

    Apppath$ + string$( "String" )

    This should work? Or do you mean something else?

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    He means loading an INI file from an INI formatted string in memory.

  4. #4
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    I was able to load an INI from an INI formatted string with no problem for my game with the level editor where it checks the main quest file to determine which area INI file to load for the starting area. As far as I know you just load the INI string in to a global string or whatever you need and then reference that as well as fill in any path information that may be missing so you have something like this:
    Set current file to <ENTER FILEPATH HERE>+GroupItemString$( "Your Ini", "Your Group", "Your File to Load")

    You might need two INI objects to pull it off, I've never tried one.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    Jam has understood what I mean.
    When I say "Load an INI from a string" I mean loading a string as an INI file without having it writed on the hard-drive.

    For example you have this string in a string object :
    Code:
    [myGroup]
    myItem=0
    [anotherGroup]
    anotherItem=2
    Then, with the action "Load a string as an INI file", you'll be able to get the value of "myItem" of the group "[myGroup]" without having any file on your hard-drive.

    I was maybe not clear about my request but, please, think a little more before answering.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    You might be able to do what you're after at the moment by converting to the Named Variable Object. I've recently done this to my game (which was pretty far ahead, so conversion was quite a large task) and it allows you to manipulate data in memory without writing it out to the hard drive all the time.

    It also supports the "count number of groups" and "number of items in a group" functions that you need by way of the Get Number of Items Starting With Substring expressions.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    I've search in Named Variable object and I can't found any function to initialize its content with the content of a string (without any file)... Which function I should use ?

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    There isn't a way to read in from a string directly (that I've found) - I parse the string through the String Parser object and add the content in a fastloop.

  9. #9
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] INI object

    Ho yes, I know we can do that but it's annoying... It's why I ask for this feature to be included in the INI object.

Similar Threads

  1. [Request] VST object
    By motorsk8er in forum Extension Development
    Replies: 12
    Last Post: 12th September 2010, 03:53 AM
  2. [Request] ID3 tag object
    By Liam72 in forum Extension Development
    Replies: 35
    Last Post: 24th January 2009, 01:56 PM
  3. [Request] Bag Object or [Proposal] Bag Object v2
    By Master_Maker in forum Extension Development
    Replies: 10
    Last Post: 30th November 2008, 06:32 PM
  4. Request OCR object.
    By DJFuego in forum Extension Development
    Replies: 0
    Last Post: 14th November 2008, 11:37 AM
  5. [request:]ping object? &small change to FTP object
    By DarkSmurf in forum Extension Development
    Replies: 1
    Last Post: 26th September 2007, 09:33 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
  •