Want to Make an Index for My Web Page
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Want to Make an Index for My Web Page
I have a web page with lots of stuff in it. I want an index of all the files in it so you can see at a glance what's in it and go to pages fast.
So, I'd like to have RunRev look into a folder named, say: allmywebpagefiles and import a list of all the file names.
Then I could alphabetize them and stick them onto an html document so I could navigate in a new way by clicking:
adobebuilding.html
dogs.html
houseondrurylane.html
myguitar.html
yosemitepark.html
zamoramexicotrip.html
Someone showed me how a long time ago, but I can't remember.
Thanks,
Tom
So, I'd like to have RunRev look into a folder named, say: allmywebpagefiles and import a list of all the file names.
Then I could alphabetize them and stick them onto an html document so I could navigate in a new way by clicking:
adobebuilding.html
dogs.html
houseondrurylane.html
myguitar.html
yosemitepark.html
zamoramexicotrip.html
Someone showed me how a long time ago, but I can't remember.
Thanks,
Tom
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Want to Make an Index for My Web Page
See the"files" function in the dictionary.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Want to Make an Index for My Web Page
Ah, I see this:
put the files into field "Current Files"
repeat with x = 1 to the number of lines of the detailed files
put the files & the folders into diskContents[the defaultFolder]
But how to I point it to the folder "allmysitefiles" or something.
I'm not very good at this. Has to do with the defaultFolder I should think.
Tom
put the files into field "Current Files"
repeat with x = 1 to the number of lines of the detailed files
put the files & the folders into diskContents[the defaultFolder]
But how to I point it to the folder "allmysitefiles" or something.
I'm not very good at this. Has to do with the defaultFolder I should think.
Tom
Re: Want to Make an Index for My Web Page
Hi Tom,
...
set the folder to "path/to/your/folder/allmysitefiles"
put the files into tFiles
...
"folder" is a shortcut for "defaultfolder"
Best
Klaus
...
set the folder to "path/to/your/folder/allmysitefiles"
put the files into tFiles
...
"folder" is a shortcut for "defaultfolder"
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Want to Make an Index for My Web Page
Klaus' post is very helpful. The only thing I would add is that you can let the user select a folder with the "answer folder" command.
And if you're dealing with folders at fixed locations, the specialFolderPath function may help for locating a good many specific folders on each OS.
And if you're dealing with folders at fixed locations, the specialFolderPath function may help for locating a good many specific folders on each OS.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Want to Make an Index for My Web Page
It works! I just wrote:
on mouseup
set the folder to "/users/tomcole/Backup Google Drive/more web Material/"
put the files into tFiles
put tfiles into cd fld "filelist"
end mouseup
Now I can have a huge list and you can search it and click to extract any specific sheep from the entire herd of sheep and goats and go to it at once.
Thank you very much!
Tom
on mouseup
set the folder to "/users/tomcole/Backup Google Drive/more web Material/"
put the files into tFiles
put tfiles into cd fld "filelist"
end mouseup
Now I can have a huge list and you can search it and click to extract any specific sheep from the entire herd of sheep and goats and go to it at once.
Thank you very much!
Tom
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Want to Make an Index for My Web Page
Hi Tom,
I'm glad to hear it's all working for you but wanted to give you a tip that may save you some headaches in the future.
Watch out for spaces in your paths, "Backup Google Drive/more web Material", urlEncode will fix it for you.
Nothing for you to do now but one day....
Simon
I'm glad to hear it's all working for you but wanted to give you a tip that may save you some headaches in the future.
Watch out for spaces in your paths, "Backup Google Drive/more web Material", urlEncode will fix it for you.
Nothing for you to do now but one day....
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Want to Make an Index for My Web Page
Thanks Simon.
Re: Want to Make an Index for My Web Page
HI Tom,
you can save some typing by overcoming old HC habits:
HC: put tfiles into cd fld "filelist"
LC: put tfiles into fld "filelist"
Spot the difference
Best
Klaus
you can save some typing by overcoming old HC habits:
HC: put tfiles into cd fld "filelist"
LC: put tfiles into fld "filelist"
Spot the difference
Best
Klaus
Re: Want to Make an Index for My Web Page
How did you know I was so old? It's nice to know that I belong to an exclusive group that knows abbreviations like HC.
Back to topic:
However, answer fld "filelist" gets me nothing.
Neither does answer bg fld "filelist"
But answer cd fld "filelist" seems to work.
Long live Bill Atkinson!
Tom
Back to topic:
However, answer fld "filelist" gets me nothing.
Neither does answer bg fld "filelist"
But answer cd fld "filelist" seems to work.
Long live Bill Atkinson!
Tom
Re: Want to Make an Index for My Web Page
Hm, just made a test with LC 6.7 and -> answer fld "Field1"
did actually work on OS X 10.10!
What version are you using?
did actually work on OS X 10.10!
What version are you using?
Re: Want to Make an Index for My Web Page
Oh, I have the new stuff, but I'm still using Studio 2.8.1 for many things.