| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| developing droplets in script editor is a pain because if you operate as a droplet the normal debugging methods are closed. However ,it is possible to supply a run handler that calls the open handler. However, manually entering file aliasen is also a pain though a lesser on. I have produced a droplet that will provide a run handler that will call the open handler with a proper list of file aliasen save the below script as an application, the handler is saved to a file and also to the clipboard. Oh, and you will want to make your own run handler, you don't have those files and I don't think the line breaks will survive. ------------------------------------------cut here------------------------------------- on open filelist --copywrite Walter Bushell <email@hidden> February 2006 -- Next line starts a multiline statement -- provided as a debugging aid only; use in a production --environment voids liscense -- distribute only with this msg carefully noting any changes set filestr to "on run open ({" -- cycle thru files buiding up the list as text so we can export it. set needComma to "" repeat with eye in filelist set filestr to filestr & needComma & "\"" & (eye as text) & "\"" & " as alias " set needComma to "," end repeat set filestr to filestr & "}) end run" do shell script "echo filestr >> ~/test/test" -- put the "on run Handler on the clipboard as well as the file tell application "Script Editor" to set the clipboard to filestr end open --- This program eats its own dog food; it produced its own run handler! on run open ({"Macintosh HD imac:Users:walter:Music:CWII2075" as alias, "Macintosh HD imac:Users:walter:Music:CWII2065" as alias, "Macintosh HD imac:Users:walter:Music:CWII2055" as alias, "Macintosh HD imac:Users:walter:Music:CWII2025" as alias, "Macintosh HD imac:Users:walter:Music:CWII2035" as alias, "Macintosh HD imac:Users:walter:Music:CWII2045" as alias}) end run |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.