REM Created On Thursday, April, 30, 2002 by K Depledge WITHOBJECT "CorelPhotoPaint.Automation.7" YourName$ = REGISTRYQUERY(1,"Software\Microsoft\Windows\CurrentVersion\Explorer","Logon User Name") BEGIN DIALOG Dialog1 125, 76, "Save to ProDesktop" OKBUTTON 66, 54, 50, 16 CANCELBUTTON 7, 54, 49, 16 TEXT 5, 3, 116, 32, "Save either the current image or the current mask (or both) for use as a Custom Material or Decal in a ProDesktop Album" OPTIONGROUP ImType% OPTIONBUTTON 7, 38, 36, 12, "Bitmap" OPTIONBUTTON 48, 38, 33, 12, "Mask" OPTIONBUTTON 86, 38, 31, 12, "Both" END DIALOG ret=DIALOG(Dialog1) if ret=2 then stop w& = .GetDocumentWidth() h& = .GetDocumentHeight() if w& > 400 then .ImageResample 400, 400*h&/w&, 72, 72, true if YourName$="kd" or YourName$="KD" then YourName$=INPUTBOX("Enter Required Filename") if YourName$="" then YourName$ = REGISTRYQUERY(2,"System\CurrentControlSet\Control","Current User") endif Path$=REGISTRYQUERY(1,"Software\PTC\ProDESKTOP\Settings","AppPath") FileName$=left(Path$,len(Path$)-8)+"Bitmaps\"+YourName$ if ImType=0 or ImType=2 then .FileSave FileName$+".bmp", 769, 0 if ImType=1 or ImType=2 then .MaskSave FileName$+"_mask.bmp", 769, 0 END WITHOBJECT