Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Uninstall an AppleScript application from within Itself' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Uninstall an AppleScript application from within Itself
Authored by: tedw on Dec 10, '09 11:02:17AM

I'm not suggesting that your approach doesn't work, or that it's a bad way to do it. I'm just thinking that it's needlessly complex for the average user. You can work with your system any way you want to, but the way you use it is not necessarily what I would recommend to everyone else reading this thread.

I script (and use) the Finder frequently, and while it has its irritations (I'm particularly annoyed by how difficult it can be to coerce between Finder path specifications and normal aliases or posix style referents) I almost never run into *actual* bugs. As graphical file system controllers go, it's not half-bad.

just out of curiosity, what do you normally do: quit the Finder and do all of your file/folder referencing through the command line? Or do you run an alternate GUI file system controller like PathFinder?



[ Reply to This | # ]
Uninstall an AppleScript application from within Itself
Authored by: ChaChi on Dec 10, '09 11:58:51AM

Well, I actually wouldn't recommend AppleScript for the average user at all. I would recommend they try to find a solution that already exists or dive into learning Automator first before tackling a programming language of any kind.

The bugs I run into in the Finder are when actually attempting to use the Finder and not while scripting it. When scripting it, I find it endlessly annoying and more time consuming to script. Again, personal preference.

I use the command line.



[ Reply to This | # ]
Uninstall an AppleScript application from within Itself
Authored by: everkleer80 on Dec 11, '09 08:24:51AM

I'd consider myself more skilled than the average user, but I didn't even know you could run OS X without the Finder (or Path Finder or something.) How do you quit the Finder without logging off? It just relaunches when you kill/force quit...

Anyway, just to add my two cents, I can't remember ever running into any bugs in the Finder (except for maybe minor things such as available SMB network shares not showing in the sidebar sometimes or other issues that I could work around too easilly to bother troubleshooting.) I think the Finder is great - definately much better than Windows Explorer and its counterparts on the other OSes I've used.



[ Reply to This | # ]
Uninstall an AppleScript application from within Itself
Authored by: ChaChi on Dec 11, '09 08:56:11AM
I have a "Quit Finder" menu item, just like any other application, that I added to the end of the Finder menu using the following defaults command:
defaults write com.apple.finder QuitMenuItem 1 ; killall Finder
or you can use a basic AppleScript:
tell application "Finder" to quit
You should consider yourself extremely lucky that you don't run into more bugs in the Finder. I have 5 open bug report tickets with Apple at the moment regarding Finder bugs alone! Like I said before, the Finder is decent but has a long way to go still!

[ Reply to This | # ]
Uninstall an AppleScript application from within Itself
Authored by: tedw on Dec 11, '09 12:07:40PM

interesting. again, out of curiosity, what are the Finder bugs you're seeing? I'd like to see if I can replicate them.



[ Reply to This | # ]
Uninstall an AppleScript application from within Itself
Authored by: trosberg on Dec 15, '09 11:28:25AM
From user point of view, Finder has some bugs, but every version has been better. In Mac OS X 10.4 Finder there is the horrible lack of refresh, when some other app added something to a folder. The Finder can even be AppleScripted to refresh, but it didn't work. From scripter's point of view, the Finder has a learning curve, but it is more understandable and reliable than e.g. System Events scripting. Thanks to tedw for nice Finder scripting. The same:

on applicide()
	set myAppFile to path to me as string
	tell application "System Events"  
		delete disk item myAppFile
	end tell
end applicide
It is valid System Events scripting. It doesn't work in spite of file scripting possibilities with System Events. When saved as an app and then run from AppleScript Editor in 10.6 it shows buggy behavior. Besides, term "me" has changed meaning a little between Mac OS X 10.4 and 10.6. In the latter it means the script app, in the older the Script Editor, when run from the Script Editor. Have your backup ready if trying! The example shows one of AppleScript's flaws, the varying terminology in same task between apps.

[ Reply to This | # ]