Launching scripts from DragThing
Launching scripts from DragThing
- Subject: Launching scripts from DragThing
- From: WJ Shack <email@hidden>
- Date: Tue, 07 Jan 2003 08:39:35 -0600
I get some peculiar behavior when I try to use DragThing to launch AS. I
have four scripts which use the Satimage OSAX (OS X version) to change case
or clean up email text. They all have a similar structure:
on run {}
tell application "Microsoft Entourage"
activate
set theWindow to the front window
set theText to the selection of the theWindow
Statements then change case (lowercase, uppercase, word case) or use
Satimage change text to clean up quotes, leading spaces, tabs, extra
returns. This sample shows the lowercase example.
set newText to lowercase theText
try
set the selection of theWindow to newText
on error
display dialog "Cannot edit this message. Did you click the Edit
button?"
end try
end tell
end run
The clean text script does exactly what I expect. I click on the DT button
and DT comes to the front, Entourage activates and comes to the front, the
text is cleaned and I end up with Entourage as the front app. The uppercase
and word case samples almost work. The text is altered, but DT is the front
app when they are done, and I have to click on the ME window to make it the
front app. The lowercase example doesn't work, i.e., the text is not
altered.
All the scripts work from the Entourage menu, from the Quickeys menu or a QK
toolbar, but I wanted the vertical toolbar arrangement that DT provides. My
current workaround is to have DT launch an AS that calls the Quickey that
launches the actual AS. It works but obviously it slows things down. I
have a number of other AS that work as expected from DT. Is there some
trick I am missing to get consistent behavior from AS launched from DT?
_______________________________________________
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.