OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > Corel Script > CorelDRAW CS

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2006, 11:45
geHucKa
Guest
 
Posts: n/a
Default Why CorelScript files doesn't work in X3

Hello.

Why CorelScript files from CD9 doesn't work with CDX3 even I'll fix objects name to 13? Error message is: Script <name> contains an error and could not be run. I tried to run blank script but it doesn't work to. How I can run old script files in CDX3?
Reply With Quote
  #2  
Old 04-10-2006, 12:41
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default CorelScript

If you want to send me the script I can look at it for you and let you know.

shelbym@v-cut.com

Thanks,

Shelby
Reply With Quote
  #3  
Old 05-10-2006, 16:25
geHucKa
Guest
 
Posts: n/a
Default

Why this script doesn't work?

REM

WITHOBJECT "CorelDraw.Automation.13"
.StartOfRecording
.SuppressPainting
.RecorderStorePreselectedObjects TRUE
.RecorderSelectObjectByIndex TRUE, 1
.ApplyOutline 0, 0, 0, 0, 0, 0, 0, -1, -1, FALSE, 0, 0, FALSE
.RecorderSelectObjectByIndex TRUE, 1
.ApplyOutline 84582, 1, 1, 1, 100, -900, 0, -1, -1, FALSE, 2, 0, TRUE
.StoreColor 2, 40, 40, 0, 60
.SetOutlineColor
.RecorderSelectObjectByIndex TRUE, 1
.DuplicateObject 0, 0
.RecorderSelectObjectByIndex TRUE, 2
.ApplyOutline 0, 0, 0, 0, 0, 0, 0, -1, -1, FALSE, 0, 0, FALSE
.RecorderSelectObjectByIndex TRUE, 2
.ApplyOutline 7112, 1, 1, 1, 100, -900, 0, -1, -1, FALSE, 2, 0, TRUE
.StoreColor 2, 100, 100, 0, 0
.SetOutlineColor
.RecorderSelectPreselectedObjects TRUE
.RecorderSelectObjectsByIndex FALSE, 2, -1, -1, -1, -1
.ApplyBlend TRUE, 20, 0, FALSE, 0, FALSE, FALSE, 0, 0, 0, TRUE, TRUE, FALSE, FALSE, 0, 0, 0, 0
.ResumePainting
.EndOfRecording
END WITHOBJECT
Reply With Quote
  #4  
Old 06-10-2006, 11:10
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default For X3

This will work for X3 place in your GMS:
Code:
Sub ApplicationCorelScript()

Dim cs As Object
Set cs = CorelScript

With cs
    .StartOfRecording
    .SuppressPainting
    .RecorderStorePreselectedObjects True
    .RecorderSelectObjectByIndex True, 1
    .ApplyOutline 0, 0, 0, 0, 0, 0, 0, -1, -1, False, 0, 0, False
    .RecorderSelectObjectByIndex True, 1
    .ApplyOutline 84582, 1, 1, 1, 100, -900, 0, -1, -1, False, 2, 0, True
    .StoreColor 2, 40, 40, 0, 60
    .SetOutlineColor
    .RecorderSelectObjectByIndex True, 1
    .DuplicateObject 0, 0
    .RecorderSelectObjectByIndex True, 2
    .ApplyOutline 0, 0, 0, 0, 0, 0, 0, -1, -1, False, 0, 0, False
    .RecorderSelectObjectByIndex True, 2
    .ApplyOutline 7112, 1, 1, 1, 100, -900, 0, -1, -1, False, 2, 0, True
    .StoreColor 2, 100, 100, 0, 0
    .SetOutlineColor
    .RecorderSelectPreselectedObjects True
    .RecorderSelectObjectsByIndex False, 2, -1, -1, -1, -1
    .ApplyBlend True, 20, 0, False, 0, False, False, 0, 0, 0, True, True, False, False, 0, 0, 0, 0
    .ResumePainting
    .EndOfRecording
End With

End Sub
Good Luck,

Shelby
Reply With Quote
  #5  
Old 08-10-2006, 14:59
geHucKa
Guest
 
Posts: n/a
Default

Thanks. Your solution works excellent.
Reply With Quote
  #6  
Old 09-10-2006, 10:27
geHucKa
Guest
 
Posts: n/a
Default

Hello.

Your solution works but I have a hundreds of old scripts with a lot of syntax incompatibility so it will a hell to fix them all. Can anybody find an easy way to fix old scripts?

Thanks.
Reply With Quote
  #7  
Old 18-10-2006, 15:13
geHucKa
Guest
 
Posts: n/a
Default

I DID IT!

Thanks to everybody, I found a problem myself. Fixed CorelScript files would work if you add two breakline symbols to the end of a script file (or something like this).
Reply With Quote
  #8  
Old 28-01-2007, 18:35
PSG
Guest
 
Posts: n/a
Default

Sorry for sounding stupid, but we lack the experience of script editing. We have many v.9 scripts that we would love to be able to use in X3.

Could or would elaborate visually on how you made these corrections. It would be a little easier for us to understand.
Reply With Quote
  #9  
Old 29-01-2007, 08:14
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

You need to open a script file (.csc) in a text editor such as the Notepad. You'll see a line similar to this somewhere close to the top of the file:

Code:
WITHOBJECT "CorelDraw.Automation.9"
Replace the 9 for 13 so that this line reads:

Code:
WITHOBJECT "CorelDraw.Automation.13"
and save the file back.

If you have a search and replace utility that can do text replacing in multiple files you can do this on all your CSC files and replace "CorelDRAW.Automation.9" with "CorelDRAW.Automation.13"

This should do the trick.
Reply With Quote
  #10  
Old 10-02-2007, 08:41
PSG
Guest
 
Posts: n/a
Default

Thank you!!
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
Saving File while auto generating Jpg files vindaa Macros/Add-ons 16 03-01-2007 19:44
saving draw i2 files as draw 11 files KDJ General 5 01-03-2006 17:26
Multiple files in for filtering Loadus Corel Photo-Paint VBA 2 27-04-2005 16:09
Transfer shapes from Draw to Paint; Using CorelScript in VB6 DWGraphics Corel Photo-Paint VBA 1 18-08-2004 20:49
Would you miss CorelScript object? Alex CorelDRAW/Corel DESIGNER VBA 32 04-02-2004 14:59


All times are GMT -5. The time now is 06:09.


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