User Tag List

Results 1 to 9 of 9

Thread: Accessing "C:\Users\USERNAME\AppData\Roaming\Clickteam\o ffli ne3.INI"

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessing "C:\Users\USERNAME\AppData\Roaming\Clickteam\o ffli ne3.INI"

    Hi

    I want to the file object to be able to destroy files located at "C:\Users\USERNAME\AppData\Roaming\Clickteam\ (since there's where mmf puts ini files for high score objects), but I can't figure out what to replace USERNAME with? When I input my account name it works for example, the exact code "C:\Users\Xeeko\AppData\Roaming\Clickteam\offline3 .INI" works perfectly for me, but what is the generic username code? I thought it was %username, but that didn't work.

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Personally, I have never used the high score object, but, I would imagine you could change the save file directory. Try using something like Apppath$+"/scores.ini" If you can't change the save file then that is ridiculous and you should make your own custom high score system, which really you should do anyway. Here are two alternate methods:

    http://www.create-games.com/download.asp?id=8684
    http://www.whenthereisnoroominhellth...ighscores2.mfa

    Currently, neither save to a file, but both save to an array, which you can save to and load from a file.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The high score object works just fine, I just need to know what the general name for %username, in a directory, is.

  4. #4
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,009
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Xeeko, either the YASO object or Windows object can retrieve the current user folder. It is labeled something like %currentuser%\AppData\Roaming\Clickteam
    Want to learn Clickteam Fusion 2.5?




  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The File Object is the easiest way to get the path to the User directory. Look under its expressions and there is a list of directories Windows uses.

    But you can avoid doing this by changing the save location of the INI file. Use the Hi-Score Object's "Set current file" action and save it to whatever path you like.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The Application Data folder is a "special folder", meaning it changes depending on the operating system. In Vista and above, it is %USERPROFILE%\AppData\Roaming. In Windows 2000 and XP, it is %USERPROFILE%\Application Data. Windows 95/98/ME doesn't even have one.

    Saving your highscores file in the same directory as your application means your application will function correctly regardless of the users operating system. Encrypt the file to prevent tampering.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro
    Corlagon's Avatar
    Join Date
    Jul 2006
    Location
    a basement in Muenster
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChrisBurrows View Post
    The Application Data folder is a "special folder", meaning it changes depending on the operating system. In Vista and above, it is %USERPROFILE%\AppData\Roaming. In Windows 2000 and XP, it is %USERPROFILE%\Application Data. Windows 95/98/ME doesn't even have one.
    Windows 98 already had it (Outlook Express already used it).

    Quote Originally Posted by ChrisBurrows View Post
    Saving your highscores file in the same directory as your application means your application will function correctly regardless of the users operating system.
    Only if you're still talking about Windows 95/98/ME. XP and later no longer allow writing to the program directory (unless the program being run has administrator priviledges, which is why installers ask for those).

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    A clean install of Windows 98 has no Application Data/App data folder. Outlook Express and other applications create it when they are installed.

    The "App Data" folder is a special folder and will use a different name depending on the operating system.

    And, you can write to the program directory, and, you can write to any other directory.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using the "OS Object", you could use this:
    Code:
    GetEnvVar$( "OS", "APPDATA")+"\Clickteam\offline3.INI"
    (assuming your "OS Object" is called "OS")

    That'll resolve to "%APPDATA%\Clickteam\offline3.INI". I use it in my own apps for save locations, etc.

Similar Threads

  1. Any ideas to "read" the username from phpbb?
    By dinktheboss in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 12th October 2012, 01:09 PM
  2. Issues with "Clickteam Movement Controller" and "Runtime" Object
    By jimmyorpheus in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 29th November 2011, 08:10 AM
  3. Installing files to "My documents" of all users
    By PeterT in forum Install Creator and Patch Maker
    Replies: 8
    Last Post: 8th March 2011, 03:44 PM
  4. Vitalize 4 et le site internet "clickteam"
    By alain in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th January 2008, 04:21 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
  •