OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-05-2007, 07:11
longline
Guest
 
Posts: n/a
Default Error in script

Hallo.

I receive an unspecified error while running a script. I marked with "REM" all the lines but one, to check where the error is, and I found it here:

.BitmapEffect "Curva tono", "ToneCurveEffect ToneCurveTable=0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|1|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|18|19|20|21|22|23|25|26|27|28|30|31|32|33|" & _
"35|36|37|39|40|42|43|44|46|47|49|50|52|53|55|56|58|59|61|63|64|66|67|69|71|73|74|76|78|79|81|83|85" & _
"|87|88|90|92|94|96|98|100|102|103|105|107|109|111|113|115|117|119|122|124|126|128|130|132|134|136|" & _
"139|141|143|145|148|150|152|154|157|159|161|164|166|168|171|173|176|178|180|183|185|188|190|193|195" & _
"|198|201|203|206|208|211|214|216|219|222|224|227|230|233|235|238|241|244|246|249|252|255|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|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0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|"

I absolutely need to use this command, can anoybody help me?
Thank you very much!
Reply With Quote
  #2  
Old 07-05-2007, 07:16
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

working fine here.
What's your PP version?
Reply With Quote
  #3  
Old 07-05-2007, 07:25
longline
Guest
 
Posts: n/a
Default

Oops...
PP 12 italian, on WinXp SP2
Reply With Quote
  #4  
Old 07-05-2007, 07:33
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

work ok:
RGB image
PP 12.0.536 english
I forgot do I have 12sp1 or not :-)
Reply With Quote
  #5  
Old 07-05-2007, 07:53
longline
Guest
 
Posts: n/a
Default

The strange thing is that I created this script with the built-in recorder, so I wonder why it doesn't work. This sounds really weird!
Here is the complete script:

REM Creato con Corel PHOTO-PAINT Versione 12.0.0.536
REM creato il Monday, May, 07, 2007 da Paolo

WITHOBJECT "CorelPhotoPaint.Automation.12"
.ImageConvert 2, 1, 0, 0, 0, 0, 0, 0, 0, FALSE
.BitmapEffect "Curva tono", "ToneCurveEffect ToneCurveTable=0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|1|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|18|19|20|21|22|23|25|26|27|28|30|31|32|33|" & _
"35|36|37|39|40|42|43|44|46|47|49|50|52|53|55|56|58|59|61|63|64|66|67|69|71|73|74|76|78|79|81|83|85" & _
"|87|88|90|92|94|96|98|100|102|103|105|107|109|111|113|115|117|119|122|124|126|128|130|132|134|136|" & _
"139|141|143|145|148|150|152|154|157|159|161|164|166|168|171|173|176|178|180|183|185|188|190|193|195" & _
"|198|201|203|206|208|211|214|216|219|222|224|227|230|233|235|238|241|244|246|249|252|255|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|" & _
"0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" & _
"|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|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ffect "Luminosità/Contrasto/Intensità", "BCIEffect BCIBrightness=0,BCIContrast=50,BCIIntensity=0"
.BitmapEffect "Luminosità/Contrasto/Intensità", "BCIEffect BCIBrightness=0,BCIContrast=50,BCIIntensity=0"
.ImageConvert 5, 1, 0, 0, 0, 0, 0, 0, 0, FALSE
END WITHOBJECT

The process is:
- convert image in greyscale (the original is RGB)
- apply tone curve
- apply contrast
- apply contrast
- convert image in CMYK
Reply With Quote
  #6  
Old 10-05-2007, 08:13
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

I tried this command in VBA macro:

Code:
sub MySub()
   with Application.CorelScript
      .ImageConvert 2, 1, 0, 0, 0, 0, 0, 0, 0, FALSE
      .BitmapEffect "Curva tono", "ToneCurveEffect Ton....................
.........................
   end with
end sub
it works
Reply With Quote
  #7  
Old 13-05-2007, 12:01
longline
Guest
 
Posts: n/a
Default

Too bad, still it doesn't work

Can you send me the working .csc file or attach it to this thread? Thank you!
Reply With Quote
  #8  
Old 13-05-2007, 12:20
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

I mean that I don't use CSC. I use VBA macro.
Tools->VisualBasic->Editor
Reply With Quote
  #9  
Old 13-05-2007, 16:01
longline
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by wOxxOm View Post
I mean that I don't use CSC. I use VBA macro.
Tools->VisualBasic->Editor
Great, it works!

BUT

I'm trying to apply this sequence of commands to about 150/200 images. So I have to use Batch operations (please excuse my definitions: I'm using Italian version of PP and I'm trying to translate terms and menu commands that may differ from the English version). And Batch works only with CSC...

What can I do?

Thank you very much!


p.s.: I noticed that I can create a button that runs the macro. This is really much faster than me running every command, or than me running the macro from Tools > VisualBasic > etc, but I still have to open groups of images, click on my macro-button, then save all of the images... Batch conversion will be extremely faster!

Last edited by longline; 13-05-2007 at 16:08.
Reply With Quote
  #10  
Old 13-05-2007, 16:09
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

It's not too complicated to write a wrapper procedure for processing many files in VBA

How your files are organized? I mean how do you specify which files will be processed? a folder name? a list of files added manually? I never used csc batch processing...
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
NEED HELP ON CORELDRAW SCRIPT. FREE PHOTO CALENDAR IF U CAN! johnlfitz CorelDRAW/Corel DESIGNER VBA 8 06-06-2008 22:59
Invoking a script from COM RobC CorelDRAW/Corel DESIGNER VBA 2 16-03-2007 11:52
Turning on color calibration in a Corel Script Alien2001 CorelDRAW CS 2 13-07-2005 23:34
VB script to save JPG (photopaint12) tonywong Corel Photo-Paint VBA 2 17-05-2005 08:27
Cropmarks script Peter Macros/Add-ons 0 06-11-2003 03:51


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


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