OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > OberonPlace Discussion > Site News

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-02-2006, 00:30
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Color Replacer macro is updated

I have updated my Color Replacer macro with the changes that wOxxOm made (see http://forum.oberonplace.com/showthread.php?t=1053 for more details) with a few more additional tweaks. Thanks wOxxOm for your contribution!

You can get the new version here: http://www.oberonplace.com/vba/drawm...acer/index.htm
Reply With Quote
  #2  
Old 14-02-2006, 09:23
Lev
Guest
 
Posts: n/a
Default

The link to the macro on the main page is wrong (it leads to the Thumbnailer macro)
Repair it and delete my post

Last edited by Lev; 14-02-2006 at 09:40.
Reply With Quote
  #3  
Old 14-02-2006, 09:55
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Fixed, thanks.
Reply With Quote
  #4  
Old 14-02-2006, 10:05
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

Sometimes I use multicolored text - several (or many) colors within one text frame. You can imagine how hard it is to replace manually these colors - you have to select part of text with mouse then choose a color and repeat this 100 times ;-)
So I've added to ColorReplacer new option "replace inside text". Here is part of code which is quite slow I suppose, that's why I had to put this option as separate selection in dialog window:
Code:
Private Sub DoReplaceFill(s As Shape, cfg As clsConfig)
    Dim c As FountainColor, i, l, t
    If s.Type = cdrTextShape And cfg.ReplaceInsideText Then
        l = s.Text.Story.Length
        For i = 1 To l - 1
            t = s.Text.Range(i, i + 1).Text
            With s.Text.Range(i, i + 1)
                If cfg.ReplaceFills Then _
                    If .Fill.Type = cdrUniformFill Then DoReplaceColor .Fill.UniformColor, cfg
                If cfg.ReplaceOutlines Then _
                    If .Outline.Type = cdrOutline Then DoReplaceColor .Outline.Color, cfg
            End With
        Next
    End If
' following code is for normal fills
    Select Case s.Fill.Type
        Case cdrUniformFill
            DoReplaceColor s.Fill.UniformColor, cfg
        Case cdrPatternFill
            DoReplaceColor s.Fill.Pattern.FrontColor, cfg
            DoReplaceColor s.Fill.Pattern.BackColor, cfg
        Case cdrFountainFill
            DoReplaceColor s.Fill.Fountain.StartColor, cfg
            DoReplaceColor s.Fill.Fountain.EndColor, cfg
            For Each c In s.Fill.Fountain.Colors
                DoReplaceColor c.Color, cfg
            Next c
    End Select
End Sub
This extract from code plus about 6 lines in "class" module (Class_Initialize, Save, Load), and in mainModule (cmOK_Click, UserForm_Initialize) is all I added.

My dream is make a drop-down list with current palette colors within main Dialog as it is made in standard outline dialog. Code samples are welcome ;-).
Someone also asked for a multicolor ColorReplacer. that would also be nice to do sometime...

P.S. Alex, thanx for appreciation ;-)
Reply With Quote
  #5  
Old 21-02-2006, 08:31
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

wOxxOm, could you please post the new gms module with your changes? I didn't quite understand your original post about where to put the code.
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #6  
Old 09-08-2006, 07:25
Michael Cervantes
Guest
 
Posts: n/a
Default Color Replacer

Alex the ZIP is a new file, but it content the old GMS Color Replacer.

Best regards
Reply With Quote
  #7  
Old 09-08-2006, 08:31
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Michael,

It seems to be Ok. I just tried the CorelDRAW version and it is new... Are you sure you are looking at the right GMS?
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
Cannot use Curveworks macros in a user witten macro??? jon46089 CurveWorks 2 02-03-2006 15:18
Help with Replace Macro Pumpkin_Masher Macros/Add-ons 1 21-09-2005 15:41
Adding a Reference on a pwd protected macro Rick Randall CorelDRAW/Corel DESIGNER VBA 9 27-10-2004 10:27
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 08:50
Speeding up a macro Rick Randall CorelDRAW/Corel DESIGNER VBA 2 12-12-2002 11:51


All times are GMT -5. The time now is 19:23.


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