REM Created in CorelPhotoPaint Version 9.397 REM Isoline.csc ' This script explores brightness level numbers via navigation bar ' and maps them as isobars using the current image document. WITHOBJECT "CorelPhotoPaint.Automation.9" DIM NotDone AS BOOLEAN ' Exit explore loop when "X" is chosen xFlag = FALSE ' not w& = .GetDocumentWidth() h& = .GetDocumentHeight() tfold$ = GETTEMPFOLDER() SETCURRFOLDER tfold MKFOLDER "isobox" SETCURRFOLDER tfold & "isobox" tfile$ = GETCURRFOLDER() ' temp folder with "isobox" subdirectory stat% = .GetMaskPresent() IF stat% = 1 THEN .MaskRemove ' Remove masks cnt& = .GetObjectCount() IF cnt& > 0 THEN .ObjectSelectAll .ObjectMerge TRUE ' Combine all objects to background ENDIF xch$ = "" ' User command xlev% = 127 ' Level of isobar mapping xshow$ = "127" ' Initial value as string isowork$ = tfile & "\isox.cpt" ' Working file .FileSave isowork$, 1808, 0 ' use copy to protect original BEGIN DIALOG Buttons1 40, 20, 180, 44, "ISO-Explore Command Buttons" PUSHBUTTON 21, 12, 16, 14, "-&30" PUSHBUTTON 41, 12, 16, 14, "-&10" PUSHBUTTON 61, 12, 16, 14, "&-1" PUSHBUTTON 81, 12, 16, 14, "&X" PUSHBUTTON 101, 12, 16, 14, "&+1" PUSHBUTTON 121, 12, 16, 14, "+&10" PUSHBUTTON 141, 12, 16, 14, "+&30" PUSHBUTTON 79, 28, 20, 14, xshow$ END DIALOG ret = DIALOG(Buttons1) NotDone = TRUE DO WHILE NotDone IF ret = 3 THEN xlev% = xlev% - 30 IF ret = 4 THEN xlev% = xlev% - 10 IF ret = 5 THEN xlev% = xlev% - 1 IF ret = 6 THEN NotDone = FALSE GOTO xout ' exit gracefully ENDIF IF ret = 7 THEN xlev% = xlev% + 1 IF ret = 8 THEN xlev% = xlev% + 10 IF ret = 9 THEN xlev% = xlev% + 30 xshow$ = LTRIM(STR(xlev%)) ' Take off the leading space ' ..................................... .ImageLevelThreshold 0, 0, xlev%, 255, 2 .EndColorEffect .EffectMedian 2, 100 ' REM out this line for more accurate isobar .MaskSelectAll .ObjectCreate TRUE .EndObject .EffectGaussianBlur 1 .ObjectMergeMode 3 .ObjectSelectNone .ObjectSelect 1, TRUE .EndObject .ObjectMerge TRUE .EndObject .ImageInvert .EndColorEffect .ImageAutoEqualize 5, 5 ' ....................................... ret = DIALOG(Buttons1) IF ret <> 6 THEN .FileRevert ' refresh original file for next loop xout: LOOP KILL isowork$ ' clean up END WITHOBJECT