>I need to be able to shutdown the computer when a button I have in my program >is clicked, how do I do that? This is in OSX. I'd also like to be able to >restart the computer as well. Brian, Ken S. once posted the following untested(by me) code using appleevents: local fn doShutdown long if ( system( _sysVers ) >= 1000 ) // OS X 10.0.0 or higher sendAppleEvent _kCoreEventClass, _"shut", _nil, _nil, "loginwindow" xelse sendAppleEvent _"fndr", _"shut", _nil, _nil, "Finder" end if end fn fn doShutdown ============================== There are some toolbox calls which I don't find in the latest headers. Those definitions are: toolbox ShutDwnPower() `0x3F3C, 0x0001, 0xA895 toolbox ShutDwnStart() `0x3F3C, 0x0002, 0xA895 toolbox ShutDwnInstall(long shutDownProcAddr,short flags) `0x3F3C, 0x0003,0xA895 toolbox ShutDwnRemove(long shutDownProcAddr) `0x3F3C, 0x0004, 0xA895 HTH----Brian