LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on mouseUp
answer folder "choose folder"
if it is empty then exit mouseUp
put it into tTitles
open url tTitles , "/Test.txt"
set the label of button "Button2" to line 1 of url tTitles , "/Test.txt"
end mouseUp
If anyone could offer a tip as to where I'm falling over it would be much appreciated.
on mouseUp
answer file "choose file:"
if it is empty then exit mouseUp
put url ("file:"&it) into tData
set the label of button "Button2" to line 1 of tData
end mouseUp
Thanks for the response. I'm loading other files from that folder, hence the line
" open url tTitles , "/Test.txt".
The file is Test.txt located in the same folder and want to put the first few lines of that txt file into the label of some buttons.
Even with that script change you suggested it did'nt work so I must be doing something else wrong in the script???
on mouseUp
answer folder ""
if it = "" or the result = "cancel" then
exit mouseUp
end if
put url ("file:" & it & "/test.txt") into contentOfFile
set the label of button 1 to lie 1 of contentOfFile
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode