User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: safest syntax for loading from the same folder?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    safest syntax for loading from the same folder?

    I'm making a program that needs to load images from the same folder as the executable file. currnetly I'm using:
    ".\example.png"

    But I read someone mention that that might not work on every system?

    Is that the case? Is there another way about it?

    thanks.

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    apppath$ + "file.ext" should be good

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    Thanks much xyzzy.

    Anyone ever have any issues with apppath$? Speak now or forever hold your peace.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    Quote Originally Posted by HolyMonkey
    Anyone ever have any issues with apppath$? Speak now or forever hold your peace.
    No, so far...

  5. #5
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    i've even been fine with just having the filename alone in quotes, without the "./"

    i dunno if that's reliable or not, though

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    I think safe is safe: Why not using the full path (Apppath$ etc.)?
    This hurts nobody...

  7. #7
    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)

    Re: safest syntax for loading from the same folder?

    Apppath$ is what I always use. It is, however, not nice enough to provide us with a backslash at the end. You will have to do:

    apppath$ + "\file.ext"

  8. #8
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    Just the filename will (probably) use the current working directory. This might not be what you expect it to be (as it can be changed).

  9. #9
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: safest syntax for loading from the same folder?

    I've always used Appdrive$ + Appdir$ myself, I just use it out of habit, but I've never had any problems with it, backslash or not.

  10. #10
    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)

    Re: safest syntax for loading from the same folder?

    I use Apppath$ just because it's one function and not two.

    Appdrive$ + Appdir$ provides a backslash at the end I believe. Maybe in Appdrive$ + Appdir$ + "\file.ext", Windows (or MMF2) interprets the double blackslash as a single one.

    Either way, it should work.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Safest and most universal way to write/read registry key value ?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2013, 11:06 PM
  2. Empty Folder in AppData Folder
    By TJM in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 26th October 2012, 01:36 PM
  3. Folder attributes? Folder Size, created ETC?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th May 2009, 04:42 AM
  4. syntax when loading images from a subfolder
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th January 2008, 06:46 AM
  5. How to add Company folder before Game folder?
    By Neonotso in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th February 2007, 10:02 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
  •