• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Non Privileged shutdown (was Privileged shutdown)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non Privileged shutdown (was Privileged shutdown)


  • Subject: Re: Non Privileged shutdown (was Privileged shutdown)
  • From: Axel Luttgens <email@hidden>
  • Date: Wed, 28 Jul 2004 10:24:56 +0200

Bernard Azancot wrote:

Le 24 Jul 2004 15:46:42 +0200 Axel Luttgens <email@hidden> m'a ripondu

[...]


[...]


Thanks for your detailed answer, Axel.

I do not need a priviledged shutdowm command. I just thought that a 'do shell script' was necessary to Shut the Mac down under MacOSX.
I have seen the 'shut down' command in the 'System Events' dictionary. I know there is a way to call a 'System Events' command in a script but I do do not remember the right syntax.


I guess you were still missing some coffeine :-)
Should be something like this:

tell application "System Events"
shut down
end tell

Of course, any open application, with unsaved changes, will ask the user whether to save or not.
Exactly as if the user himself had selected "Shut down..." from Apple menu.
So, depending on your needs, you possibly would have to first devise a way to check for open appplications and handle them.

Something else:
Is there a hint to launch a script when you shutdown the Mac ( by the Applemenu, without administrator privileges) ?

As far as I remember (but others may have more up to date information), the shutdown process does not yet send some event, or provide hooks, that could be useful for such a purpose.
Now, depending on what you are considering, perhaps could you consider a logout instead.
I mean, a user who shuts down would first be logged out.

So, just a hint:

<http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Tasks/CustomLogin.html>


It was so simple under MacOS9... Godferdam !! (private joke for Axel).


Quoique, du cote ou je suis, on dirait plutot: "nom di dju" ;-)


Axel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Non Privileged shutdown (was Privileged shutdown)
      • From: Paul Berkowitz <email@hidden>
    • Re: Non Privileged shutdown (was Privileged shutdown)
      • From: Emmanuel <email@hidden>
References: 
 >Re: Non Privileged shutdown (was Privileged shutdown) (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: Display Dialog (get Password?)
  • Next by Date: Re: Non Privileged shutdown (was Privileged shutdown)
  • Previous by thread: Re: Non Privileged shutdown (was Privileged shutdown)
  • Next by thread: Re: Non Privileged shutdown (was Privileged shutdown)
  • Index(es):
    • Date
    • Thread