Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Textedit: How t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 1564 of 1611
Post > Topic >>

Textedit: How to replace text

by biz@[EMAIL PROTECTED] Jan 27, 2008 at 03:11 PM

Hi there,
Can anyone tell me please how to replace a text string in Textedit?
This is what I have:

set AppleScript's text item delimiters to ","
tell application "TextEdit"
	set allText to text of document 1
get text item 2 of allText --(correctly gets me the word I want to
replace)
set text item 2 of allText to "flower" -- does not work

end tell

This statement give me an error: set text item 2 of allText to
"flower". Hard to understand why this wouldn't work and any help very
much appreciated. Thank you.




 10 Posts in Topic:
Textedit: How to replace text
biz@[EMAIL PROTECTED]   2008-01-27 15:11:57 
Private Message
   2008-01-27 18:08:11 
Private Message
   2008-01-27 21:00:25 
Private Message
   2008-01-28 00:24:51 
Private Message
   2008-01-28 10:34:31 
Private Message
   2008-01-27 21:10:01 
Private Message
   2008-01-27 22:29:14 
Private Message
   2008-01-28 01:05:26 
Private Message
   2008-01-28 00:17:21 
Private Message
   2008-01-28 10:48:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 17:31:12 CDT 2008.