connecting users of the CorelDRAW family of products

script recorder with "inverteffect" not working

rated by 0 users
Not Answered This post has 0 verified answers | 27 Replies | 2 Followers

Share  
Page 2 of 2 (28 items) < Previous 1 2 | RSS

weinberger posted on Wed, Apr 13 2011 3:14

Hy all,

by "normal" inverting an b/w image the image changes the colours in black or white.

when recording the invert image process the script shows:

WITHOBJECT "CorelPHOTOPAINT.Automation.13"
    .BitmapEffect "Invertieren", "InvertEffect "
END WITHOBJECT

But when I play the recorded script nothing happens. No invert. No changing colours. Other scripts like Mask Rectangle or Adding Guidelines work.

Using Corel photo-paint x3 v.13.0.0.576. Don't know if I have Corel Service Packs installed. I don't think so.

Has anybody an idea?

Thx in advance,

weinberger

All Replies

Top 10 Contributor
Melbourne
Male

Hi Weinberger,

I am not quite sure if I am understanding you correctly. I am interpreting what you are saying to mean you want to export the whole page so that you get all the graphics, plus a white background the size of the A4 page? I am then assuming when you said "adding a picture frame" you meant you are creating a rectangle the size of the page? If I have interpreted you correctly, here are my responses to your 3 questions:

  1. All you need to do is double-click the rectangle tool to create a rectangle the size of the page and give it no outline and no fill. Select all before you export and you will get the A4 sized image.
  2. Black and White is NOT greyscale. Everything in the exported image will be black or white and nothing in between. Your disappearing shape is not being deleted, it is actually being turned white which does not show against the white background. On exporting CorelDraw has a threshold where everything from that lightness level upwards will become white, everything darker than the threshold will become black. If you want your image to appear exactly as it does in the CorelDraw file then choose "Greyscale" instead of "Black and White". If you specifically want to have black and white for file size reasons, or whatever, then change the colour values of that particular shape from 0,0,0,50 to say 0,0,0,60. Please note that it will become BLACK in the resulting black and white tif.
  3. In the reply window in the forums it is normal to drop 2 lines when you hit enter. Press Shift+Enter to move down one line only.

Best regards,
Brian.

Brian Melbourne

Top 10 Contributor
Melbourne
Male

I forgot to mention, I think you have an extra "unwanted" shape in your design. Look in the Object Manager and where the light grey (vanishing) shape is, there is another shape above it which does not appear to be doing anything in your design.

Best regards,
Brian.

Brian Melbourne

Normal 0 21 false false false DE-AT X-NONE X-NONE MicrosoftInternetExplorer4

Hi Brian,

thank you for your great help. You understood and interpreted it correctly. Sorry for my wrong amateur words.
All your tips helped.

But I don't understand how to export/convert attached cdr-file that it looks like the attached tif-file (see following post).
When I change the colour values, like you proposed, than the paint brush graphic - layer 1 -  in the cdr file will convert into deep black. But the paint brush graphic in the tif file is not black and it should look like this.

Best wishes and good start into the week.

weinberger


Top 10 Contributor
Melbourne
Male

Hi Weinberger,

do you know which program the Tiff you posted was saved from? It is1bit b&w, but has a compression method different to those offered in Photo-Paint. I have attached a Tiff for you, is this acceptable? If it is I will tell you how I created it. The shading of the shape in question is a little different to the shape in your attached Tiff, most likely due a different program being used to perform the 1bit conversion.

Best regards,
Brian.

Brian Melbourne

Hi Brian,

it think it was exported from Corel Draw. I have the possibility to select the CCITT 4 compression (1bit  b/w) method. At least with my corel graphics suite x3. In Draw as well in Photo-Paint. I found and have other documents which are compressed with this method too.

I can open your tiff file and I can see it was compressed with LZW. Maybe I can use this compression. But in this company they used to compress it with CCITT. So I'd like to continue the tradition as no one knows why this compression is used. ;-)

Best regards,

weinberger

@twieker:

vba macro works partly: invert works, zoom doesn't function.

I placed your VBA macro in C:\Users\Username\AppData\Roaming\Corel\Graphics13\User CorelPHOTO-PAINT\GMS

What I don't understand is how to use the VBA Macro or whats the reason of the VBA Macro? Because to use the macro I have to click the VB "play"-toolbutton, find the macro and then click "execute".

But only one Active Window is edited. And I can't use the macro for batch processing. Or is it possible?

With the tool buttons "invert" and "100% zoom" I have the same result, with one click less.

Thank you very much anyway.

Kind regards,

weinberger

Top 10 Contributor
Melbourne
Male

Hi Weinberger,

You can place buttons on your toolbars for VBA macros in the same way you can place a shortcut button for anything else. i.e. Tools>Customization>Commands and then choose Macros in the drop-down list. Find the macro of interest and drag to a toolbar. It then becomes a one-click process to run it.

I just realised that you are talking about the VBA macro regarding the rulers. You shouldn't have to do anything with that one. As soon as you open a document the rulers should appear automatically without you having to click on anything - as long as "Delay VBA" is NOT ticked in Tools>Options>VBA.

Best regards,
Brian.

 

Brian Melbourne

Hi Brian,

ah, that's they way it works. Newbie says again: Thank you very much. But as mentioned only inverting works zooming doesn't.
No, I wasn't talking about the rulers macro.  Twieker wrote an invert.gms-macro what I was talking about.

Your ruler macro bdshowrulers.gms doesn't work as I wrote in one of my previous post. And I'm not able to edit your provided macro-code as I am absolutely not firm with VB.

Best regards,
weinberger

weinberger:
vba macro works partly: invert works, zoom doesn't function.

Not entirely sure what you mean here - zoom isn't supposed to change, at the end the zoom state is set back to the original setting.
weinberger:
What I don't understand is how to use the VBA Macro or whats the reason of the VBA Macro? Because to use the macro I have to click the VB "play"-toolbutton, find the macro and then click "execute".

Yes that's a bother .. but you can also assign a keyboard shortcut to it!
But you are right, it is not a solution for batch processing ..

Hi Twieker,

your code is:

z = ActiveWindow.Zoom
ActiveWindow.Zoom = 100

With CorelScript
    .BitmapEffect "Invert", "InvertEffect "
End With

ActiveWindow.Zoom = z
End Sub

Doesn't that mean that the active window should zoom to 100%?

Best regards,
weinberger

weinberger:

Hi Twieker,

your code is:

z = ActiveWindow.Zoom
ActiveWindow.Zoom = 100

With CorelScript
    .BitmapEffect "Invert", "InvertEffect "
End With

ActiveWindow.Zoom = z
End Sub

Doesn't that mean that the active window should zoom to 100%?


No, I first get the present zoom state (variable z), and at the end restore it to that percentage.

By the way, have you already tried setting zoom on opening to 100% by default? (Options)
A batch process script (Corelscript) should simply work then.

 

Hi Brian, hi Twieker

I forgot to say thank you

THANK YOU for your help.

Cheers

Page 2 of 2 (28 items) < Previous 1 2 | RSS
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions / User Guidelines.