Re: Better Open Dictionary/Selection in SE2
Re: Better Open Dictionary/Selection in SE2
- Subject: Re: Better Open Dictionary/Selection in SE2
- From: Philippe GRUCHET <email@hidden>
- Date: Thu, 6 Mar 2003 03:42:59 +0100
Steve Roy wrote:
tell application "Script Editor"
set theSelectedText to contents of selection of front document
From: John Delacour <email@hidden>
Interesting.
I had a notion Script Editor 2 might be a cocoa application and as
we've been told cocoa doesn't do selection -- that's why TextEdit and
Mail can't do it.
However this is the first application I've ever seen that can do
selection but not do 'selection as string', which is the most
Some examples:
1)
tell application "Script Editor"'s front document to set selection's
contents to "blah blah blah"
2)
tell application "Finder" to set thisPathname to selection
tell application "Script Editor"'s front document to set selection's
contents to "alias " & "\" " & thisPathname & "\""
3)
tell application "Script Editor"'s front document
set contents of selection to "tell application \"Finder\" to activate"
& return & "-- may not need to activate application" & return & return
& "tell application \"System Events\"" & return & tab & "tell
application process \"Finder\"" & return & tab & "-- place script
statements here," & return & "-- omitting 'of application process
\"<name>\"'" & return & "end tell" & return & "end tell" & return
check syntax
end tell
etc, etc. ;-)
Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.