Appleworks Link to speak a message?

Hi there,

I’m a newbie to Applescripting.

Under OS-X, I’d like to make a “Hot Word” in an appleworks-6 word processing document. When you click on this word, the computer will speak the phrase “YES” or “NO” For instance:

How many days in a week?
   5    <--computer says "NO" if you click on this number
   7    <-- computer says "YES" if you click on this number
   8    <-- computer says "NO" if you click on this number

Perhaps I can do this entirely in Appleworks, but I can’t figure that out. Should I be using applescript? If so, what would it look like? And how would I link my Appleworks word processing document to the applescript?

MANY THANKS FOR ALL YOUR HELP!
=Cliff

type /say under each option so …
/say “NO”
or wutever …
hope i helped a little
but this is applescript … so … maybe it will work with a macro … doub it

Hi,

Where do you type:

/say “NO”?

Under what option?

Thanks,

Hi,

I haven’t figured out what Ugrax meant yet, so here’s another way?

In AppleWorks, create a Internet link. So for your text:

How many days in a week?
5
7
9

select say the “5”. You then create an Internet link and for the url use a local file url like:

“file:///Users/kel/Desktop/AW_Script”

Here AW_Script is a script application on my desktop with the statement:

say “no”

Now when you hit the “5” link, it will run the script application AW_Script. The bad part about this is that AW_Script is an app and will show in the dock. You can make it not show up as a running app by making the script app background only.

Another trickier way is to have AppleWorks open a Compiles Script and run it through a script runner. The script runner would be background only and you wouldn’t need to have a bunch of background only script apps, just one.

gl,

Hi,

I don’t know if you’re still following this thread, so here’s a quick idea of another way to do this.

It uses Play Sound:

http://microcosmsoftware.com/playsound/

Play Sound plays sound files from the background. Then you just need to make sound file of phrases such as “yes”, “no”, etc. You can make your own sounds or through AppleScript with something like this:

set the_phrase to “yes”
set dp to (path to desktop) as string
display dialog “Enter the name of this sound file:” default answer the_phrase
set file_name to text returned of result
set file_spec to (dp & file_name & “.aif”) as file specification
say “hello” saving to file_spec

Then just change the open with app to Play Sound. Then you just point your link in AppleWorks to the sound file.

You’re doing all this to play a sound in the background.

gl,