change content

hi
I really messed up
I have created many script to open up pdf files.
each script when runs open one pdf file.


property fileName : "epi01g01 .pdf"
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
	((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
try
	set targetFile to alias (the parentFolder & fileName)
on error
	return quit
end try
tell application "Finder"
	open file targetFile
end tell

it open up my file perfectly. But you know I did not type in path to the folder in script.

so my path is :

Now please can anybody tell me how can I add these target path in each script
i don’t want to open up each file and type in the path .

Please help me

Is a droplet acceptable? If you save this as an application, it will open files that are dropped onto the script’s icon.

on open
	tell application "Finder" to open selection
end open

– Rob

thanks rob
but i really need help with changing the content of script without opening it because they are lot.
thanks once again

o.k.
rob
i tried to drag and and open the script but as they are saved as application they just run and open the pdf files and not the script in applescript appliction
hope you got it.

I misunderstood you. I didn’t realize that you wanted to modify the content of the script.

all right rob
i think you got it now do you have any suggestions.

thanks

You will likely need to use a scriptable script editor such as Smile or Script Debugger.

– Rob

thanks
rob
I don’t know anything about the Smile or Script Debugger but I have to go after that because I have to get this thing done as soon as possible.
Thanks once again if you have any suggestion please let me know.

You might be able to use AppleScript’s ability to load and store scripts (Standard Additions) but I do not have enough experience with these commands to offer anything useful. If nobody offers a solution here, you might start a new topic with a different subject to see if some of the more experienced scripters can help.

Good luck!

– Rob