Jump to content

Recommended Posts

Posted (edited)

Hello! I was wondering why there are no UDFs (on this forum) for automating Adobe software. So, I decided to start writing one for Photoshop.

Features:

  • Creating, opening and saving documents
  • Manipulating layer settings
  • Applying effects to layers

Now, the UDF is pretty limited, but my goal is to implement the whole Photoshop's VBScript interface.

Have fun!

Adobe Photoshop UDF

Edited by scintilla4evr
Posted

New version:

  • Added _Photoshop_SelectionFill
  • Added _Photoshop_GetDocs
  • Added _Photoshop_DocGetHistoryState, _Photoshop_DocGetHistoryStateCount, _Photoshop_DocGetHistoryStates
  • Added _Photoshop_HistoryStateGetName, _Photoshop_HistoryStateIsSnapshot
  • Added _Photoshop_DocGetActiveLayer, _Photoshop_DocSetActiveLayer
  • _Photoshop_DocGetLayer can now return ArtLayer or LayerSet object
  • Added _Photoshop_ObjectGetType
  • Renamed _Photoshop_ArtLayerGetName to _Photoshop_LayerGetName
  • Renamed _Photoshop_ArtLayerSetName to _Photoshop_LayerSetName
  • Renamed _Photoshop_ArtLayerGetBlendMode to _Photoshop_LayerGetBlendMode
  • Renamed _Photoshop_ArtLayerSetBlendMode to _Photoshop_LayerSetBlendMode
  • Renamed _Photoshop_ArtLayerGetOpacity to _Photoshop_LayerGetOpacity
  • Renamed _Photoshop_ArtLayerSetOpacity to _Photoshop_LayerSetOpacity
  • Renamed _Photoshop_ArtLayerGetBounds to _Photoshop_LayerGetBounds
  • Renamed _Photoshop_ArtLayerSetBounds to _Photoshop_LayerSetBounds
  • Renamed _Photoshop_ArtLayerMergeDown to _Photoshop_LayerMergeDown
  • Renamed _Photoshop_ArtLayerTranslate to _Photoshop_LayerTranslate
  • Added _Photoshop_LayerSetGetLayer, _Photoshop_LayerSetGetLayerCount, _Photoshop_LayerSetGetLayers
  • Added _Photoshop_LayerIsVisible, _Photoshop_LayerSetVisible
  • Added _Photoshop_LayerDelete
  • Added _Photoshop_LayerRotate, _Photoshop_LayerResize

Some of these changes are SCRIPT BREAKING, so remember to update your scripts!

Adobe Photoshop UDF

Posted
  On 7/20/2016 at 5:08 AM, kitoy said:

Hi Sir, I found this error while running the script.

 

 

Capture.PNG

Expand  

Ah, I completely overlooked it. It should be

If Not IsObj($oObj) Then SetError(1, 0, 0)

I updated the UDF, so you can just download the new version or edit the code yourself.

  • 4 weeks later...
Posted
  On 7/20/2016 at 10:14 AM, scintilla4evr said:

Ah, I completely overlooked it. It should be

If Not IsObj($oObj) Then SetError(1, 0, 0)

I updated the UDF, so you can just download the new version or edit the code yourself.

Expand  

maybe like this :

If Not IsObj($oObj) Then Return SetError(1, 0, 0)


?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 8/14/2016 at 3:02 PM, mLipok said:

maybe like this :

If Not IsObj($oObj) Then Return SetError(1, 0, 0)


?

 

Expand  

Oh, I missed Return in the post, the line in the UDF is fine.

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...