Applescript to paste selected text into an application

Page 1 of 1 (1 items)
This post has 0 Replies | 2 Followers

Posts 61
David Sawyer | Forum Activity | Posted: Tue, Apr 20 2010 2:00 PM

I was having a play around with applescript and logos with the aim of being able to copy any selected text (e.g. part of a commentary you are reading) and paste into another application with one keysroke.

The Copy and Paste verse functionality will do this soon (and with good formatting) for verses, but looking at the windows version of Logos 4 there is no really quick way of doing the same with other text that you have open.

Here is my method:

1) In Automator start a new service action that requires no input from Logos (see attached screenshot)

It is important to select "no input" or it will not appear in the logos menu as we need it to.

2) Choose the applescipt action

3) Use the attached text file as the contents of the applescript box:



4) Save the action.

5) Go to "system preferences / keyboard " and choose the services section.  Scroll down until you find the name of the saved action.  Click to the right of the name and a box will open where you can hold down the keys you want to activate the action (e.g. cmd 9)

6) Now go back into Logos (you may need to restart it).  All being well if you now look in the service menu you should see the script you have just written.

7) Try it out by highlighting some text and pressing your shortcut!

These are pretty brief instructions - but it should be easy if you have used automator and assigned keystrokes before.  If not and you twist my arm I might be convinced to do more detailed notes.

I think this will prove pretty powerful in the future with some tweaking.  I have pasted into Pages, but there is no reason you can't paste into any application you use, just change the names in the text file.  I'm also going to try to come up with a version that applies a style to it as this method keeps the formatting of the Logos package (which is fine).

The one disadvantage is it doesn't currently reference the text you are pasting - this does happen on the PC so hopefully it will happen in a future Alpha version.

Does anyone else have any applescripts written yet?

Keep up the great work with the Logos updates, it was so cool to see my highlighting copied across from the PC version I have been using until now!

Page 1 of 1 (1 items) | RSS