0 Replies Latest reply on Dec 16, 2013 9:49 AM by graphics26

    Active X can not create running Scriptlistener VB code in Creative Cloud Photoshop

    graphics26

      Currently, I am recieving an Active X can not create error when running this code. I use Visual Studio 2012 run as administrator in x86 mode, Creative Cloud 32bit run as administrator. OS is windows .

       

      I am able to access the com library for CC in VS. When I run into troubleshooting this  Script listener code, this type of code appears in several different functions throughout the application. I am getting an Active X error when the CreateObject("Photoshop.ActionDescriptor") is hit.

       

      I am also logged in as an administrator of the box. I have created the process from a scriptlister log with the CS6 Scriptlistener in CC.  

       

      Any direction or feedback is appreciated. I need to know if I am missing something obvious.

       

      Thank you,

       

       

        Sub psAddGuide(ByVal pixelLocation As Integer, ByVal orientation As Integer) '0 = vertical, 1 = horizontal

              If orientation = 1 Or orientation = 0 Then

                  Dim orientationID As String = ""

                  If orientation = 0 Then

                      orientationID = "Vrtc"

                  Else

                      orientationID = "Hrzn"

                  End If

                  'Script Listener code - don't blame me.

                  Dim objApp = CreateObject("Photoshop.Application")

                  REM Use dialog mode 3 for show no dialogs

                  Dim dialogMode As Integer = 3

                  Dim id6

                  id6 = objApp.CharIDToTypeID("Mk  ")

                  Dim desc3

                  desc3 = CreateObject("Photoshop.ActionDescriptor")

                  Dim id7

                  id7 = objApp.CharIDToTypeID("Nw  ")

                  Dim desc4

                  desc4 = CreateObject("Photoshop.ActionDescriptor")

       

       

                  Dim id8

                  id8 = objApp.CharIDToTypeID("Pstn")

                  Dim id9

                  id9 = objApp.CharIDToTypeID("#Pxl")

                  Call desc4.PutUnitDouble(id8, id9, pixelLocation)

                  Dim id10

                  id10 = objApp.CharIDToTypeID("Ornt")

                  Dim id11

                  id11 = objApp.CharIDToTypeID("Ornt")

                  Dim id12

                  id12 = objApp.CharIDToTypeID(orientationID)

                  Call desc4.PutEnumerated(id10, id11, id12)

                  Dim id13

                  id13 = objApp.CharIDToTypeID("Gd  ")

                  Call desc3.PutObject(id7, id13, desc4)

                  Call objApp.ExecuteAction(id6, desc3, dialogMode)

              End If

          End Sub