User Tag List

Results 1 to 5 of 5

Thread: Problem with INI files for Android & iOs

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    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)
    kiko's Avatar
    Join Date
    Apr 2012
    Location
    Murcia -Spain
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Problem with INI files for Android & iOs

    I need create a INI file from a downloaded txt, but i can't open it with INI Object.

    The code is simple, but doesn't work:

    "String object" Received$( "Get Object" ) ---> Get from internet a new config for a new setup ini file.
    "File object" Create the file DataStorageDirectory$( "Android object")+"/setup.ini" ---> Create ini file.
    "File object" Append "String object" to DataStorageDirectory$( "Android object")+"/setup.ini" ----> Write ini file with downloaded string.
    "INI object" Set current file DataStorageDirectory$( "Android object")+"/setup.ini" ----> select the new ini file.


    I try without DataStorageDirectory$ and dosen't work.

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,015
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    First off, ditch the "/", they're not needed.

    Secondly, you don't need the file object to do this. Just check the INI property (Create INI file in Application Folder) this will automatically use the app cache folder specifically for your application. This will work flawlessly with the above method.
    Want to learn Clickteam Fusion 2.5?




  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    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)
    kiko's Avatar
    Join Date
    Apr 2012
    Location
    Murcia -Spain
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok,
    But i get a new config data for save it in a ini file from a php that returns a string with many parameters for config my app.
    For example the php can returns:
    [DATA]
    LASTUPDATE=20130530
    LINK=http://www.myweb.com
    NAME=My personal web
    DATA01=01
    DATA02=02
    ...
    ...

    Then i need to save this string in a ini file fo access it to a any individial data. I try to save this string with the "Set string" of INI object but then no can access to the individual data.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,363
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    I would not save it as an ini. Instead, you can parse the content using String tokenizer or String Parser, and run a loop to retrieve the values.

    It would be the easiest to use String Tokenizer and parse the content as 2D using newline$ and "=" as parameters.
    Then simply run a loop as many times as there is X-elements in the tokenizer, and compare item [loopindex("loop"), 0] to the item you want to retrieve.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    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)
    kiko's Avatar
    Join Date
    Apr 2012
    Location
    Murcia -Spain
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Popcorn View Post
    I would not save it as an ini. Instead, you can parse the content using String tokenizer or String Parser, and run a loop to retrieve the values.

    It would be the easiest to use String Tokenizer and parse the content as 2D using newline$ and "=" as parameters.
    Then simply run a loop as many times as there is X-elements in the tokenizer, and compare item [loopindex("loop"), 0] to the item you want to retrieve.
    You can send me an example?

    Sorry popcorn, i have my own example with the best and simple way:
    https://www.dropbox.com/s/nf3040092e...pplication.mfa

    Using Get object, String Parser, and INI object. It is very fast and easy to understand.

    Thank you

Similar Threads

  1. Keyboard problem android exporter
    By Dave78 in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 29th May 2014, 01:25 AM
  2. How do I save ini files with the android exporter???
    By johnnier in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 21st May 2013, 08:57 PM
  3. iOS example files compatable on Android device?
    By foyzul2002 in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 4th April 2013, 10:26 AM
  4. Question About INI Files & Android APKs
    By Rachel in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 4th September 2011, 10:51 AM
  5. Problem with external files.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th September 2008, 07:54 AM

Tags for this Thread

Posting Permissions

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