Re: Organizing and searching through scripts
Re: Organizing and searching through scripts
- Subject: Re: Organizing and searching through scripts
- From: Martin Orpen <email@hidden>
- Date: Fri, 23 Apr 2004 20:38:08 +0100
on 23/4/04 2:42 pm, Rob Jorgensen at email@hidden wrote:
>
Maybe you are missing something but to each his own. I've created a
>
script that can quickly transfer a script's code, and related info,
>
from Script Debugger to a FileMaker database. It can also transfer a
>
script from the database to Script Debugger. I won't claim to use it
>
on every script but it offers a decent, simple way to store/track
>
code, notes, version info, release notes, read me, script
>
dependencies, etc. When I work on complex scripts, I use it to store
>
multiple revisions instead of commenting code or making multiple
>
copies of the script file.
I must admit that I was surprised that Script Editor has some terms that I'd
like to see in other apps - like "contents".
So I'm currently experimenting with something along the lines of:
set myScript to (choose file) as string
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".scpt"
set myAlias to text item 1 of myScript as string
set myAlias to myAlias & ".txt"
tell application "Script Editor"
open myScript
tell the front document
set myText to (contents as string) & return & return &
"Description: " & (description as string) & return & "File path: " &
myScript
end tell
end tell
set myDoc to open for access file myAlias with write permission
write myText to myDoc
close access myDoc
set AppleScript's text item delimiters to oldDelims
Which could be improved upon (a lot) but thought I'd post it as I'm
currently stranded on a train that has broken down :-(
Regards
--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.