Re: Apropos of nothing
Re: Apropos of nothing
- Subject: Re: Apropos of nothing
- From: Mr Tea <email@hidden>
- Date: Fri, 04 Apr 2003 00:53:06 +0100
This from Michael P. Wilson - dated 03-04-03 08720 pm:
>
I really wish there was some systematic way of capturing all the
>
applescript code snippets that came through this list.
Hmm. Then you'd get all the hastily knocked up solutions that I post, _and_
the corrections that Mr Paul Berkowitz usually posts shortly afterwards.
;-)
Grabbing every script that got posted here would probably overload most
people, and also capture all the 'why doesn't this work' samples into the
bargain. But it is good to have a way to easily grab chunks of useful code.
For me, it's the Big Cat contextual menu item to the rescue again, with it's
ability to easily put AS to work on selected text. Here's a reasonably
robust script for use with Big Cat and Script Debugger.
--===========================================================
property theScriptFolder : "Studio!:Studio Files:Scripts X:New Scripts:"
on main(s)
set theFileName to (word 1 of s) & " " & (word 2 of s) & " " & (word 3
of s)
set theFile to theScriptFolder & theFileName
tell application "Finder" to set appActive to (exists (every process
whose creator type is "asDB"))
if not appActive then tell application "Script Debugger" to launch
tell application "Script Debugger"
make new window with properties {bounds:{42, 44, 890, 630}}
set the contents of window 1 to s
set counter to 1
repeat until not (exists file theFile of application "Finder")
set counter to counter + 1
set theFile to theFile & " [" & counter & "]"
end repeat
try
save window 1 in file theFile
on error
save window 1 as text script in file theFile
end try
end tell
end main
--===========================================================
(Any lines that abut the left margin of the message window have been wrapped
and should be re-connected to the end of the previous line.)
Incidentally, the script posted here was grabbed out of SD's front window
and formatted for posting by another script that I use for this purpose.
That's a bit of a time saver too.
...and this from Gnarlodious - dated 03-04-03 10707 pm:
>
I can't remember one flame war here in
>
2 years..
You haven't been reading any of the Mail threads, then?
Nick
pp Mr Tea
--
Coming soon: The Tea Caddy
_______________________________________________
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.