Want to Batch create Applescript scripts files

hi all,
am new to apple scripting…
the task i want to accomplish is as follows.

i have one sample AppleScript file which has script something like…

tell application “Finder”
activate
open file “pdf:a.pdf” of disk “mydisk”
end tell

i have a text file which have list of names of pdf files line by line as:
a.pdf
b.pdf
c.pdf

i need to take the get the pdf file name from the text file & replace it in the third line of the script - open file “pdf:b.pdf” for all the files.
then i need to save the script with the name of the pdf file… with format as “application”

Can anyone provide me a script that allow me create this batch process of SCRIPT FILE CREATION?

It will be very useful if u provide for otherwise i need to do it manually for around 5000 files…

thank u in advance!!
karthik

I just happened on this link…maybe it’ll help:

http://www.nobleswan.com/applescript/AS_snippets.html

This code demonstrates three separate methods for creating standalone AppleScript applications:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

hi jon,
its working fine for spawn types one & two… but for Script Editor type… the whole script Editor Application itself is quitting abruptly …
is it a problem of my script editor… is any scripting addition is missing?

karthik