lohriialo / photoshop-scripting-python

Scripting in Photoshop is used to automate a wide variety of repetitive task or as complex as an entire new feature
485 stars 95 forks source link

Example of setting/getting the active tool? #6

Closed Hyperlooper closed 5 years ago

Hyperlooper commented 5 years ago

Thank you so much for these awesome examples, your repo is the best source of info I have found on using python with Adobe ps. I've been trying to get and set the active Photoshop tool via python and I just don't think I have the syntax quite right because all the examples are in JavaScript. Does anyone happen to have an example of doing this in Python?

lohriialo commented 5 years ago

print(app.CurrentTool) gives you the string name of the current selected tool

and to select the tool, set the string name of the tool app.CurrentTool = 'cropTool'