• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why O why is speech needed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why O why is speech needed?


  • Subject: Re: Why O why is speech needed?
  • From: Deivy Petrescu <email@hidden>
  • Date: Tue, 16 Dec 2014 09:44:14 -0500

Brian:
I don’t understand your script since as far as I can tell you are copying and pasting a text over itself.
If you want to add text to a TE document, just add the text!

Pardon me if I did not understand your question, but this does what you want:

<script>
tell application "TextEdit" to tell document 1 to set its text to (its text) & return & nutext
</script>

Where nutext contains the text you want to add.


> On Dec 16, 2014, at 08:24 , Brian Christmas <email@hidden> wrote:
>
>
<snip>
> Any takers on WHY, please, or advice? Is there an easier way?
>
> Regards
>
> Santa
>
> 	tell application "TextEdit"
> 	activate
> 	tell document 1
> 		activate
> 		set paragraphCount to (paragraph count) as number
> 		say " " as text — < What does this do?
> 		tell application "System Events" to tell process "TextEdit"
> 			repeat paragraphCount times
> 				try
> 					# Down arrow
> 					key code 125
> 				end try
> 		 		end repeat
> 		end tell
> 	end tell
> 	end tell
>
>
> 		tell application "System Events" to tell application process "TextEdit"
> 			delay 0.1
> 			click menu item "Select All" of menu 1 of menu bar item "Edit" of menu bar 1
> 			delay 0.1
> 			click menu item "Copy" of menu 1 of menu bar item "Edit" of menu bar 1
> 			delay 0.2
> 			keystroke "v" using command down
> 		end tell
>



Deivy Petrescu
email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Why O why is speech needed?
      • From: Brian Christmas <email@hidden>
References: 
 >Why O why is speech needed? (From: Brian Christmas <email@hidden>)

  • Prev by Date: Why O why is speech needed?
  • Next by Date: ASObjC Runner, embedded in app bundle
  • Previous by thread: Why O why is speech needed?
  • Next by thread: Re: Why O why is speech needed?
  • Index(es):
    • Date
    • Thread