home *** CD-ROM | disk | FTP | other *** search
- /*
- $VER: SelPattIcons.rexx 1.0 (11.1.2000) Copyright (c) Nils Görs.
-
- Select the Icons that fit with the given pattern.
-
- This scripts need rexxtricks.library
- */
-
- options results
-
- PARSE ARG Pattern
-
- IF Pattern = "" THEN DO
- id='req'pragma('id')
- address command 'rxset' id '`requeststring TITLE="SelectPattern" BODY="Type Pattern to select icons"`'
- IF rc = 5 THEN EXIT
- Pattern=getclip(id)
- call setclip(id,'')
- END
-
- address WORKBENCH
-
- if Pattern = "" THEN EXIT
-
- IF ~SHOW(LIBRARIES,'rexxtricks.library') THEN
- IF ~ADDLIB('rexxtricks.library',9,-30,38) THEN
- quit('Cannot open rexxtricks.library!',10)
-
- LOCKGUI
-
- GETATTR OBJECT WINDOWS.ACTIVE
- activeWin = result
-
- GETATTR OBJECT WINDOW.ICONS.UNSELECTED.COUNT NAME '"'||activeWin||'"'
- NumOfUnselIcons = result
-
-
- e = 1
- do i = 0 to NumOfUnSelIcons-1
- GETATTR WINDOW.ICONS.UNSELECTED.i NAME '"'||activeWin||'"' STEM IconInfo.i
- UnselName.e = IconInfo.i.name
- e = e + 1
- end
- UnselName.0 = e -1
-
- do i = 1 to UnSelName.0
- IF UnSelName.i ~= "" THEN DO
- IF RXTR_MATCHPATTERN(UnSelName.i,Pattern,NOCASE) = 1 THEN DO
- ICON WINDOW '"'||activeWin||'"' UnselName.i SELECT
- END
- END
- end
-
- UNLOCKGUI
-