Getting started

Discussion in 'Scripting and Programming' started by George Silvis, Mar 12, 2015.

  1. George Silvis

    George Silvis Cyanogen Customer

    Joined:
    Dec 4, 2014
    Messages:
    30
    How do you access the Maxim.Application class?

    Getting "Class not defined: 'Maxim'"

    My test script is just this:
    Set TheApp = New MaxIm.Application
    Set AllDocs = TheApp.Documents
    wscript.echo AllDocs.Item(0).DisplayName

    I'm sure its a simple problem, but those first steps are big to the beginner.

    My goal is to grab the current document and run the extract bayer routine on it, creating files with R, B and the average of the G channels.

    Thanks,
    George
     
  2. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,164
    VBScript isn't like VB; it can't be set to have a reference to the object. So you have to do a CreateObject.

    If I recall correctly, the syntax is:

    Set TheApp = CreateObject ("MaxIm.Application")
     
  3. George Silvis

    George Silvis Cyanogen Customer

    Joined:
    Dec 4, 2014
    Messages:
    30
    That did it! Thank you!
    George
     

Share This Page