File path within program - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: File path within program (/showthread.php?tid=709) |
File path within program - james2464 - 08-01-2022 Hi, I'm following the tutorial at qb64sourcecode.com and because the sound files don't work I'm trying to understand why. Can anyone explain the way this command works? I've copied and pasted the tutorial folder in a few places and I got it working on one computer but not on a second one. So I clearly don't get it. The folder containing qb64.exe is where the tutorial folder is pasted, yet the "piano" and task 14 programs don't work. Phaser& = _SndOpen(".\tutorial\task14\Phaser.ogg") I was under the impression that this points to a location relative to the qb64.exe itself. But yeah I have no idea now. Edit: I can get this to work by removing all the folder info and just leaving the file name. Example ("Phaser.ogg") So I'm still unclear about ".\" At this point I'm assuming I must have installed qb64 in the wrong place in order for the tutorial paths to work as is. Either way thanks to the wiki I can test this with the '_fileexists' command. RE: File path within program - bplus - 08-01-2022 Under the Run Menu, if you have a bullet next to "Output EXE to Source Folder" you can have the compiled exe saved in the same folder as the bas file used to create it. Then you can keep all your project files under whatever Project folder you're working. Then all your paths need only be relative to that folder. Possible you might have Run bullet for EXE Option on one computer but forgot on the 2nd computer? Welcome to the forum James. RE: File path within program - james2464 - 08-01-2022 (08-01-2022, 06:31 PM)bplus Wrote: Under the Run Menu, if you have a bullet next to "Output EXE to Source Folder" you can have the compiled exe saved in the same folder as the bas file used to create it. Then you can keep all your project files under whatever Project folder you're working. Then all your paths need only be relative to that folder. Thank you, I'll make sure to note if this is bullet selected or not on both computers. Cheers! |