Hello, I'm a newbee to livecode and after several hours of trial and error, I finaly could not solve my issue maybe someone can help me with some lines of scrpting:
I managed to set a directoty path and put its content (filenames) into a field. Now I like to select a file ot of the list in the field and open that file (e.g. a CSV file) and put its content into a field to add some data with other activities. How can a filename be selected out of a list in a filed and then opend?
Thanks 4 ur help.
Best regards
Uli.
File handling and opening
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: File handling and opening
Hi Uli,
welcome to the forum!
Uli sounds very german, if you are german, there is also a german LC forum here:
http://www.livecode-blog.de/forums/foru ... ode-forum/
I presume you are talking about a list field that displays all your fielnames?
In that case use this script:
You get the picture.
Best
Klaus
welcome to the forum!
Uli sounds very german, if you are german, there is also a german LC forum here:
http://www.livecode-blog.de/forums/foru ... ode-forum/
I presume you are talking about a list field that displays all your fielnames?
In that case use this script:
Code: Select all
on mouseup
put the selectedtext of me into tSelection
## User clicked somehwere on the field, but did not select a line:
if tSelection = EMPTY then
exit mouseup
end if
## tSelection now contains the selected text
## I presume "the defaultfolder" is set to the folder containing all these files?
## if yes, you can:
put url("file:" & tSelection) into fld "your field for file display here"
end mouseup
Best
Klaus