Re: Script Editor 'get selection'
Re: Script Editor 'get selection'
- Subject: Re: Script Editor 'get selection'
- From: Paul Skinner <email@hidden>
- Date: Wed, 5 Mar 2003 17:19:46 -0500
In this case I'm not sure your complaint is valid since selection is..
selection selection-object -- (inherited from the document class)
The current selection.
So you can't really get the selection of a window. And at least the
selection has properties in this app.
tell application "Script Editor"
properties of the selection of document 1
end tell
-->{class:selection-object, character range:{1, 3}, contents:"bob"}
so...
tell application "Script Editor"
contents of the selection of document 1
end tell
-->"bob"
On Wednesday, March 5, 2003, at 04:51 PM, John Delacour wrote:
Here are some more constructive comparisons
Latest Script Editor:
tell application "Script Editor"
try
get selection in window 2
on error e
e
--> "NSCannotCreateScriptCommandError"
end try
get selection of document 2
--> characters 11 thru 16 of document 2
get selection in document 2
--> characters 11 thru 16 of document 2
get selection of window 2
end tell
(Apple's other editor, WorldText, has a very reduced dictionary in the
Classic version and just aone line in the OS X version.
Other applications:
tell application "Eudora"
get selected text in window 1
end tell
--> some text
tell application "BBEdit 6.5"
get selection in window 1
--> characters 1 thru 9 of text window 1...
selection as string
--> "some text"
end tell
tell application "Scriptable Text Editor"
get selection in window 1
--> contents of document 1 of ...
selection as string
--> "some text"
end tell
tell application "Tex-Edit Plus"
get selection in window 1
--> "some text"
end tell
_______________________________________________
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.
_______________________________________________
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.