OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 05-11-2009, 17:44
Posts: n/a
Default Selecting images in Photo Paint


I dealt with Corel Script the first time for a couple of hours now, but I can't find a solution for a (maybe) simple problem. Sorry for my bad english - I'm from Germany

I've got an image in Photo Paint, and I have to split this image into CMYK channels. The result are four new, unsaved images, and (from the Corel Script point-of-view) I do not know the exact names of those new images (because of the numeration added by Corel). I do only need the "magenta" channel image to be saved, all other images should be closed automatic.

I found all the functions to do this task, including to count the documents, and to check the name of the active image. But I did not found a way to activate the next image, without knowing the name.

To be more brief, what I'm trying to do is:

For iAmount% = 1 to .GetDocumentCount
-> Activate Document (iAmount%)
-> Read name an check

I did not expect this to be the hardest part of this. Maybe someone's having a hint?
Reply With Quote
Old 09-11-2009, 17:04
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 13
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 Close all but Magenta

You didn't mention what version you are using, but in Photo-Paint X4, you could do something like this. It should close all the documents except the ones with the word "Magenta" in them.
Sub CloseAllButMagenta()
    Dim doc As Document
    Dim iPos As Integer
    For Each doc In Application.Documents
        If InStr(doc.FileName, "Magenta") = 0 Then doc.Close
    Next doc
End Sub
Best of luck,

Reply With Quote

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
Paint Shop Pro vs Photo Paint fungel About Corel 1 07-05-2009 16:49
New Photo-Paint improvements Robbiex General 3 30-08-2007 08:53
corel photo paint 8 1946out General 2 03-08-2006 16:25
Photoshop brushes (.abr) in Photo-Paint? vallentin General 1 02-02-2006 22:52
Photo-Paint Scripts pudo Corel Photo-Paint CS 1 13-07-2005 12:48

All times are GMT -5. The time now is 11:18.

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