Re: adding links to html pages
Re: adding links to html pages
- Subject: Re: adding links to html pages
- From: Kelvin Aitken <email@hidden>
- Date: Mon, 21 Jul 2003 08:24:18 +1000
- Organization: Kelvin Aitken Photography
What I have is a few thousand web pages made in Photoshop and a few more
made in iPhoto. Both have the ability to batch create web pages with
thumbnails, links to larger images, other thumbnail pages, etc. What they
do not give you is the ability to add a link to a web site on each page
as they are created since the pages will be used as part of a larger web
site and not as a site in themselves.
So I want to make a script that will open each page and add a simple text
based URL link to the sites home page. I normally use Dreamweaver though
I can get BBEdit if need be. I tried Microsoft Word which has the ability
to add text and turn it into a URL link but the recorded script that I
make keeps giving me an error when it gets to the "make URL" part. Script
is as follows:
tell application "Microsoft Word"
activate
set contents of selection to "Home"
do Visual Basic " Selection.Find.ClearFormatting"
do Visual Basic " With Selection.Find
.Text = \"home\"
.Replacement.Text = \"\"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With"
do Visual Basic " Selection.Find.Execute"
do Visual Basic "
M__"
do Visual Basic " WordBasic.InsertHyperlink False, \"
http://www.kaphoto.com.au/\",
\"\", \"\", _
\"Home\""
set contents of selection to "
"
end tell
So what I am looking for is an applescript or a script for another
application that will open each page, paste in some text such as "Home",
turn it into a URL with an address like "
http://www.mysite.com" and then
save it.
Once I can get that to work I will then worry about customising where the
link goes on the page and maybe adding other information.
Maybe I am greedy but it would also be great to be able to take the
caption for the image out of Filemaker or the iPhoto comments field and
past it into the <Title> and/or <Meta> tags. Now that would be nifty.
Does anyone have any suggestions from past experience?
Kelvin.
Is there any way to make Applescript open a pre existing html file and
add a url to the page?
Most likely there is. Can you be a bit more specific?
Or maybe there is another way without using Applescript to batch
process a few hundred html files.
I'd probably use BBEdit for that, with or without AS. It's scriptable
& recordable. Depending on what you actually need to do, it may be
possible to just use plain AS.
Cheers,
O Penn-Sesame
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.