Three Applescript/Speech Questions....

Hey everyone! I just came across this site and thought id try and get these questions answered, i’ve tried at a couple other forums for a few days now but I don’t know if it’s because my questions are too noobish, complicated, or people are just annoyed by the fact that I haven’t gone and attempted to learn applescript and created these scripts myself, because i haven’t gotten any replies (or maybe i’m being too bloody impatient)… in any case, i’ll fire away:
First off, I was wondering if it was possible to make a script that would type letters you dictate into whatever text-field you had focused, for example, I could tell my computer to “start typing” and then say “H E L L O [space] W O R L D” “cease typing” and it would write that out for me…

My second question is a lot less complex - i think… is there a way to incorporate the non-editable applescripts in the Speakable Items Folder into a homemade script? For example, if I wanted Vicki to
on run
say “I’m Listening, How can I help you?” using “vicki”
{insert listen continuosly script}
end try
end run

when I say “listen continuosly”…
so basically i just want some predefined feedback before it launches the script.

Third, I’d like to know how to create Alert boxes with multiple buttons, that go to different places on my computer/internet, example:
the filename in the Speakable Items folder might be “Show me some entertainment” and up would pop a confirmation box titled “what would you like to view?” with three options, one leading to my movies folder on my HD, another opening my games folder (or even better, launching a random game from a pre-defined list), and the third button launching Yahoo! Entertainment or something (or even better, launching a random website from a list or from my Entertainment bookmarks folder.

I know that this is quite a mouthfull, but if anyone can answer any of these questions or point me in the right direction it would be most appreciated - I love my new (first) Mac and it’s been so fun messing around with Speech, and i kinda have the conception that anything is possible with Applescript, but i’m a complete noob so I really don’t know quite how complicated these scripts would be to create.
Thanks in advance!:lol:

I haven’t played with speech so I’ll leave those questions for someone who has. Tiger supports several forms of alert/dialog/choose boxes. Alerts and Dialogs are restricted to 3 buttons, but if the choices available exceed three, then there is a ‘choose from list’ option that permits the user to choose one, more than one, or no items from a list presented. Finally, AppleScript permits the return of a typed answer.

set choice to button returned of (display dialog "Which way do you want to go?" buttons {"Left", "Center", "Right"} default button "Center")
set Ans to text returned of (display dialog "Please enter your name." default answer "Name" buttons {"Cancel", "Done"} default button "Done")
set Dir to (choose from list {"Left", "Right", "Up", "Down", "Bullseye"} with multiple selections allowed and empty selection allowed) -- hold down command key to make multiple selections
Dir -- returns a list, empty if no choice made.

If you haven’t used this forum before, I should mention that clicking on the link at the top of each script will open that script in your Script Editor.

I assume you’ve played with this instruction:

say "Welcome to MacScripter and b b s dot applescript dot net"

Thanks for your response Adam, i’m getting pretty close to what i wanted to achieve in Question 3:

	say "ah. you want entertainment?"
	say "muahahaha" using "Hysterical"
end try
set choice to button returned of (display dialog "What kind of entertainment would you like me to display?" buttons {"Video", "Images", "Web"} default button "Video")
if choice is equal to "Video" then
	tell application "Finder"
		open "Macintosh HD:Users:abramfreitas:Movies"
	end tell
end if

if choice is equal to "Images" then
	tell application "Finder"
		open "Macintosh HD:Users:abramfreitas:Pictures"
	end tell
end if

if choice is equal to "Web" then
	set choice2 to (choose from list {"Site1", "Site2", "Site3", "Site4", "Site5"} with multiple selections allowed and empty selection allowed) -- hold down command key to make multiple selections
	if choice2 is equal to"Site1" then
		tell application "Safari"
			open ""
		end tell
	end if
end if

but the last bit dosn’t really work, it doesnt do anything at all… i’m thinking it’s due to the fact that Safari dosn’t recognize the command “open”… what is the command to go to a URL? and, is there are way to view all the commands that individual apps recognize?

You almost have it. Just add “location” to this

open ""

making it

open location ""