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 > Enthusiast Zone > Classic Macs and Mac OS > Help with Applescript- text insert

Help with Applescript- text insert
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2000
Status: Offline
Reply With Quote
Nov 21, 2001, 01:43 AM
 
I work for the Daily Bruin (UCLA 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

-Derek
     
Junior Member
Join Date: Dec 1999
Location: USA
Status: Offline
Reply With Quote
Nov 21, 2001, 02:52 AM
 
This AppleScript will place the text between the quotes onto your Clipboard.   The script functions on OS 9.2.1 but I don't think it will work on OS 8.6 or lower.
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>tell application <font color = red>"Finder"</font>
activate
set the clipboard to <font color = red><font color = red>"Daily Bruin UCLA Newspaper <font color = blue>183</font> Main St."</font></font>
end tell</font>[/code]

Tom

[ 11-21-2001: Message edited by: Tom_O ]
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Nov 21, 2001, 07:35 PM
 
Tom: After it has been saved as an applet (which it will need to be for use as an fkey), the tell block becomes obsolete.

Just the line.. set the clipboard to "whatever" is needed.
     
Junior Member
Join Date: Dec 1999
Location: USA
Status: Offline
Reply With Quote
Nov 21, 2001, 08:57 PM
 
<font color = blue>Synotic</font> - Thank you! &nbsp; &nbsp; The less code the better! &nbsp; &nbsp; I appreciate the information.

<font color = blue>Tom</font>
     
   
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 -4. The time now is 06:54 AM.
All contents of these forums © 1995-2015 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2015, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2