Files in folder with stand alone program?

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
TodayIsTheDay
Posts: 56
Joined: Sat Jun 20, 2009 2:41 pm

Files in folder with stand alone program?

Post by TodayIsTheDay » Sun Oct 04, 2009 9:22 pm

1. I want to have a list box that is filled with a list of files in a folder (I can do this part I think)

2. When I double click on one of the file names have that file open in whatever program (worddoc in word, etc)

3. How can I include the folder with these files in a stand alone?

Thanks!

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Post by Mark Smith » Mon Oct 05, 2009 12:08 am

When you fill in the field with the list of files, you could store the path to the folder as a custom property of the field, and then prepend it to the file name when it is clicked.

assume that this is in the script of the field:

Code: Select all

on ShowFiles pFolder
  set the directory to pFolder
  put the files into me
  set the currentFolder of me to pFolder
end ShowFiles
then, when a file name is clicked

Code: Select all

on mouseUp
   put line (word 2 of the clickLine) of me into tName
   put the currentFolder of me & "/" & tName into tFile
   -- launch tFile etc
end mouseUp


Best,

Mark Smith

TodayIsTheDay
Posts: 56
Joined: Sat Jun 20, 2009 2:41 pm

Post by TodayIsTheDay » Mon Oct 05, 2009 1:08 am

But in order to install the files / folders when a user installs the app, I'll have to use an installer program?

I saw how you could include files with a program but not folders.. (unless I missed something)

Post Reply