On Aug 19, 2011, at 16:23, Luther Fuller wrote: This shows the user much too much information. Confusing. ______________________________________________________________________
Hey Luther,
Agh! The alias TO an alias method works here UNTIL you kill the Dock. Once you've restarted the Dock all aliases are followed...
Weird.
Here at the moment even newly created aliases are NOT followed. This creates aliases from the first 10 items in my documents folder (which happen to be folders).
---------------------------------------------------------------------------------- set testFolder to alias "Thor:Users:chris:test_directory:TEST_ALIASES_FOR_LUTHER:" set docFolder to path to documents folder
tell application "Finder" set aliasList to items 1 thru 10 of docFolder as alias list repeat with i from 1 to length of aliasList make new alias file in testFolder to (item i of aliasList) end repeat open testFolder end tell # do shell script "killall Dock" ----------------------------------------------------------------------------------
Not one are followed unless I uncomment the last line or manually kill the Dock then ALL are followed.
At the moment my feeling is that your best option is to create applets pointing to the correct folders and then use aliases (which you can name any way you want) to point to them in the Dock folder.
If you're creating on the fly it might be simpler to use shell script bundles rather than an Applescript applets.
AppName.app # folder └── Contents # folder └── MacOS # folder └── AppName # executable text file
Example content of text file AppName:
#!/bin/sh open ~/Library/Mail
The text file must be executable:
chmod 755 /path/to/file
I just tried using a script to rewrite the shell script in the text file, and it worked fine. So you could create a template and then duplicate and change it at will.
I also confirmed that it's possible to change the name of the app and the shell script file at will, and it will still execute.
The big trick is that 'AppName.app' and 'AppName' must be identical other than the '.app' suffix.
-- Best Regards, Chris
|