Re: Copy to clipboard when non supported?
Re: Copy to clipboard when non supported?
- Subject: Re: Copy to clipboard when non supported?
- From: ehsan saffari <email@hidden>
- Date: Sat, 12 Jan 2002 04:52:24 -0600
On 11/01/2002 00:03, Dale Saukerson <email@hidden> wrote:
>
OK, I've got a working script for dialing a phone number from a web page.
>
But I want to improve it.
>
>
The copy command is not in the Internet Explorer (don't hiss...)
>
dictionary. So I've built a workaround using QuicKeys. But I'd like
>
to share the script with a couple of friends who do not use QuicKeys
>
but do have AppleScript installed.
>
>
QuicKeys copies the web page data to the clipboard, then launches an
>
Applet that sends the appropriate commands to Acid Jazz (Yes, I know
>
I can get rid of the Applet).
>
>
Is there a OSAX that can do a copy from the edit menu when that app
>
that does not directly support it?
>
Or how would *you* work around an non existing copy command?
Let me go off on a tangent! You mentioned Apple Data Detectors in your
other post and that got me thinking. If you and other users have ADD
installed, it can dial phone numbers via Acid Jazz from any app without
having to copy anything.
Here's the Detector, you need the Detector Editor application to define
it (it's part of the ADD installation):
--Detector name: Dale
Digit = [0123456789]
Digits = Digit+
Seperator = {"(",")","-"," "}
Seperators= Seperator+
Phone Number = <Detects Phone Numbers.>,
{(Seperator)*,Digit, Digit, Digit, (Seperator)*, Digit, Digit, Digit,
(Seperator)*, Digit,Digit, Digit, Digit}
--And here's the Action Script:
on handle detection inData
set myPhone to detected text of inData
tell application "Acid Jazz"
activate
Dial Phone myPhone
end tell
end handle detection
--and here's the text that must be inserted in the description field of
the script:
Dale::Phone Number! -- Name of detector to handle
Dial Phone Number with AcidJazz -- Contextual menu string
This action dials the detected phone number with Acid Jazz --
Description of action displayed in control panel
--------
Works fine here in, I set Acid Jazz to dial thru the speaker for testing
and the detection occurs in every app I tried, at least with Nporth
American style phone numbers.
cheers
ehsan