我正在尝试使用Applescript在photoshop中自动执行一个任务。
尝试打开文件时:
tell application "Adobe Photoshop CS5"
-- Open the first image
set filePath to alias "Users:jameshale:Pictures:DSC_1273.jpg"
with timeout of 5 seconds
open filePath as Camera RAW
end timeout
end tell
结果是一个错误:
error "Adobe Ph
我正在试着写一段自动创建文件的代码。我需要插入另一个psd文件作为一个单独的层到程序正在创建的一个。我还需要调整插入文件的大小和位置。插入的文件是psd。我目前在photoshop-cc15工作。我在AppleScript工作,也需要在AppleScript中的解决方案。我也在做Photoshop CC15
我尝试过加载和打开命令,但由于某种原因,photoshop看不到该文件。我已经多次检查了该文件的路径,它肯定是正确的。
tell application "Adobe Photoshop CC 2015"
-- Create a new document.
我正在用Applescript创建一个droplet,它基本上会在photoshop CS6中打开文件,然后处理它。
到目前为止,我还不能通过打开文件的比特。有没有人能找出这段代码的错误:
on open {the_PDFs}
set myFilePath to the_PDFs
tell application "Adobe Photoshop CS6"
open myFilePath as PDF with options {class:PDF open options, mode:RGB, resolution:300, page:x, constrai
我需要将一些图像分组到一个photoshop文件中,并尝试寻找更优化的路径。我知道我可以使用applescript来做这样的事情。
tell application id "com.adobe.Photoshop"
activate
open file (CurrentImg)
duplicate layer 1 of current document to end of NewDocRef
end tell
-- CurrentImg is some file path and NewDocRef is a path to some other open docu
如何根据图像在本地计算机上的位置获取图像,并将其插入具有扩展脚本的图层?
var doc = app.documents.add();
var layer = doc.artLayers.add();
var img = new File('~/Desktop/tanks.png');
layer.image = img; //I want to add the image to this layer
我所能做的就是打开图像作为背景,在这个过程中创建一个新的photoshop文档;
var opened = open(img);
但是我想要实现的是将多个图像打开到同一个文档中
可以在applescript中调用javascript文件函数吗?在applescript文件中编写100%时,我可以让它工作,或者我可以使用"do文件某些文件“。有办法把这两者混合起来吗?就像这样:
tell application id "com.adobe.Photoshop"
tell current document
do javascript "function(Variable1,Variable1)" in file PathtoJSX
end tell
end tell
函数位于外部文件中,但我希望从ap
新手来了。
我正在运行一个自动售货机的照片展位程序。它使用此代码运行photoshop操作:
on run {input, parameters}
--set theImage to choose file with prompt "Please select an image file:"
--display alert class of (theImage as alias) buttons {"OK"} as warning
set theImage to input
tell application "Adobe P
在运行javascript时,有没有办法隐藏Photoshop中的所有提示和警告?
显然,这可以用applescript完成,但是javascript有解决方案吗?
Applescript代码:
tell application "Adobe Photoshop CS5"
set display dialogs to never
end tell
所以我试着将一堆PDF文件批量转换成JPEG文件,作为更大的Applescript的一部分,我发现"PDF打开选项“中的一些参数被忽略了。即“高”、“宽”和“约束比例”参数。
这段代码直接取自Photoshop CS3脚本指南(当然,文件名已更改):
tell application "Adobe Photoshop CS3"
set myFilePath to alias "WABEL0457937:Users:Charles:Desktop:8925.pdf"
with timeout of 10000 seconds
open myFilePath
我想在Photoshop中使用AppleScript更改当前图层中的文本字体,但我对AppleScript还不熟悉。通过查找Photoshop的脚本字典,到目前为止我知道如何到达当前层:
tell application "Adobe Photoshop CC 2018"
tell current document
tell current layer
... <= What should I do next?
end tell
end tell
end tell
但是我不知道下一步该怎么做,我在字典
我正在处理的图片有很多智能对象层。由于没有一种官方方法可以一次打开所有智能对象的内容,我正在考虑使用AppleScript和JavaScript来实现这一点。 然而,当我打开我的第一个智能对象时,遇到一个问题,Photoshop的焦点移到了新打开的图片(已经打开的智能对象的内容)上。因此,焦点应该再次切换到原始文件(包含多个智能对象的文件),以便打开下一个智能对象。 这可能是一些简单的事情,但我没有太多的经验,在过去的几天里,我找不到一种在Photoshop环境下做这件事的方法。 下面是我的代码: on run
tell application "Adobe Photosho
我正在开发一个保持开放(空闲)的applescript,以查看一个文件夹并处理每个传入的项目。但是,如果有的话,我无法遍历传入的文件。怎么解决这个问题?
on idle
tell application "Finder"
-- Folders
set InFolder to "Macintosh HD:Users:Nick:Documents:Applescript:Beeld bewerken:In:"
set OutFolder to "Macintosh HD:Users:Nick:Docu
在运行我的Applescript时获得以下错误:
348:532:执行错误:该表达式的某些部分没有返回结果。(-2763)
当在python脚本中使用时,applescript成功运行,没有任何问题。但是,每当fix执行时,这个错误总是被回退,我想修复它。我尝试在if/ but子句中插入一个额外的return语句,但这似乎不是问题所在。
script="""
try
tell application "Finder" to get application file id "com.adobe.Pho
我正在尝试将Photosshop CC窗口的大小调整为1280x720,以便以720p进行录制。我尝试了多种方法,包括AppleScript、SizeUP!应用程序、终端等都不能工作。
下面是我使用的AppleScript的一个例子:
tell application "System Events" to tell application process "Adobe Photoshop CC"
display dialog (get name of window 1)
set position of window 1 to {50, 50}
我遇到了applescript的问题,每当我打开applescript文件(无论是在AppleScript编辑器中还是在Automator中),它都会自动打开tell语句/块中提到的任何程序。这些tell块中的大多数只能通过条件来访问,我想找到一种方法来停止applescript打开所有提到的应用程序的默认行为。
这基本上就是我正在做的事情:
if currentApplication is "Application 1" then
tell application "Application 1"
do stuff
end tell
我在Xcode的接口生成器中,创建自定义自动操作。界面上有一个按钮和一个ComboBox菜单。当用户单击Button时,我想填充ComboBox菜单的内容值。我创建了
on buttonSentAction_(sender)
-- set popupMenuContentValues of my parameters() to aList as list
my popupMenu's addItemsWithObjectValues_(aList)
end buttonSentAction_
处理程序在applescript文件中,但是当我从按钮拖动到文件所有者时,文件