I am in the process of developing a revolution program. Every one of my cards imports an image. I want to be able to save the program to a CD rom and then once my students get the CD rom to be able to install the standalone program onto their computer. Or maybe even just run off of the CD rom. In developing this program on my "C" drive what folder or drive do I save all my work in? The reason i ask this is that I do not want to go back and have to recode every card to find the image once the program is in final stage and saved to the CD rom since it has been developed and saved on my "C" drive. Does Revolution allow for this? The other question is can I have the program operate just like a new program, meaning can a student get the CD and it runs thru all the appropriate questions to install it on their C drive and then it is standalone on their drive? Other password questions and anti-copy questions to come after I get myself clear on this on.
Stu
Kinda confused
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
Re: Kinda confused
Hi Stuart,
It looks like what you need is to declare all your files by reference to where the stack with your application is. To do so,
You can then reference all your files relative to this path.topstack() value
or you can use the set default folder construct to set this one as your active directory.
Marielle
It looks like what you need is to declare all your files by reference to where the stack with your application is. To do so,
Code: Select all
function path.topstack
put (the effective filename of the topstack) into tPath
set the itemDelimiter to "/"
if the number of items in tPath > 1 then
return item 1 to -2 of tPath
else
return item 1 of tPath
end if
end path.topstack
Code: Select all
put ("file:" & path.topstack() & "/" & "subfolder/" & "file.ext") into tURL
put tFileContent into URL tURL
put URL tURL into tFileContent
Code: Select all
set the defaultfolder to path.topstack()
put ("file:" & "subfolder/" & "file.ext") into tURL
put the files
put the folders