Looking up a file pathname
Posted: Tue Jan 03, 2017 9:54 am
I have a folder full of sound files that are necessary for a stack I'm working on. It's working now on my machine, but I'd like to be able to give the stack and sound files to others, and that means I want them to work on other machines.
To do that, I want to use a script to establish the pathName (or is it called filepath?) for the folder full of sounds.
I think there's a way to do this, but I don't know how. There are a couple of necessary commands or functions I don't know.
--Click on a button
--I get a dialog box showing a directory of my hard drive.
--I navigate through the directory until I find the file or folder I want, select it.
--The long pathname of the file or folder gets returned somehow
--I can store the pathname in a field or something, so when the stack is first used on a new machine, a script will be able to find the designated file or folder
--If the script is unable to find the right folder, the user is prompted to identify it, as above.
I don't need all the details, just a few hints. If someone can give me the general idea, I'd sure appreciate it.
I'm on Mac OS, current version, LC Community Edition, version 8.1.2.
Thanks in advance,
Tim
To do that, I want to use a script to establish the pathName (or is it called filepath?) for the folder full of sounds.
I think there's a way to do this, but I don't know how. There are a couple of necessary commands or functions I don't know.
--Click on a button
--I get a dialog box showing a directory of my hard drive.
--I navigate through the directory until I find the file or folder I want, select it.
--The long pathname of the file or folder gets returned somehow
--I can store the pathname in a field or something, so when the stack is first used on a new machine, a script will be able to find the designated file or folder
--If the script is unable to find the right folder, the user is prompted to identify it, as above.
I don't need all the details, just a few hints. If someone can give me the general idea, I'd sure appreciate it.
I'm on Mac OS, current version, LC Community Edition, version 8.1.2.
Thanks in advance,
Tim