User Tag List

Results 1 to 6 of 6

Thread: Is there a list of the $AppDir, etc. terms? Can they be used by ini object?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a list of the $AppDir, etc. terms? Can they be used by ini object?

    OK. So I thought I understood INIs and saving, and apparently I was waaaaay off. Longish post inc, sorry about that.

    I'm using Windows 8, first off.

    Like most MMF stuff, I found a tutorial that touched on my issue rather quickly. How do I save to external file? THE INI OBJECT!

    So I used the INI object like I was told - Making an event at the start of frame that set the INI's file to AppDir$+AppDrive$+"bz1data.ini"

    This appeared to work - so off I went, seemingly saving / loading just fine. However, as soon as I built a proper, installer version of the game, things stopped working properly. After a bit of scouring the forums, and opening the file during play, it appears that the default Program Files location has a permissions issue with saving files. Totally understandable.

    Then I tried something different - I removed the Start of Frame events, and just set "bz1data.ini" as the text field after double-clicking the INI object on the canvas / mmf editor screen. This was weird - it didn't save reliably and I couldn't find the file. I'm realizing that I need to grasp how this object works, rather than just regurgitate exactly what was worded in the tutorial.

    Also, I read that something called Apppath$ exists - and elsewhere, AppDataDirectory$( "File" )

    1) What are all these Apppath$, AppDir$, etc? Is there a list of them somewhere?

    2) Am I using them properly? setting the INI object using them? I never know where to look if I need to know syntax.... Everything's cool when I'm right clicking / selecting things from dropdowns, but as soon as I need to enter stuff like this, I never know why / how, or where to turn for reference.

    3) What is AppDataDirectory$( "File" ) ? Where would I set this? I tried double-clicking the INI object and using this string (and changing "File" to my "bz1data.ini"), but it didn't like the syntax. I tried this as a Start of Frame -> INI Object -> Set file string as well - no dice, bad syntax.

    I feel like I'm making this way more complicated than it is... I've just hit a wall all day on this and I can't seem to find enough info in my forum hunting to get me anywhere....

  2. #2
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    swerdmurd,

    I've run into the same problem that you did. If you save your INI file to your application folder, it will run fine on your computer but not on another computer. It will run under Windows 95 but not under Windows 7. It will run if you place your app directory outside of the Program Files folder but not inside of it. To make it work on all machines you should use the AppDataDirectory$("File"). I did this quite awhile ago. Let me see if I can dig up the code that f

    __________________________________________________ __________________________________________________ __________________________________________________ _______
    From someone else's previous post:

    So I did some searching and it looks as though the line to save in this folder is either AppDataDirectory$( "File" ) or AllUsersAppDataDirectory$( "File" ). So I'm wondering which is better to be using for save data? From what I understand, the first one stores the data for the current user logged on, and the second one stores it for everybody. To me it would make sense to store it for all users, but I want to make sure I'm understanding the syntax correctly.

    Normally you should use the user account's application data folder. Remember that if one user creates a file in the "all users" application data folder, other users will have read-only access to it.

    It's more normal for a program's setting to be specific to the current user anyway. Making settings shared between users is more an exception and should only be done when your program have a specific need for this. I only do it for game serials, since I figure "unlocking" a game should apply to all users automatically.

    There are also roaming users and for the sake of them, it makes more sense to store settings to the user account's application data.

    For multiple users who want to read/write to the same file I used the YASO Object's GlobalSharedDocuments$.
    Not sure, maybe this object is for MMF Dev only.

    __________________________________________________ __________________________________________________ _______

  3. #3
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In one project, I used an array to store the data and the file object to save the file. Here is a sample file and location.

    Appdrive$+Appdir$+"sounds\yourfilename.snd"

    STeve

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apppath$ is exactly equal to Appdrive$+Appdir$, so you can use that instead. You can retrieve them from the Special object in the expression editor.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's the difference between the file object and the ini object? Will I lose any usability / OS portability by using it instead of ini?

    It seems, from the response, that I'm only able to detect the App Data folder using the File object. If I'm using the ini object, I'm stuck either searching out the installation folder using Apppath$, or reading from / writing to wherever it defaults do by just entering the name (which I have to do when exporting iOS or android).

    Is there any way to use a string argument like AppDataDirectory$("File") using the ini object?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    swerdmurd's Avatar
    Join Date
    Apr 2013
    Location
    Austin, TX
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the heads up Jacob - didn't ever look in this part of this submenu before!

    After trying all 6 options, I can't see much of a difference between Apppath$ and AppTempPath, and the BinaryFile one was a little weird / wasn't sure how that was supposed to work. Didn't look like any "sniffed out" the AppData folder though..

Similar Threads

  1. appdir$ + appdir$ ?
    By OveMelaa in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 7th April 2013, 04:01 PM
  2. What's the equivalent to appdir$ on a Mac ?
    By TheDigitalAlchemist in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th April 2012, 07:43 PM
  3. Windows Vista can't handle Appdrive$+appdir$...
    By Appdrive in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 12th February 2008, 10:27 AM

Posting Permissions

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