On 2007-06-07, at 15:20.0, Brennan wrote:
On 6/1/07 at 8:07 AM, Maarten Sneep <[EMAIL PROTECTED]> wrote:
Unfortunately I haven't found a way to
store the application is a run time variable, so the best I came up
with for producing script sets for both applications is to use a sed
script on the text version of the scripts.
This version runs in BBEdit if available, otherwise TextWrangler:
tell application "Finder"
if exists file "BBEdit.app" in (path to applications folder) then
set theTextEditor to "BBEdit"
else if exists file "TextWrangler.app" in (path to applications
folder) then
set theTextEditor to "TextWrangler"
else
set theTextEditor to (choose application)
end if
end tell
-- testing
tell application theTextEditor
set tstart to (current date)
set m to make new document with properties {contents:"foo"}
tell front window
repeat 200 times
select insertion point after last line
set selection to ((current date) as text) & return
end repeat
end tell
end tell
display dialog (current date) - tstart
--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>