Relative File Name

Klaus Major k_major at os.surf2000.de
Sat Feb 15 12:25:01 EST 2003


Hi Scott,

> I have a stack with several images in it that I would like to store in 
> an external file.  Instead of having the filename of of the images 
> then point to the exact location of a file, I would like to have them 
> point just to a folder and the image name.  For example, if I have a 
> folder called images, I want to be able to set the filename to 
> "images/image1.gif," rather than something like 
> "c:\program\images\image1.gif."  Is there any way to do this?
>
> Scott Slaugh

just add this to your preopenstack-handler:

...
get the effective filename of this stack
set the itemdel to "/"
delete item -1 of it
set the directory to it
## Now the defaulkt-folder is the folder
## where this stack is in...
...

 From now on, relative paths will work :-)

Hope that helps.


Have a nice weekend.


Regards

Klaus Major
k_major at os.surf2000.de




More information about the use-livecode mailing list