User Tag List

Results 1 to 5 of 5

Thread: Is it possible to write string to config files?

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Location
    Leeds, UK
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to write string to config files?

    Hi all,

    I have done this before with .ini files but I need some help on this one.

    I have a file named 'Scenery.cfg' where by it stores what scenery areas I have installed for FS2004.

    The layout is as follows:

    [Area.086]
    Title=FlyTampa-Vienna
    Local=C:\Program Files\Microsoft Games\Flight Simulator 9\Addon Scenery\FlyTampa-Vienna
    Remote=
    Active=TRUE
    Required=FALSE
    Layer=84

    [Area.087]
    Title=Nice LFMN 2005
    Local=simwings\Nice2005
    Remote=
    Active=TRUE
    Required=FALSE
    Layer=87
    Local is the location within the main FS2004 directory so it would be looking at: C:\Program Files\Microsoft Games\Flight Simulator 9\Addon Scenery\EHAM_5Runway

    Now I would like to automate adding the following:

    [Area.0XX]
    Title=EHAM_5Runway
    Local=Addon Scenery\EHAM_5Runway
    Remote=
    Active=TRUE
    Required=FALSE
    Layer=86
    The reason I put in the 'Area.0XX' is because I would need it to check which number follows on from the last integer in the previous string. So this would need to be 'Area.088'

    Is it possible to do this (in a similar way to the .ini file)?

    Thank you in advance for suggestions. If this isn't possible, I can type a document for a user to add the code manually but that does make it hard for them (the users who don't know what their doing).

    Pete [cool]

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Leeds, UK
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Is it possible to write string to config files?

    Actually guys I just realised something, the local code would have to coded as 'Local=Addon Scenery\EHAM_5Runway' rather than the whole directory as other users may have it installed somewhere different.

    Also, I setup my installer so that it installs into the main FS9 Directory (C:\Program Files\Microsoft Games\Flight Simulator 9\) - on my machine

    PS: Im using Install Creator Pro

  3. #3
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Is it possible to write string to config files?

    You can't do this with ICP, there is no way to add a section with a variable name. The only solution I see: create a little EXE that does it, and run it at the end of the install.

    Yves.

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Location
    Leeds, UK
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Is it possible to write string to config files?

    Right ok, thanks Yves.

    I didn't think it was possible. I will create the code for them and instruct the users with print screens on how to add the scenery to the library as it is only a case of editing this 'scenery.cfg' file so nothing too difficult

    Thanks again Pete.

    PS: Could you update the link on the main page for the ICP as I downloaded it only to realise that is was the wrong build which you updated for me (for the uninstall to work properly).

    Thanks

  5. #5
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Is it possible to write string to config files?

    PS: Could you update the link on the main page for the ICP as I downloaded it only to realise that is was the wrong build which you updated for me (for the uninstall to work properly).
    It's the correct build (#26) (but it says it's the build #25 in the download center, I forgot to update the text).

    Yves.

Similar Threads

  1. Can't write to array from global string
    By Filip in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 6th September 2013, 06:36 AM
  2. How can I open a *.config file?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 21st May 2012, 11:14 PM
  3. ICP - Change string in a eng / wag files in MSTS
    By aniceguy in forum Install Creator and Patch Maker
    Replies: 13
    Last Post: 25th February 2009, 04:57 PM
  4. I need help with this controller config mfa
    By Krim in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 1st December 2008, 09:29 PM
  5. How to write " in a string using Expression Editor
    By MelliGeorgiou in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 15th August 2006, 01:58 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
  •