home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: RmIcon 0.2 (12.06.2001)
- **
- ** This program the active window's selected icons
- ** WITHOUT ANY REQUESTER
- */
-
- OPTIONS RESULTS
-
- /* Looking for the WB's active window. */
-
- ADDRESS WORKBENCH
- GETATTR WINDOWS.ACTIVE VAR path
-
- /* If the active window is the WB window, quit. */
-
- IF path="root" THEN EXIT
-
- /* Counting the selected icons. */
-
- OPTIONS FAILAT 20
- GETATTR WINDOW.ICONS.SELECTED.COUNT NAME '"'||path||'"' VAR n
-
- /* If there isn't any icon, quit. */
-
- IF RC>=10 THEN EXIT
-
- /* Taking the selected icons' names. */
-
- ADDRESS WORKBENCH
- OPTIONS FAILAT 10
- GETATTR WINDOW.ICONS.SELECTED NAME '"'||path||'"' STEM ICONS
-
- /* These commands delete the selected icons. */
-
- DO i=1 TO n
- j=i-1
- file=icons.j.name
- file=path||file||".info"
- ADDRESS COMMAND
- 'DELETE >NIL: "'file'"'
- END
-
- /* Updating active window. */
-
- ADDRESS WORKBENCH
- MENU WINDOW ACTIVE INVOKE WINDOW.UPDATE
-
-