home *** CD-ROM | disk | FTP | other *** search
- REM Creates a Gold Bar with the desired Text on top.
- REM GoldBar.CSC July 21, 1995
-
- REM Uses your default text font to generate a gold bar with desired text on top.
- REM Lets you specify the color of the text.
- REM You need an open document to run this script.
-
- BEGIN DIALOG GBDialog 222, 137, "Gold Bar Dialog"
- TEXT 13, 12, 80, 8, "The text for the Gold Bar:"
- TEXTBOX 98, 12, 111, 13, Mess$
- TEXT 13, 41, 50, 8, "Cyan Value"
- SPINCONTROL 76, 41, 50, 11, CyanVal%
- TEXT 13, 59, 50, 8, "Magenta Value"
- SPINCONTROL 76, 60, 50, 13, MagentaVal%
- TEXT 13, 83, 50, 8, "Yellow Value"
- SPINCONTROL 76, 83, 50, 13, YellowVal%
- OKBUTTON 162, 41, 48, 14
- CANCELBUTTON 162, 67, 48, 14
- GROUPBOX 3, 28, 144, 102, "Fill Color (CMYK)"
- TEXT 13, 106, 50, 8, "K Value"
- SPINCONTROL 76, 106, 50, 13, KVal%
- END DIALOG
-
- YellowVal% = 100 'set default to Red
- MagentaVal = 100
-
- RETRY:
- ret = DIALOG(GBDialog)
- IF CANCEL THEN STOP
-
- IF Mess = "" THEN
- MESSAGE "You didn't enter any text"
- GOTO RETRY
- END IF
- IF CyanVal > 100 OR MagentaVal > 100 OR YellowVal > 100 OR KVal > 100 THEN
- Message "One of the color values exceeds 100, please try again"
- GOTO RETRY
- END IF
-
- REM Height and Width are in inches for readability
- Height# = 1
- strlen% = LEN(Mess$)
- Width# = 0.75 * strlen
-
- WITHOBJECT DRAW
- REM Adds the text on top
- .CreateArtisticText Mess
- .SetSize FROMINCHES(Width - 0.4), FROMINCHES(Height - 0.4)
- .SetReferencePoint 1
- .SetPosition FROMINCHES(0.2), FROMINCHES(-0.2)
- .ApplyUniformFillColor 2, CyanVal, MagentaVal, YellowVal, KVal
- TopText& = .GetObjectsCDRStaticID()
-
- REM Creates the Top Rectangle
- .CreateRectangle FROMINCHES(-0.1), FROMINCHES(0.1), FROMINCHES(-Height + 0.1), FROMINCHES(Width - 0.1), 0
- .ApplyFountainFill 0, 0, 0, 1500, 60, 0, 3, 0
- .SetFountainFillColor 0, 2, 0, 20, 100,
- .SetFountainFillColor 30, 2, 0, 0, 0, 0
- .SetFountainFillColor 70, 2, 0, 20, 100,
- .SetFountainFillColor 95, 2, 0, 0, 0, 0
- .SetFountainFillColor 100, 2, 0, 0, 0, 0
- .ApplyOutline 3000, 0, 0, 0, 100, 10, 1, 1, 1, 0
- .OrderToBack
- Top& = .GetObjectsCDRStaticID()
-
- REM Creates the Base Rectangle
- .CreateRectangle FROMINCHES(0), FROMINCHES(0), FROMINCHES(-Height), FROMINCHES(Width), 0
- .ApplyFountainFill 0, 0, 0, -200, 60, 0, 3, 0
- .SetFountainFillColor 0, 2, 0, 20, 100, 20
- .SetFountainFillColor 30, 2, 0, 0, 0, 0
- .SetFountainFillColor 50, 2, 0, 20, 100, 20
- .SetFountainFillColor 70, 2, 0, 0, 0, 0
- .SetFountainFillColor 100, 2, 0, 20, 100, 20
- .ApplyOutline 3000, 0, 0, 0, 100, 10, 1, 1, 1, 0
- .OrderToBack
- Base& = .GetObjectsCDRStaticID()
-
- .SelectObjectOfCDRStaticID Base
- .SelectObjectOfCDRStaticID Top
- .SelectObjectOfCDRStaticID TopText
- .Group
- END WITHOBJECT
-