Open the Script Editor in Applications/Applescript.
Type
say "Hello"
'Save as' , for File Format choose 'Application bundle', make sure that none of the Options checkboxes are checked. GIve it a title and save it somewhere convenient.
Now go to System Preferences>Accounts and click the 'Login itmes' button. Click the '+' button below the list and navigate to your script.
Now this will run on every startup and say "Hello" (or whatever you type in beetween the double quotes) - not they must be double, not single, quotes.
Here is a more sophisticated script you might like to try; just paste it into the Script Editor:
set d to (current date) as string
set e to time of (current date)
set ex to time string of (current date) as string
set hr to word 1 of ex
set min to word 2 of ex
set tm to hr & " " & min as string
set f to "46800"
set g to "61200"
if e comes before f then
try
say "Good morning"
end try
else
if e comes after g then
try
say "Good evening"
end try
else
try
say "Good afternoon"
end try
end if
end if
set h to 1st word of d
set i to 2nd word of d
set j to 3rd word of d
if j = 1 then
set l to "st"
else if j = 2 then
set l to "nd"
else if j = 3 then
set l to "rd"
else if j = 21 then
set l to "st"
else if j = 22 then
set l to "nd"
else if j = "23" then
set l to "rd"
else if j = "31" then
set l to "st"
else
set l to "th"
end if
set k to "It's " & tm & " on " & h & " " & i & " " & j & l
Save it to whatever name. Run chmod u+x whatevername and drag it to SysPref/Accts/login item
You can say more than just hello with the paste(ie: hello and good day, etc.) Test before dragging by
running ./whatevername
Using Terminal is perhaps complicating a simple matter unnecessarily; Applescript is very straightforward. Also, I would tend to feel that one should be reluctant to encourage inexperienced users to get involved with the Terminal, given the damage you can do with a bit of carelesness.
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
How Can I get my Mac to say .... Hello ... on Boot Up
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.