OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > General

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13-06-2006, 22:20
sallybode
Guest
 
Posts: n/a
Default Coupon box in X3 automation

I like a script I found to draw a coupon box with equal corners only it is in 8 or 9 which I use very rarely now and would like to update it to either 12 or X3. Just changing to "CorelDraw.Automation.13" is not enough to run the script.

Here is what the script reads:

REM COUPONS! © 1998 by Cutting Edge F/X
REM http://www.cedesign.com
REM All Rights Reserved
REM For CorelDRAW! 8


OptionGroup1Val%=0
OptionGroup2Val%=0
BEGIN DIALOG DialogCoupons 203, 153, "COUPON BOX ATTRIBUTES"
TEXT 39, 140, 125, 11, "Coupons! © 1998 by Cutting Edge F/X"
OKBUTTON 161, 7, 36, 16
CANCELBUTTON 161, 25, 36, 16
GROUPBOX 4, 5, 151, 46, "Box Width to Height Ratio:"
OPTIONGROUP OptionGroup1Val%
OPTIONBUTTON 10, 19, 30, 12, "1:1" '0
OPTIONBUTTON 10, 34, 32, 12, "2:1" '1
OPTIONBUTTON 62, 19, 30, 12, "3:1" '2
OPTIONBUTTON 62, 34, 30, 12, "4:1" '3
OPTIONBUTTON 108, 19, 30, 12, "3:2" '4
GROUPBOX 4, 59, 151, 34, "Outline Width:"
OPTIONGROUP OptionGroup2Val%
OPTIONBUTTON 26, 73, 30, 12, "1 Pt" '0
OPTIONBUTTON 82, 74, 30, 12, "2 Pts" '1
GROUPBOX 4, 101, 151, 27, "Dash Length"
OPTIONGROUP OptionGroup3Val%
OPTIONBUTTON 26, 113, 40, 11, "Short" '0
OPTIONBUTTON 82, 113, 51, 11, "Long" '1
END DIALOG
ret_val = DIALOG(DialogCoupons)
' If ret_val is 2, then Cancel button was chosen
IF ret_val = 2 THEN STOP


WITHOBJECT "CorelDraw.Automation.9"

.SuppressPainting TRUE

IF OptionGroup1Val% = 0 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -317500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 0 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -317500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 0 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -317500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 0 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -317500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 1 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 1 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 1 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 1 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 2 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -508000, 571500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 2 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -508000, 571500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 2 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -508000, 571500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 32, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 2 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -508000, 571500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 32, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 3 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -381000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 3 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -381000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 3 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -381000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 3 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -381000, -571500, -635000, 444500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 28, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 4 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 4 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 0 THEN
.CreateRectangle -127000, -571500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 29, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 4 AND OptionGroup2Val% = 1 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(2), 2, 2, 0, 100, 0, 32, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF
IF OptionGroup1Val% = 4 AND OptionGroup2Val% = 0 AND OptionGroup3Val% = 1 THEN
.CreateRectangle -127000, -571500, -635000, 190500, 0
.ApplyOutline FROMPOINTS(1), 2, 2, 0, 100, 0, 32, 0, 0, 0, 0, 0, TRUE
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
.SetOutlineColor
ENDIF

.AlignToCenterOfPage 3, 3
IDRect1& = .GetObjectsCDRStaticID()
.DuplicateObject
IDRect2& = .GetObjectsCDRStaticID()
.StretchObject 1, 1, 1, 1, TRUE, FALSE, 9
.SelectObjectOfCDRStaticID IDRect1&
.AppendObjectToSelection IDRect2
.AlignToCenterOfPage 3, 3
.Group
.ResumePainting
.EndOfRecording



MESSAGE "Finished!"

END WITHOBJECT


I found it here: http://www.cedesign.com/cefx/drawscripts.html


To whoever answers, thanks in advance.
Reply With Quote
  #2  
Old 14-06-2006, 07:19
Lev
Guest
 
Posts: n/a
Default

remove or comment
.StoreColor 5002, 0, 0, 0, 100, 0, 0, 0, 0
lines
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
save filename without extension and prn automation error olympiatr CorelDRAW/Corel DESIGNER VBA 5 20-10-2004 07:17
Batch file automation in PhotoPAINT. Please help. vallentin Corel Photo-Paint VBA 0 14-04-2004 11:48
COM/OLE Automation Gerry Hickman Corel Photo-Paint VBA 2 02-01-2004 18:31
Photo-Paint 11 Automation error ... Allan Shearer Corel Photo-Paint CS 1 15-09-2003 16:28


All times are GMT -5. The time now is 02:16.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com