home *** CD-ROM | disk | FTP | other *** search
- /* DISPLAY.REXX */
- /* $VER: AmigaGuide Picture Displayer 1.0 */
- /* Copyright 1994 Soft-Logik Publishing Corporation */
- /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
-
- /* Purpose: AmigaGuide v34 cannot display a picture. Multiview in v39
- can display pictures or text, but not both. Need a way so that when
- the user chooses to view a picture in an AmigaGuide file to have either
- WDisplay (v34) or Multiview (v39) display the picture. This script will
- check the OS version and use the appropriate utility. Designed to be
- run from an AmigaGuide link. */
-
- arg PictureName .
-
- options results /* enable results */
-
- if show(P, 'PAGESTREAM') then do
- address 'PAGESTREAM'
- getscreenname
- screen=' pubscreen 'result
- end
- else screen=''
-
- cmd = 'version >t:temp'
- address command cmd
- if open(.IFile,'t:temp','R') then do
- line = readln(.IFile)
- ksver = strip(word(line,words(line)/2),t,' ,') /* get kickstart version */
- if (ksver>='39') then name='sys:utilities/multiview 'PictureName||screen
- else name='sys:utilities/wdisplay 'PictureName||screen
- end
-
- /* Display Picture File */
- address command name
-
- /* Cleanup */
- call close(.IFile)
- address command 'delete t:temp quiet'
- EXIT
-