home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 876 b | 35 lines | [TEXT/ToyS] |
- on run
- ShowAlert("Drop 1 item on this Applet to preserve its icon for future application.")
- end run
-
-
- on open fsObjs
- if the number of items in fsObjs is 1 then
- if AskUser("Do you wish to apply an icon to this item or save its icon for future application?", {"Save", "Apply"}) is "Save" then
- set the icon of (path to me) to (the icon for (item 1 of fsObjs))
- return
- end if
- end if
-
- -- Get our icon
- set myIcon to (the icon for (path to me))
-
- repeat with fsObj in fsObjs
- set the icon of fsObj to myIcon
- tell application "Finder" to update fsObj
- end repeat
- end open
-
-
- on ShowAlert(msgStr)
- display dialog msgStr buttons {"Yo!"} ¬
- default button 1 with icon stop
- end ShowAlert
-
-
- on AskUser(question, choices)
- return button returned of ¬
- (display dialog question buttons choices ¬
- default button (number of items in choices) with icon note)
- end AskUser
-