Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding Applescript code



Hi,

Normally it should work the way You described - I am doing that with my
code. Something you need to be aware is that a 'run only' has a
different extension- so that might be the reason Xcode does not compile
correctly. Another reason might be, that you don't use this 'using
terms...' stuff. Below is a basic AS, which you can use to convert a
script. You must have a compiled version of your application available.
Replace 'myApp' with the name of your application (and be aware of the
line breaks caused by the list mail handling).

--
theScript---------------------------------------------------------------
-------------------------------------------------
property start_line : "Using terms from application \"myApp\"" & return
property run_only_folder : ""

tell application "Script Editor"
set this_script_file to choose file
open this_script_file
set this_script to name of window 1
set paragraph 1 of document of window 1 to start_line & paragraph 1 of
document of window 1
set last paragraph of document of window 1 to last paragraph of
document of window 1 & return & "end using terms from"
if run_only_folder is "" then set run_only_folder to choose folder
set this_path to run_only_folder & this_script as text
save document of window 1 as "script" in this_path with run only
close document of window 1
end tell
--
endScript---------------------------------------------------------------
-------------------------------------------------

after converting select all scripts in the 'run_only_folder' and press
'command-i' and change the extension to 'applescript'.
SAVE your original files to a SECURE place and move the 'run only' into
the project's folder. Open the project again, clear all targets and
compile.

Hope that helps.

Andreas
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.