Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Not if you know what you're doing.

Code:
cd /you/have/to/do/the/full/pathname
chmod a+x greet.sh

Works just fine.

The Drag and Drop + Script Editor approaches are better though.

B

what's the point of changing the directory if you're just going to be doing one thing there? You still have to either type the whole file path or drag the file into terminal once either way :rolleyes:

"not if you know what you're doing" pfft
 
what's the point of changing the directory if you're just going to be doing one thing there? You still have to either type the whole file path or drag the file into terminal once either way :rolleyes:

"not if you know what you're doing" pfft
FWIW, my goal was to explain why it didn't work and provide some "glue" to make it work without changing the other steps. This is how we learn, before we start taking shortcuts, of which there are plenty.

I'm a 30+ year CLI veteran, starting with the Apple ][. Just remember there are many ways to skin cats in unix, it all depends on your POV. Personally, I'm in love with tab key completion and would use that over drag & drop any day.

B
 
OP, to make it easier for you try this to create the script.

In Terminal:

cd ~
echo 'say "Hello Mac User"' > ~/greet.sh
chmod ugo+x ~/greet.sh


You should be able to copy and paste the above commands into your Terminal session.


Then in System Preferences/Accounts/ in your Login Items, add this script just created with the plus (+) symbol. The file will be in your username folder.

Hope this helps.
 
OP, to make it easier for you try this to create the script.

In Terminal:

cd ~
echo 'say "Hello Mac User"' > ~/greet.sh
chmod ugo+x ~/greet.sh


You should be able to copy and paste the above commands into your Terminal session.


Then in System Preferences/Accounts/ in your Login Items, add this script just created with the plus (+) symbol. The file will be in your username folder.

Hope this helps.

Did this EXACTLY, and it is not working for me. Have you tried this on Leopard? Wondering why it's not working for me. I did it earlier exactly same. Either way typing or copy pasting it, it just opens the text file in text editor when I login.
 
Did this EXACTLY, and it is not working for me. Have you tried this on Leopard? Wondering why it's not working for me. I did it earlier exactly same. Either way typing or copy pasting it, it just opens the text file in text editor when I login.

the Apple script way I suggested earlier is fool proof and doesn't require fancy unix knowledge.
 
did you make sure to save it as an application, not a script?

I tried your way it definitely does work.

Launch Script Editor (Type in Spotlight Script Editor and enter)

type exactly what he said ie;

say "Hello Line Here"
Quit


File Save As > Select Application
Check Run Only

and boom done.

add it to log in items in sys prefs and it should be golden.


pretty cool tweaks ;)
 
Why don't we just do it like this? You can open the attached application in Script Editor to play with the greeting to your heart's content.
 

Attachments

  • greeting.app.zip
    17 KB · Views: 80
Another option, in Terminal:
Code:
cd Desktop
say -o startup.aiff "Welcome to macintosh."

Then you'll have a sound file called "startup.aiff" on the desktop that you can add as a startup item.
 
Thanks a bunch everyone i got it to work using Tuffluffjimmy's solution and im sure the others work just as well im just not that good with terminal
 
Thanks a bunch everyone i got it to work using Tuffluffjimmy's solution and im sure the others work just as well im just not that good with terminal

Score!

and for what it's worth I finally got the other suggested terminal tips to work, however they opened a terminal window every startup which is a little annoying...
 
k so now that ive been experimenting in script editor ive run into another problem how do you make a pause between like " how are u" and "thats great"
so i can respond ??
 
did you make sure to save it as an application, not a script?

In your original post, it didn't say to save as application. THAT WORKED! Now it works for me. I am still upset it doesn't work the other way. I want to know what I am doing wrong with the shell file. Definitely saved as text only.

Anyways, nice to have it working through script editor. Only problem was not saving as "application." Need to update original post to include that so others do it right. Nice addition to my Mac!

Thanks for the help. A lot of people will be interested in this thread.
 
k so now that ive been experimenting in script editor ive run into another problem how do you make a pause between like " how are u" and "thats great"
so i can respond ??

You can embed pauses in the text with punctuation (commas, periods, semicolons, colons, ...), as well as embedded commands, like slnc (silence) http://developer.apple.com/document...mingGuide/SpeechSynthesisProgrammingGuide.pdf.

Use the slnc (silence) embedded speech command. You can add an arbitrary amount of silence anywhere in the text by inserting the [[slnc x]] command (where x is a number of milliseconds). For example, inserting extra silence between the items in a list makes it easier for people to take note of each item. Listen to the following sentence, which lists four items, separated by commas:

Don't forget to bring your hat, sunglasses, sandals, and towel.

Now listen to the same sentence, with 400 milliseconds of silence inserted between the listed items, and notice that you hear each item more distinctly:

Don't forget to bring your hat, [[slnc 400]] sunglasses, [[slnc 400]] sandals, [[slnc 400]] and towel.

B
 
Any chance someone can add an attachment for me? Only got my first macbook on Saturday converting from windows so Im a bit of a Noob.

I think this feature is really cool.I saved the attachment added earlier which works fine. I would like the voice to say " Welcome Back Woz " or "Welcome Back Warren"


Thanks for your help
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.