This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Computer Graphics with Photoshop > May 2005 > phEventSet - What's wrong with this VB code?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author phEventSet - What's wrong with this VB code?
davemen@hotmail.com

2005-05-27, 7:15 pm

What's wrong with this code? I keep getting an error and can't figure
it out.

Public Function changeText(mytext As String)
Dim descriptor As IActionDescriptor
Dim descriptor2 As IActionDescriptor

Dim reference As IActionReference
Dim result As IActionDescriptor

' create the descriptor and reference objects

Set descriptor = PSApp.MakeDescriptor
Set descriptor2 = PSApp.MakeDescriptor
Set reference = PSApp.MakeReference

'*********************************select the layer********
reference.PutName phClassLayer, "Cool Tools"
descriptor.PutReference phClassNull, reference

gControl.Play phEventSelect, descriptor, 1

'******************************************************

reference.PutEnumerated phClassTextLayer, phTypeOrdinal,
phEnumTarget
descriptor.PutReference phKeyNull, reference


'****************************************************************************
'Mytext is the text passed into the function -
******************************

'****************************************************************************
descriptor.PutString phKeyText, mytext

descriptor2.PutObject phKey_Source, phClassTextLayer, descriptor

gControl.Play phEventSet, descriptor, 1
End Function

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews