• 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
Why O why is speech needed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why O why is speech needed?


  • Subject: Why O why is speech needed?
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 17 Dec 2014 00:24:00 +1100

G’day all

I’m trying to paste a number of copied Mail attachments into the end of a TextEdit document, in Yosemite, without success.

Used to be that key code 125 using {command down} worked, but now THAT key code is intercepted by the Yosemite Finder, and seems to open every item of the selected Finder window. Also, keystroke ASCII 19 doesn’t work.

Does anyone know of a way to place the insertion character at the end of a Yosemite TextEdit app, please?

I’d like to continue using TextEdit because my printing requirements for my app are simple, it has a low footprint, opens VERY fast, and I can close and reopen it to stop any memory leaks, because my app runs 24/7/365.

I’m also using it to modify saved Mail rtf documents, because lousy new Mail won’t save it’s documents with Attachments; the menu item is present, but greyed out. I open the rtf, paste in copied Attachments at the end, and a pop up sheet automatically opens and offers to save as an rtfd file. You can’t actually  click button 1 of sheet 1 of window 1  but that code is ignored, and I exit the setting loop. 

When saving the document, it’s saved as an rtfd.

I CAN use the following script to place the cursor at the end, but…

1. It needs the rtf to be opened well before I open the folder of attachments, and copy them ready for pasting, &

2. It’s so darn cumbersome.

NOTE: while composing this email, I had a brainwave; what if I send ‘down arrows’ to the rtf? I tried the following, and it works, PROVIDED I send at least a blank character to the speech utility; without it, the down arrows don’t work!!!!

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



 _______________________________________________
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: Deivy Petrescu <email@hidden>
  • Prev by Date: Re: Requesting help with saving 'Mail' attachments, please
  • Next by Date: Re: Why O why is speech needed?
  • Previous by thread: Re: Requesting help with saving 'Mail' attachments, please
  • Next by thread: Re: Why O why is speech needed?
  • Index(es):
    • Date
    • Thread