Re: Store script as run only
Re: Store script as run only
- Subject: Re: Store script as run only
- From: Jens Eliasson <email@hidden>
- Date: Sat, 8 Apr 2006 17:33:18 +0200
8 apr 2006 kl. 15.50 skrev deivy petrescu:
On Apr 7, 2006, at 7:12, Jens Eliasson wrote:
I did a horrible mistake the other day. In a moment of mindslip I
managed to overwrite a script I had worked on for a while with the
run only option checked, and I didn't see the mistake before i had
closed the window. I partly acuse Script Editor for this, since it
feels really stupid to have implemented the make runtime into the
"Save as…" and not as a "Save copy". It all makes me feel like a
beginner, after having done scripting also commercially for quite
some years now.
Well this leaves me with two problems:
First to see if its possible to bring back the code from the
runtime version, at least partly. I have found Jon's Commands and
will see what it can do with its script coercion command.
Secondly I thought I would make a droplet that converts scripts to
run only into a different file. I tried the load script/store
script but se that it retains the script in its original state. I
had never thought about that before.
So does anyone know a way to store a script as runtime
independently of its original state?
Jens,
Ben (Waldie) thought me this one. It works excellently sometimes,
it fails miserably other times, but in times of desperation...
open the script editor, select the Event Log button at the bottom
and run the following script:
<script>
set k to load script file "path/to/readonly_script"
tell k to run
</script>
The log should give you some of your code.
Deivy
Well the the script in this case is really a code library with many
handlers that are used externally and some of the handlers in it are
nested. This makes it a bit more difficult to really dig out all the
logic in a strait forward manner. I have run some of the bigger
handler to event log like this that I will try to use in case I don't
remember well when I reconstruct. But I find the output a bit
cumbersome in respect to the code that produces the log.
Thanks/
Jens Eliasson, <email@hidden> _______________________________________________
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