AppleScript to Make/Create another AppleScript Application

So I have this AppleScript, and it is a droplet… It works if I do all this manually, but it kinda defeats the purpose of this application… I want to be able to drag a file onto it and have it make another Custom-to-that-dropped-file AppleScript.

Like this:

on run
	-- set theDroppedItem to ("") as alias
	open theItem

end run

And I want a new runnable app to be created for each ‘theItem’ that is dropped on this droplet.

What is the purpose?

I left out a few lines of code:

on run
	-- set theItem to ("") as alias
	do shell script "" with administrator privileges
	open theItem
	delay 1
end run

it is a simple little AppleScript to lock applications.

a droplet requires an open handler. The usual syntax is

on open theItems -- list of dropped aliases
	repeat with anItem in theItems
		-- do something (anItem is an alias)
	end repeat
end open

thanks, but you totally didnt answer my question, you told me something else… O:) can you tell how to make new AppleScript’s within ur script please O:)

Script Editor is a scriptable Application so you could make new document with that or you could write text to file then use the shell osacompile.