osacompile
osacompile
- Subject: osacompile
- From: Luther Fuller <email@hidden>
- Date: Tue, 8 Nov 2005 11:03:56 -0600
Was "Editable?"
The reason I needed to read the 'run-only' flag of a file,
if such a thing exists, was so that I could avoid compiling
an already compiled script with osacompile.
Here's the script I'm using for test purposes ...
on open dropList
if (count items of dropList) > 1 then return
tell application "Finder"
set srcFile to (item 1 of dropList) as alias
if (class of item srcFile) is not application file then return
-- not an application
if creator type of srcFile is not in {"aplt", "dplt"} then
return -- not an applescript
-- need a test here to kick out a file whose run-only is true
set AppName to my getFileName(srcFile)
set outFolder to (path to desktop folder) as alias
end tell
set inFile to quoted form of (POSIX path of srcFile)
set outFile to quoted form of (POSIX path of outFolder & AppName & "C.app")
"osacompile -o " & outFile & " -x " & inFile
do shell script the result
end open
It will compile ANY AppleScript application ...
even if it's run-only, which seems silly!
The 'outFile' is always an application bundle and it's fully functional.
I would like to see comments from anyone with experience using osacompile.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden