Script runs everytime except at login... when i want it to

I have written a little script to change a few features upon login (depending who logs into the computer). Very simple, straightforward, and it works… except upon login. When placed in the login items area of System Preferences (Jaguar), it launches like it’s supposed to, does nothing, and then quits.

Any insight?

Thanks,

Jason

Hamburg, Germany

I have a script in my login items that works. I have it saved as an application with the .app extension in the applications name.

Example "myscript.app"

Hope that helps…

Thanks, but that isn’t really the problem. It launches perfectly… bounces in the dock and everything. It just doesn’t do what it was designed to (which is to change the network location via the apple menu). If, for example, 3 seconds later, I launch the script again, it works like a charm. I have also tried to include delays in the script to make it work… no success.

j

I have a similar problem with a log-in script that’s supposed to restore the sound volume on my PowerBook. (I always set the volume to 0 when restarting or shutting down in order to suppress the start-up chime.) This script doesn’t work at all until I set the volume by some other means first. Thereafter it works perfectly, from any start volume at all.

Last month, I wrote a script that opens the dictionaries of currently running, scriptable apps in Script Editor. (Thread: “Processes - ‘has scripting terminology’”.) On my machine, this doesn’t work immediately after a log-in. There has to have been a fair bit of other activity in X before it can recognise even the Finder or System Events as scriptable apps - so there’s no point in firing up Script Editor straight away.

Last night, even the script I use to set the volume to 0 and shut down the computer decided not to work. It’s such a relief to get back to 9.2.2 and 8.6! :slight_smile:

There ara a couple of other things you can try, although I’m not sure if they will help or not.

  1. Put the System Events app in your Login Items
  2. Drag the script you have to the last position in the Login Items panel
  3. Set a delay in the script