User Tag List

Results 1 to 4 of 4

Thread: setting ini path, group, item from variables

  1. #1
    No Products Registered

    Join Date
    Apr 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    setting ini path, group, item from variables

    I have worked with ini files some and understand the basics. However, when I try to set the file path, group, etc. with a variable, the value of an edit box for example, it doesn't work at all. The file is not created or the group info is not recorded. With static info there is no problem. My best guess is that I am not entering the expression correctly in the expression calculator, although it doesn't give me an error. I write to set the ini file "C:\", Global String A, "test.txt" and nothing happens, even after I have assigned a value to Global String A. Without the global string part it works fine.

    Any help would be greatly appreciated.


  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: setting ini path, group, item from variables

    If the Global string stores the path you need to enter it like this

    "C:\"+Global String A+"test.txt"

    Why dont you just use Apppath$ which returns the working directory that the exe file is in? Or do you want to save to another directory?

  3. #3
    No Products Registered

    Join Date
    Apr 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: setting ini path, group, item from variables

    thanks for answering my question bigredron. I´ll have to look into the apppath$ thing. I´ve never used it before.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: setting ini path, group, item from variables

    Well, first if you'd use the expression "C:\"+Global String A+"test.txt", you'd have to add a backslash to the end of whatever string you insert in Global String A. Otherwise, if Global String A is "Hello" for example, your example would look for C:\Hellotest.txt

    Then, you should never point at an absolute drive or directory directly like that. You don't even know if your program is going to be located on C: on all computers. Use Apppath$ or one of the File object's path expressions. Those can give you the paths you're after on different computers with different setups.

Similar Threads

  1. [Request] INI - Change Group/Item Name
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th October 2012, 06:20 PM
  2. [BUG - Beta 32] INI - Setting value in group
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 3rd July 2012, 07:52 AM
  3. setting the ini path with .\
    By bradley in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 22nd May 2009, 04:19 PM
  4. Setting an INI file group
    By Eliyahu in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 24th June 2008, 05:01 PM
  5. Setting The Path In The File Obect
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th March 2007, 03: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
  •