Re: OS X AND TypeText (You CAN do it with Youpi Key 1.7)
Re: OS X AND TypeText (You CAN do it with Youpi Key 1.7)
- Subject: Re: OS X AND TypeText (You CAN do it with Youpi Key 1.7)
- From: Mr Tea <email@hidden>
- Date: Tue, 23 Apr 2002 00:27:49 +0100
This from Daniel A. Shockley - dated 22/4/02 10.05 pm:
>
Perhaps I'm missing something, but I don't see any way to run Youpi
>
shortcuts or sets from a script.
Are you using 1.7? Its dictionary contains the standard suite, text suite
and a selection of useful Youpi specific terminology, and it also runs
scripts.
After recommending it on the list, I thought I'd better try it out instead
of just keeping it around for a rainy day. I came up with a useful thing to
do in Script Editor that uses a combination of DragThing and Youpi Key to
emulate the functions of a OneClick Palette that I use with Script Editor in
OS 9.
In Youpi Key I built a 'sequence' shortcut that copies selected text in a
Script editor document, wraps the text in brackets with AppleScript, then
pastes it back in place.
This is the script, which is written or pasted directly into the Youpi Key
editor window:
tell application "Script Editor"
activate
set thePaste to "(" & (the clipboard) & ")"
set the clipboard to thePaste
end tell
Other, similar sequence shortcuts wrap selected text in quotes, braces and
bracket/asterisk combos. I can run them with a keyboard shortcut specified
in Youpi Key, from the Youpi Key menu, or with a script. I usually trigger
the shortcut with a script run from my 'Script Editor-specific' DragThing
dock, which reads like this:
tell application "Youpi Key" to run shortcut "Bracket" of shortcutset
"Script Editor"
That simple.
NB - the activate command at the top of the script that Youpi Key runs is
particularly essential when running the shortcut from the Youpi Key menu (or
if you like redundancy, with a script from the script menu). Both options
shove the Script Editor (or any other frontmost app that shortcuts are being
sent to) into the background temporarily, causing all manner of problems
with the 'cut' and 'paste' functions.
Hope this clears things up.
Mr Tea
--
Brew of the day: Lapsang Souchong
Visit the Tea Room at:
http://homepage.mac.com/mrtea/tearoom.html
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.