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 20-09-2005, 23:41
Yourick
Guest
 
Posts: n/a
Question Corel Script in VB

Sorry for dummy question or bad english. I have a problem:
How to properly create CorelScript object? I want to use its functionality
(AdaptiveUnsharp for exmpl), but when i do smth like this:

Dim cs as CorelScript
Set cs = new CorelScript
cs.EffectAdaptiveUnsharp 25

He says me smth about cant create automation ..

I tryed to like this

Set cs = Applicatione.CorelScript

no effect :(

May be i should associate script with document? how? original manual is like poetry but not technical documentation :/ maybe u now normal documentation with examples?

i believe its possible your answer will exist :)
Reply With Quote
  #2  
Old 21-09-2005, 00:42
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Well, what you need to do is to get it from Application.CorelScript, as you showed in your example, but you need to declare your variable as Object and not CorelScript.

That is:

Code:
Dim cs As Object
Set cs = Application.CorelScript
cs.BitmapEffect ...
Obviously you will not have any context sensitive help from VBA if you declare the variable as generic Object, therefore I first declare it as CorelScript, create my script and make use of all the intellisense that VBA editor provides and then just before running it I rename it back to Object.
Reply With Quote
  #3  
Old 17-05-2006, 09:47
Yourick
Guest
 
Posts: n/a
Default

Thank You for help! %)
Reply With Quote
  #4  
Old 22-01-2008, 10:42
Bookman
Guest
 
Posts: n/a
Red face Getting Corel Script to work in VBA on Photo Paint Background

Apologies for continuing with another dumb question following from the 1st post in this thread.

I am using Corel Photo Paint 12 and was rather surprised that Photo Paint did not come with a Recorder.

I use a scanner to scan a series of pictures.

The process is scan, then load the picture into Corel Photo Paint 12.

The purpose of loading into Corel Photo Paint 12 is so that I can process the scanned jpg to Remove Noise, Moire, Brighten and Auto Equalize and Rotate it 90 degrees clockwise

I realized that when the scanned jpg is loaded into Corel Photo Paint 12, it is showned in the Photo Paint Object Docker as a Background.

I thought that the VBA would go something like

Sub RemoveNoiseBrightenRotate()
Dim cs As Object
Set cs = Application.CorelScript
cs.EffectRemoveNoise Auto
cs.ImageBCI 58, 2, 14

Documents(1).Background.Parent.Rotate 90
End Sub

All the VBA routine does is Rotate the Background 90 degrees clockwise. No error was thrown up when it is runned.

Any help would be much appreciated in getting the Corel Script commands to work on the Background image.

Thanks.
Reply With Quote
  #5  
Old 23-01-2008, 06:40
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

there is a Recorder docker, available from Windows->Dockers
Reply With Quote
  #6  
Old 23-01-2008, 07:21
Bookman
Guest
 
Posts: n/a
Thumbs up

Thanks for the heads-up.

I was just about to post here too that there is indeed a Recorder.

I came across it in another post in this forum here

Corel Photo-Paint 10/11 ImageBCI, BitmapEffect, etc. - OberonPlace.com Forums
[/quote]"The best way to figure out the parameters to be used with bitmap effects, just record a script using Recorder docker, then save it to CSC file and see what is generated... That was the way I did it when I created the converter..." [/quote]

http://forum.oberonplace.com/showthread.php?t=5
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
Turning on color calibration in a Corel Script Alien2001 CorelDRAW CS 2 14-07-2005 00:34
Corel Script "user32.dll" SetWindowPos richard_austria CorelDRAW CS 0 02-06-2005 08:45
Load a corel script and execute it adriano Corel Photo-Paint VBA 2 14-04-2004 11:15
Corel 10 file conversion script doesn't convert files Kevin CorelDRAW CS 0 13-04-2003 21:28
Corel Capture 8 and Corel Script Helix CorelDRAW CS 0 13-12-2002 19:10


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


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