This is my first time using applescript studio, so I decided to make a real simple application to get used to it. Its weird. Because I knew how to do next to nothing in Studio, I grabbed a quick button tutorial (http://macscripter.net/viewtopic.php?id=24751), which as you can see, makes up most of the script for my app. But I didn't necessarily like what the tutorial made, so I modified the script to suit my purposes.
My goal is to make an application where you choose a voice, type in some words, and the computer will talk to you (Rather than going to settings every time).
Yet I keep getting the same error. (The "Take me to your leader" part is what I typed in.)
My goal is to make an application where you choose a voice, type in some words, and the computer will talk to you (Rather than going to settings every time).
Yet I keep getting the same error. (The "Take me to your leader" part is what I typed in.)
Code:
on clicked theObject
if title of theObject = "Quit" then
quit
else if title of theObject = "Process" then
display dialog "Say.." default answer "" buttons {"Say it!", "Go back"}
set wordstosay to text returned of result
if button returned of result = "Say it!" then say wordstosay using voice
end if
end clicked
on choose menu item theObject
set voice to the title of current menu item of theObject
end choose menu item
on launched theObject
tell window 1
set title of button "button1" to "Quit"
set title of button "button2" to "Process"
set thePopupItems to {"Alex", "Agnes", "Bad News", "Bells", "Cellos", "Good News", "Pipe Organ", "Whisper", "Zarvox"}
tell menu of popup button 1
delete every menu item
repeat with aMenuItem in thePopupItems
make new menu item at end of menu items with properties {title:aMenuItem}
end repeat
end tell
end tell
end launched