Log in

View Full Version : AppleScripts



chagle
24th June 2007, 09:56 PM
Hi all,

Anyone good with AppleScripts? :-)

I've done a couple of AppleScripts - just to mount a couple of volumes on my Linkstation at Login time...

Very basic:

---
beep
try
mount volume "smb://lspro/itunes"
end try
---

All runs OK - Then I save it as an application - I then put that application into Login items..

Runs... but always get prompted to:

"Press Run to run this script, or Quid to quid"

I can select RUN and all is well - but how can I stop it from asking me this? :-)

Anyone .... Please...........!

Hands0n
24th June 2007, 10:06 PM
Have you tried topping and tailing your script with

on run
-- some script lines
end run

chagle
24th June 2007, 10:13 PM
Have you tried topping and tailing your script with

on run
-- some script lines
end run

Still the same ... Grrrr.

More google research... :-)

Hands0n
24th June 2007, 10:17 PM
Oh, also ... when you save or save as make sure you uncheck "Startup Screen" That'll do the job for you.

Hands0n
24th June 2007, 10:21 PM
Instead of Google, give Spotlight a try, or use the Applescript Editor's excellent Help pages a go. You'll find tons of good info in there. For your particular problem look at Script Editor Help - go to "Saving a script as an application"

I find Google good at a lot of stuff, I'm on it forever it seems :) But the Apple Help pages are very well written, and probably a lot more objective/factual than some of the help on Google. I don't know about anyone else, but I end up having to do a lot of careful filtering in Google or else it all becomes bewildering and conflicting.

chagle
24th June 2007, 11:41 PM
Job done! :-)

You were right, I had the startup screen ticked! Unticked and works a treat..

Will this never end.. I really don't have time for work these days - far too interested in finding all about my new toy. AppleScripts seem very, very good. I kind like Automator too, done a few things with that.