我想在 Photoshop 中找到一个画笔工具按钮的位置。 Photoshop 脚本可以实现这一点吗? 是否可以获取某个编辑框的值(例如画笔大小)?
是否可以这样做:
'PsJavaScriptExecutionMode Enums
Const psNeverShowDebugger = 1, psDebuggerOnError = 2, psBeforeRunning = 3
Dim appRef
Set appRef = CreateObject("Photoshop.Application")
Dim pos
pos = appRef.ControlPosition("paintbrushTool") //this is made up
最佳答案
你问的是两件不同的事情:
某个编辑框的值(例如画笔大小)
画笔工具本身的位置。这是一个用户界面问题。
我的理解是,对于第一个问题,您最好创建一个画笔并编写一些脚本来选择该预设,而不是尝试以编程方式更改画笔大小,但我可能是错的。
This thread来自 Adobe 论坛的声音听起来与您想要完成的任务相关,涉及画笔和窗口:
• get the current values
• adjust the value of the one property you want to change, like rotation
• set the values
不幸的是,我认为原始发帖人对答案不满意。
制作自己的面板可能比尝试编写现有画笔面板的脚本更好,但我可能是错的。
根据 Adobe CC 的旧 JavaScript 工具指南,我发现有一个 ScriptUIBrush 对象:
ScriptUIBrush object A helper object that encapsulates the qualities of a brush used to paint fill into a path in a control. Create with the newBrush() method of the ScriptUIGraphics object.
希望这会有所帮助!
关于javascript - Photoshop 脚本获取控制位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48562900/