Re: Script Editor 'get selection'
Re: Script Editor 'get selection'
- Subject: Re: Script Editor 'get selection'
- From: Philippe GRUCHET <email@hidden>
- Date: Thu, 6 Mar 2003 03:42:47 +0100
From: Paul Skinner <email@hidden>
tell application "Script Editor"
try
get selection in window 2
on error e
e
-->Script Editor got an error: An error of type 10 has occurred.
end try
get selection of document 2
--> Script Editor got an error: An error of type 1 has occurred.
get selection in document 2
--> Script Editor got an error: An error of type 1 has occurred.
get selection of window 2
-->Script Editor got an error: An error of type 10 has occurred.
end tell
Take a look at this:
tell application "Script Editor"
if exists document 2 then contents of selection of document 2
--> the selected text, or "" if no selection
end tell
tell application "Script Editor"
if exists document 2 then selection
--> characters x thru y of document 2
--> insertion point before character x of text of document 2, if no
selection
end tell
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.