Stopping Quark's 'say'

Joined
Sep 29, 2008
Messages
6
Reaction score
0
The page-layout program QuarkXpress doesn't do Services, such as speaking text, and it does its own thing with its private clipboard, so I have finally figured out an Applescript that speaks selected text in the program.

It works just fine. I often use it for proofreading purposes, where I'll have it speak parts of articles to me, and I listen for text errors. But sometimes, the phone rings in the middle of this, or somebody comes into the office, and I want the speaking to stop.

Command F5 (the VoiceOver toggle) doesn't work. Command-period doesn't work. Escape doesn't work. The Say boolean "stopping current speech" doesn't seem to work, or, if it does, I can't figure out how to script it properly. Basically, I just want a simple Applescript that says, "Stop talking. Do it now."

How can I stop the talk in mid-'say'?

Thanks.

For others in the Quark boat who want to hear it speak, here's the script:

Code:
tell application "QuarkXPress"
	set textStuff to selection as string
	say textStuff
end tell
 
Joined
Nov 26, 2010
Messages
3,540
Reaction score
51
Not sure there is a simple way.
You could break textStuff into sentences, then loop though those with a check for key press on each loop, but I'm still not sure that would work, and it would tie up the Mac in such a loop.

The other though is to
tell application "Finder"
say textStuff
end tell

that might get escape working.
 
Joined
Sep 29, 2008
Messages
6
Reaction score
0
Not sure there is a simple way.
You could break textStuff into sentences, then loop though those with a check for key press on each loop, but I'm still not sure that would work, and it would tie up the Mac in such a loop.

The other though is to
tell application "Finder"
say textStuff
end tell

that might get escape working.

Hey, thanks, Kaveman! Two ideas for the price of 1!

First idea: It might be less intensive to use paragraphs. I'll explore that. I might also combine that with an instruction first to turn the sound off until the interruption loop engages, and then restore it. After all, the main concept is silence. Hmmm... programming... (mumble, mumble) ... carry the two (mumble, mumble)...

Other bright ideas still gratefully accepted.

The second idea was a good one, too, but had no effect. Neither escape nor Command-period worked with Finder doing the say.

It's quite possible the relatively tiny amount of data and text sent to the speech mechanism easily fills a buffer, and it's then spooled without intervention and with some protection, in order to keep the computer's other secondary background systems from interrupting briefly and thus screwing up the voice timing, which is easily noticed. But that's just speculation on my part.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top