home *** CD-ROM | disk | FTP | other *** search
- /*
- @BADProHotLink @P@ICopyright Gold Disk Inc., February, 1992
- This Genie sends a bitmap to Art Department Professional and reimports the bitmap when Art Department Professional quits.
- */
- call setclip(ppuser_adclip, "")
- cr = '0a'x
- call SafeEndEdit.rexx()
- options results
-
- box = ppm_ClickOnBox("Select box with a bitmap")
- if box = 0 then exit_msg()
-
- info = ppm_GetBoxInfo(box)
- if upper(word(info,1)) ~= "BITMAP" then exit_msg("Box must have a bitmap in it")
-
- fname = subword(info, 5)
-
-
- screenmodes = "8 H_OVERSCAN"cr"4 PAL"cr"1 HIRES"cr"2 INTERLACE"cr"16 V_OVERSCAN"
- rendermodes = "2"cr"4"cr"8"cr"16"cr"32"cr"64"cr"128"cr"256"cr"AHAM"cr"ARZ0"cr"ARZ1"cr"CUST"cr"EHB"cr"HAM"
-
- screenmode = ppm_SelectFromList("Select Screen Mode..", 25, 5, 1, screenmodes)
- if screenmode = '' then exit_msg()
-
- mode = 0
-
- do while screenmode ~= ''
-
- parse var screenmode temp '0a'x screenmode
-
- mode = mode + word(temp , 1)
-
- end
-
- mode = substr(mode, 2)
-
- rendermode = ppm_SelectFromList("Select Render Mode..", 25, 5, 0, rendermodes)
- if rendermode = '' then exit_msg()
-
- dimension = "Width:"word(info, 2) || cr"Height:"word(info, 3)
- dimension = ppm_GetForm("Enter image dimensions", 8, dimension)
- if dimension = '' then exit_msg()
-
- parse var dimension iwidth '0a'x iheight
-
- if ~(datatype(iwidth, n) & datatype(iheight, n)) then exit_msg("Invalid Entry")
- address command
- adargs = iwidth';'iheight';'rendermode';'fname';'mode
- call setclip(ppuser_adargs, adargs)
-
- adpro = 'ADPro:ADPro'
-
- if ~exists(adpro) then
- do
- adpro = ppm_GetFileName("Please locate ADPro..", "",)
- if adpro = '' then exit_msg()
- end
-
- "run >nil:" "rx rexx:ADProComm.rexx "
-
- if ~show(p, 'ADPro') then
- do
-
- /* this genie will go to sleep until adpro has quit */
- address command
- adpro ">nil:"
-
- adclip = getclip(ppuser_adclip)
- if adclip ~= "1" then exit_msg("Unable to start ADPro")
-
- end
- else
- do
- call ppm_Inform(1, "ADPro has already started. Click here when finished processing bitmap.",)
- end
-
- call ppm_PPageToFront()
- call ppm_ShowStatus("Reimporting BitMap..")
- call ppm_DeleteContents(box)
- call ppm_ImportBM(box, fname)
-
- exit_msg()
-
- exit_msg: procedure
- do
- parse arg message
-
- if message ~= '' then call ppm_Inform(1, message,)
- call ppm_ClearStatus()
- exit
- end
-