![]()
|
Upgrading Paint 8 scripts to Paint 9Object HandlingCorel Photo-Paint 9 has improved object handling procedures which allow to apply some transformations to several objects at once. To accommodate this functionality, most of ObjectNNN scripting commands were extended to support multi-object targets. These commands now require EndObject command to finish the clause. You can put ObjectSelectNone and ObjectSelect statements in between to specify which objects to apply transformations to. For example, to move object 1 and 2, you should use: .ObjectTranslate .ObjectSelectNone .ObjectSelect 1, True .ObjectSelect 2, True .EndObject If you do not specify ObjectSelect statements, the operation is performed on the currently selected objects. However there are some ObjectNNN commands that do not need EndObject command. These are commands that do not work with selected objects. They work with a specific object. Here is the list of all ObjectNNN command that require EndObject and those which don't:
Notes: *1 - ObjectCreate accepts SetPaperColor command between ObjectCreate and EndObject to set the background color of the cut region. *2 - ObjectSelection is meant to just select given objects without performing any actions on them. Unfortunately due to a bug, this command doesn't work *3 - ObjectColorTransparencyTool requires EndObjectColorTransparencyTool to close the command, rather than EndObject *4 - ObjectTagWWWURL should be closed with EndObjectTagWWWURL, not EndObject *5 - ObjectTransparencyTool should be closed with EndObjectTransparencyTool rather than EndObject. Also note, that ObjectDropShadow has different arguments than in Paint 8: Sub ObjectDropShadow(Mode AS Boolean, Direction AS Long, Distance AS Long,
Feather AS Long, Type AS Long, Edges AS Long, Opacity AS Long,
Relative AS Boolean, Fade AS Long, Anchor AS Long, Stretch AS Double,
ColorModel AS Long, Color1 AS Long, Color2 AS Long, Color3 AS Long,
Color4 AS Long)
MaskCreate commandMaskCreate command now requires EndMaskCreate to close the command. ObjectSelectNone and ObjectSelect can be used in between to specify which objects to use to build a new mask... Effect changesAlong with numerous new bitmap effects introduced in Photo-Paint 9, there are some changes to existing effects. You should keep this in mind when translating old scripts to version 9. Here is the list of changed commands (see this document for more information about changed commands in Photo-Paint 9):
Other changesSome other commands have been also changed:
If you noticed some other compatibility issues when transferring Paint 8 scripts to Paint 9 platform, please let me know. Any comments are greatly appreciated. |
[ CorelSCRIPT Tips&Tricks | Learning CorelSCRIPT | Oberon Home Page ] |
|
Copyright © 2000 by Alex Vakulenko. All rights reserved.
|