Re: tell app, name in string var
Re: tell app, name in string var
- Subject: Re: tell app, name in string var
- From: Luther Fuller <email@hidden>
- Date: Mon, 30 May 2011 08:02:07 -0500
On May 30, 2011, at 1:50 AM, Ron Hunsinger wrote: Kudos to Pugh, for using 'tell application "Finder" to quit', BEFORE examining or changing its defaults. It's unsafe and generally ineffective to modify defaults for a running application.
True. And I suspect the same could be said for the Dock. I have a handler that inserts a menu folder in the Dock by modifying the com.apple.dock.plist prefs file. It ought to: 1. Quit Dock; 2. Modify file; 3. Launch Dock. But the Dock always relaunches itself automatically when quit, so the best I can do is ...
on addDockMenu(menuFolderAlias) -- 1 construct the |file-data| record
--2 construct the |tile-data| record -- 3 construct the newMenuFolderItem record -- 4 write to Dock preference file tell application "Dock" to quit end addDockMenu -----------------------------
I've never encountered any problems or failures with this handler. It just works. But, I'm still suspicious. Are my suspicions realistic?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden