How to make Safari run a script?


I need to do this, Safari should speak out some words using Macs text-to-speech. This have to work only on one specific iMac we use here as a terminal.
Is this possible to do and how should I do it?

All ideas welcome! :slight_smile:


speaking text is no problem

say "hello world"

Yeah, that is not the problem but how do I get Safari to do that?
I mean, is it possible to call applescript from a certaine web page :rolleyes:

Is it somehow possible to make a web page that calls an AppleScript on the local mac? Or some other way that makes the local computer to say some words. It doesn’t have to be any possible mac, just this one local mac we use as a terminal …

Or even more short: is it possible to run an applescript from the web page?

I found this

<applescript:// 0dialog%20%22try%20me%22>

but it just loads the script to the editor … :frowning:

You can also use PHP.

Maybe you could explain more detailed what you’re going to accomplish.
The purpose is still quite “dunkel” (dark in english)

Well, I have here some typical but pretty complicated systems which are used with browser (Safari). I just thought it would be cool to get some stuff spoken out.

I really don’t know how to do that, is there a way to do some easy script stuff on the web page that would speak the crap? It should be text-to-speech, not pre-recorded.

Did this lighten up the darkness at all? :slight_smile:

How would the stuff to be spoken be identified? What would trigger the speech?

That would not be the problem for a php-page.
One of the many things I would love to have spoke out is that when I read the bar codes from products I could hear the product details. Now I have to see the display.

How about this idea - I make an applescript that checks non-stop some certain web page (B). If my main web page (A) wants to speak something out, it prints out the phrase to that web page (B) and then the applescript speaks it…
I don’t like this idea but it might be the easiest for me.

Is it possible to make an applescript like this?