🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.photoshop.scripting
Article #1906

Re: Changing selection into pattern (PS7/VB)

#1906
From: syrtti_smith
Date: Mon, 05 Jul 2004 15:15
63 lines
3220 bytes
Thanks Mick, that helped a lot.
I got pretty far just by playing with it, but there's a little problem... I can't change the pattern to any other pattern, it always does it with the one I originally recorded it with. Even though I THINK that I tried to change it the right way. Obviously I didn't... So, here's what it gave me:

Sub Pattern(pttrn)

Rem =======================================================
Dim objApp
Set objApp = CreateObject("Photoshop.Application")
Rem Use dialog mode 3 for show no dialogs
Dim dialogMode
dialogMode = 3
Dim id442
id442 = objApp.CharIDToTypeID("Mk ")
    Dim desc96
    Set desc96 = CreateObject("Photoshop.ActionDescriptor")
    Dim id443
    id443 = objApp.CharIDToTypeID("null")
        Dim ref78
        Set ref78 = CreateObject("Photoshop.ActionReference")
        Dim id444
        id444 = objApp.StringIDToTypeID("contentLayer")
        Call ref78.PutClass(id444)
    Call desc96.PutReference(id443, ref78)
    Dim id445
    id445 = objApp.CharIDToTypeID("Usng")
        Dim desc97
        Set desc97 = CreateObject("Photoshop.ActionDescriptor")
        Dim id446
        id446 = objApp.CharIDToTypeID("Type")
            Dim desc98
            Set desc98 = CreateObject("Photoshop.ActionDescriptor")
            Dim id447
            id447 = objApp.CharIDToTypeID("Ptrn")
                Dim desc99
                Set desc99 = CreateObject("Photoshop.ActionDescriptor")
                Dim id448
                id448 = objApp.CharIDToTypeID("Nm ")

' Here's the line where the pattern number was originally, I
' changed it to "pttrn" and tried to call for it as it was done in
' the example (the example script works fine)
Call desc99.PutString(id448, "pttrn")
                Dim id449
                id449 = objApp.CharIDToTypeID("Idnt")
                Call desc99.PutString(id449, "3df16fc5-a517-11d8-86b4-e7f432fbac1c")
            Dim id450
            id450 = objApp.CharIDToTypeID("Ptrn")
            Call desc98.PutObject(id447, id450, desc99)
        Dim id451
        id451 = objApp.StringIDToTypeID("patternLayer")
        Call desc97.PutObject(id446, id451, desc98)
    Dim id452
    id452 = objApp.StringIDToTypeID("contentLayer")
    Call desc96.PutObject(id445, id452, desc97)
Call objApp.ExecuteAction(id442, desc96, dialogMode)

End Sub
Call Pattern(1)

That dialogMode confuses me, how do I get it show the dialog and do I want it to show it?
I'm missing something here and well, there's a lot of script I don't even begin to understand... Can anyone help me? Thanks.

-syrtti-
Technical Details
Message-ID: <3bb4e719.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <3bb4e719.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,ed85e94e6ec00a8c
X-Google-Attributes: gidf5839,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: syrtti_smith@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.photoshop.scripting
Subject: Re: Changing selection into pattern (PS7/VB)
Message-ID: <3bb4e719.1@webx.la2eafNXanI>
Date: Mon, 5 Jul 2004 08:15:42 -0700
References: <3bb4e719.-1@webx.la2eafNXanI>
Lines: 70
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit