Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Apple Script

Apple Script
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2000
Status: Offline
Reply With Quote
Nov 21, 2001, 12:44 AM
 
Where I work, we use a lot of pre-formatted text and I need a script that we can modify to insert one of several text strings upon pressing a button- like f12 etc. Anyone who could whip up a quick script or show me where/how to get one would be my best friend
(Last edited by LordSegan; Feb 27, 2009 at 11:07 PM. )
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Nov 21, 2001, 11:43 AM
 
Originally posted by LordSegan:
I work for the Daily ***** (It's a Newspaper). We use a lot of pre-formatted text and I need a script that we can modify to insert one of several text strings upon pressing a button- like f12 etc. Anyone who could whip up a quick script or show me where/how to get one would be my best friend
That really isn't what AppleScript is at all. There is this line to describe but it seems to have slipped my mind.. like an intra-communication script...thingy between apps.. something like that.

Basically AppleScript can control apps, edit settings, perform text and mathematical operations. But simulating keys or anything similar is out of AppleScript's bounds.

Unless you use a scripting addition such as Sandi's Commands to simulate key commands. Look at http://www.osaxen.com/ and download it.

Your script would look like this:


set the clipboard to "my favorite text"

TypeText "V" Command true

Or... if you don't want to take over the clipboard, look into AutoType (also available at osaxen.com).. the command would be:

AutoType "My favorite text."


Although I think you have to pay for that one...

Once you made your decision, save the script as an applet. Then go into the Keyboard control panel and assign a function key to the applet.

Also, this all assumes you are using OS 9. Otherwise, for OS X, you'll need to look into QuicKeys (ce.com)
(Last edited by Demonhood; Mar 2, 2009 at 10:15 AM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2