Save "run only" scripts within applescript studio

I’m trying to protect a couple of my scripts. In script editor its easy enough to save them as “run only,” but I can’t find such an option for the builds in Applescript Studio.

I also found that I can open most of these scripts up (using Script Editor) from inside the Resources directory of the app and overwrite them with a run only script. That’s a fine solution, but in one case I have 4 handlers which deal with a progress bar. I get errors:

Can’t set «class indR» to true. Access not allowed.
Can’t set «class usTA» to true. Access not allowed.
Can’t set «class conT» to 0. Access not allowed…

and others, but ONLY within the tell statements for my progress bar.

If I remove these 4 handlers, the rest of the script compiles. I thought about putting them in another script file and loading them in, but to do that I still have to be able to compile them from Script Editor, which is the issue in the first place.

Any tricks for accomplishing this? Thanks for the help!

…in applescript studio, scripts are automatically saved as run-only. in fact, i’m not sure if it’s possible NOT to save them as run only.

I am not sure what you mean by run only, but as swwarmuth said, most of your scripts are only going to be applicable to your built app, so it’s not a “run-only” issue. From your verbage though, I gather that you are concerned not in the execution of the scripts, but rather in protecting it’s contents. In ASStudio, this is related to the “build style” rather than it’s run-only status.

There are two build styles in ASStudio. The default style is “development”, which you’re working under when you first create the app. The second is “deployment”. Under deployment style, your scripts are compiled and then saved as such, so little of their code is comprehensible when viewing their contents. When in Xcode, double click on your main project group in the “Groups & Files” list (the top one with the xcode icon). In the window that pops up (the Info window), select the ‘Styles’ tab… and then select “Deployment” from the “Active Build Style” pulldown menu. Rebuild your project, and you should have a deployment version of the app that either shows nothing or shows a illegible, compiled code in your script files. Note that some files, like scripts that you load programmatically MAY NOT be compiled. This may pose another problem for you that I have not the experience to comment on.

j

Well isn’t that clever. I knew it had to be something straightforward. I wasn’t even aware of the two types of builds. Thanks for clarifying!

I’m need to do the opposite.

I have a script in the package that I want to be able to install in the user scripts menu. I can do this fine, but the script is run only. I want it NOT to be run only. can this be changed?

Thanks