Go Back   The macosxhints Forums > Working with OS X > Tweaking OS X / Wish List



Reply
 
Thread Tools Display Modes
Old 05-28-2004, 04:40 AM   #1
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
single click shut down?

I would like any tips on how to create a single click shut down button I can place on my desktop? Any help would be great.
Xd is offline   Reply With Quote
Old 05-28-2004, 06:04 AM   #2
bramley
MVP
 
Join Date: Apr 2004
Location: Cumbria, UK
Posts: 2,461
The following AS when saved as an app will start the usual shutdown process. You could add your own custom icon if you want to replace the AS one. You can put an alias to the script either on your desktop or drag the app into the dock.

Code:
tell application "Finder"
	activate
end tell
tell application "System Events"
	tell process "Finder"
		tell menu bar 1
			tell menu bar item "Apple"
				tell menu "Apple"
					click menu item 17
				end tell
			end tell
		end tell
	end tell
end tell
The "cleaner" alternative is to save the following AS as an app.

Code:
tell application "Finder"
	shut down
end tell
but this script has no "idiot-proofing". You could add some commands to generate an alert window but it wouldn't look like the usual one, or be as good.
bramley is offline   Reply With Quote
Old 05-28-2004, 12:08 PM   #3
cudaboy_71
All Star
 
Join Date: Jan 2002
Location: sacramento, ca
Posts: 873
i did just what bramley did (example 2) a long time ago for my mom. i even gave it a cute-widdle sleepy finder icon.

if you want it, grab shutdown.sit from my .mac sharing folder here and stick it in your dock.
cudaboy_71 is offline   Reply With Quote
Old 05-28-2004, 12:28 PM   #4
foreverfadesx
Prospect
 
Join Date: May 2004
Posts: 5
how can i make a display an alert when i click the 2nd action script?
foreverfadesx is offline   Reply With Quote
Old 05-28-2004, 01:28 PM   #5
cudaboy_71
All Star
 
Join Date: Jan 2002
Location: sacramento, ca
Posts: 873
Code:
tell application "Finder"
	display dialog "Shutting Down" buttons {"OK", "Cancel"} default button "OK"
	shut down
end tell
[edit] removed variable--not needed.

Last edited by cudaboy_71; 05-28-2004 at 01:31 PM.
cudaboy_71 is offline   Reply With Quote
Old 05-31-2004, 01:56 AM   #6
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
Cudaboy_71 that is totally cool you offer that, I have it on my dock as we speak and it works PERFECT. Thx for that dude, seriously.
Xd is offline   Reply With Quote
Old 05-31-2004, 10:19 AM   #7
chabig
Hall of Famer
 
Join Date: Jan 2002
Posts: 2,944
What's so hard about selecting Shut Down from the Apple menu?
chabig is offline   Reply With Quote
Old 05-31-2004, 11:27 AM   #8
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
Its select apple, scroll down then select shutdown then roll over to the middle of the screen and choose shutdown or cancel. So the obvious answer to your question is its not that hard, it just saves a little Xtra time accomplishing those steps with 1 click instead of 3.
Xd is offline   Reply With Quote
Old 05-31-2004, 11:37 AM   #9
chabig
Hall of Famer
 
Join Date: Jan 2002
Posts: 2,944
OK. Thanks. Did you know you can hold down the option key when you select Restart, Shut Down, or Log Out and you won't get the confirmation alert? That simplifies it a lot.
chabig is offline   Reply With Quote
Old 05-31-2004, 12:02 PM   #10
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
didnt know that, thx for the tip.
Xd is offline   Reply With Quote
Old 05-31-2004, 12:04 PM   #11
bramley
MVP
 
Join Date: Apr 2004
Location: Cumbria, UK
Posts: 2,461
Quote:
Originally Posted by chabig
What's so hard about selecting Shut Down from the Apple menu?

Well, if your sight's not good, arthritis is setting in, you suffer from Parkinson's, or you're at the age where you don't remember things too well ... mice & menus can be a bit hard to use.

And if you can't even turn your computer on/off that kicks your confidence a bit, and make you less likely to use a computer.

So I think threads like this one do address a need even if it's not immediately apparent to those "sound of mind and body."
bramley is offline   Reply With Quote
Old 05-31-2004, 12:07 PM   #12
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
Whatever floats your boat dude. I have a very limited mouse at the moment, if you must know.
Xd is offline   Reply With Quote
Old 05-31-2004, 12:27 PM   #13
amarillo
Prospect
 
Join Date: Apr 2003
Location: Hemel Hempstead, UK
Posts: 42
Control + Alt + Command + Eject on a standard Mac keyboard shuts the computer down without a confirmation box.
amarillo is offline   Reply With Quote
Old 06-11-2004, 11:44 AM   #14
osxpounder
Major Leaguer
 
Join Date: May 2002
Location: atl, ga, usa
Posts: 356
I have plenty of reasons for preferring a keyboard to the mouse, including:

Mousing takes longer [usability tests prove this]
Mousing is less healthy for my injured hands and wrists [injured by years of computer use]
Mousing requires more attention

There are others; I think that list is good enough. I don't suggest eliminating the mouse, but some of us would like to do without it as much as possible.
osxpounder is offline   Reply With Quote
Old 06-11-2004, 04:02 PM   #15
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,956
Quote:
Originally Posted by osxpounder
Mousing takes longer [usability tests prove this]

Although I have not actually seen the details, Apple claimed to have done research that showed the reverse of what you claim. I.e. that accessing an item from a menu at the top of the screen is actually faster (in most cases)
than using keyboard commands. This was reported in a book "Tog on Interface" by Bruce Tognazzini (http://www.asktog.com/books/toi_detail.html).

He said that people who like using keyboard shortcuts persistently claim that they are faster, but that experiments proved that was an illusion. Of course, some keyboard shortcuts are faster - those that you use all the time. But for general commands, menu items are better. This statement does rely on the menu being at the top of the screen where it is at a fixed position and effectively infinitely high (so that you don't have to slow down to position the mouse on the menubar).
hayne is offline   Reply With Quote
Old 06-12-2004, 12:05 PM   #16
Xd
Major Leaguer
 
Join Date: May 2004
Posts: 254
I like the single click button and if you dont, why post anything? Like I am going to decide since you, A total stranger says I must be this or that to want this feature. Who cares what you think. I dont need approval from anyone to know what I want. Its a cool enhancement to me.
Xd is offline   Reply With Quote
Old 06-14-2004, 10:34 AM   #17
osxpounder
Major Leaguer
 
Join Date: May 2002
Location: atl, ga, usa
Posts: 356
Yes, mousing is faster for users who either are new to the app in question, or new to computers, but when "power users" get accustomed to working for hours and days in an app, they begin to appreciate, and use, keyboard commands for quicker and more convenient access. Even experienced users can find the mouse to be more convenient and quick when they use an unfamiliar app, but many things common to almost all apps can be made quicker and more convenient with a keystroke. A great example is Cmd-S to Save.

Also, mousing puts wear and tear on my hands and wrists, which my main reason for preferring keys -- your experience may well be different. Ultimately, as Xd points out, what matters most is the user's personal preference -- since computers *can* offer the choice, I say that they *should* ... that's a controversial opinion among usability experts, but I'm sure it's what I prefer. I don't mind having the preferences tucked away, deep within the app, but I do really want the preference available to me.

I often see reference to Tog's book in other sources; I need to get that book!
osxpounder is offline   Reply With Quote
Old 06-14-2004, 11:18 AM   #18
gsparks
Major Leaguer
 
Join Date: Jun 2003
Location: San Francisco Bay Area
Posts: 461
Quote:
Originally Posted by bramley
So I think threads like this one do address a need even if it's not immediately apparent to those "sound of mind and body."

Exactly. Let's keep this thread to being helpful... the original poster asked politely for a solution, and it's not necessary for anyone else to criticize or lambast him because they don't happen to see the logic or understand his desire for the solution. Xd didn't start off by insulting your intelligence, so let's not insult his...
gsparks is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.