Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / July 2005



Tip: Looking for answers? Try searching our database.

Setting the selection in AppleScript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Evans - 26 Jul 2005 20:05 GMT
 Hey all.

 As part of a larger project, I want to be able to exit a script with
a certain item selected.  However, I can't seem to get even TextEdit
to select something for me.  This:

tell document 1 of application "TextEdit" to select first word

returns "word 1 of document 1 doesn't understand the select message."  I
tried

tell document 1 of application "TextEdit" to set selection to first word

and got "Can't make selection of document 1 into type reference."

 There must be something *really* obvious that I'm missing here, since
these look pretty much like the examples I've been able to find.  I'm
running on 10.4.2.

 Any advice?

Signature

David Evans
Faculty of Computer Science                     dfevans@bbcr.uwaterloo.ca
Dalhousie University, Halifax, Canada  http://bbcr.uwaterloo.ca/~dfevans/

Simon Slavin - 28 Jul 2005 20:38 GMT
On 26/07/2005, David Evans wrote in message
<dc61hf$o58$1@rumours.uwaterloo.ca>:

> As part of a larger project, I want to be able to exit a script with
> a certain item selected.  However, I can't seem to get even TextEdit
> to select something for me.

Post to alt.comp.lang.applescript with a subject line which mentions
selecting things in TextEdit.

Simon.
Signature

Using pre-release version of newsreader.
Please tell me if it does weird things.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.