home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: windowtest.ped 1.0 (28.4.95) written by Robert Brandner
- **
- ** Minimizes the size of all windows of the current project
- **
- */
-
- OPTIONS RESULTS
-
- OPTIONS FAILAT 11 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
- SIGNAL ON FAILURE
- SIGNAL ON BREAK_C /* no label->syntax->exit */
-
- if (LEFT(ADDRESS(), 6) ~= "POLYED") then do
- if SHOW("Ports", "POLYED.1") then
- address 'POLYED.1'
- else do
- say "PolyEd is not running!"
- exit
- end
- end
-
- 'LOCKGUI'
-
- /*----- begin of custom code area --------------------------------------*/
-
- /* get name of current project and a list of all windows
- */
- 'GETATTR APPLICATION FIELD CURRENTPROJECT'
- currentproj = RESULT
- 'GETATTR WINDOWS STEM W.'
-
- /* for each window, we get the name of the project it belongs to,
- ** and check if that is the current one. If so, we zoom it.
- */
- do i=0 to W.WINDOWS.COUNT-1
- 'GETATTR' WINDOW '"'W.WINDOWS.i'"' STEM W2.
- if W2.PROJECT == currentproj then do
- 'SETATTR APPLICATION FIELD CURRENTWINDOW' NEWVALUE '"'W.WINDOWS.i'"'
- 'ZOOMWINDOW'
- end
- end i
-
- /*----- end of custom code area ----------------------------------------*/
-
- 'UNLOCKGUI'
- EXIT /* clean exit */
-
- SYNTAX: /* ARexx error... */
-
- say "Error line" SIGL ":" ERRORTEXT(RC) /* report it... */
- 'UNLOCKGUI' /* Unlock GUI! */
- EXIT /* exit */
-
- FAILURE:
- 'UNLOCKGUI' /* Unlock GUI! */
- EXIT /* exit */
-