Python appscript 错误:OSERROR:-1700,无法将某些数据转换为预期类型
from appscript import *
ps = app("Adobe Photoshop CS5")
s = ps.current_document.save
s._labelledargterms
给出:
{'appending': 'DcXt',
'as_': 'fltp',
'copying': 'SaCp',
'in_': 'kfil',
'with_options': 'FmOp'}
我并不完全使用 kfil
的含义。有人可以解释一下吗?
我试图做以下事情:
import mactypes
f = mactypes.File("foo.jpg")
s(as_=k.JPEG, in_=f)
这给了我:
CommandError: Command failed:
OSERROR: -1700
MESSAGE: Can't make some data into the expected type.
COMMAND: app(u'/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app').current_document.save(in_=mactypes.File(u'/Users/az/foo.jpg'), as_=k.JPEG)
from appscript import *
ps = app("Adobe Photoshop CS5")
s = ps.current_document.save
s._labelledargterms
Gives:
{'appending': 'DcXt',
'as_': 'fltp',
'copying': 'SaCp',
'in_': 'kfil',
'with_options': 'FmOp'}
I'm not exactly use what the kfil
means. Can someone explain?
I was trying to do the following:
import mactypes
f = mactypes.File("foo.jpg")
s(as_=k.JPEG, in_=f)
This gives me:
CommandError: Command failed:
OSERROR: -1700
MESSAGE: Can't make some data into the expected type.
COMMAND: app(u'/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app').current_document.save(in_=mactypes.File(u'/Users/az/foo.jpg'), as_=k.JPEG)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,看来我必须避免
mactypes.File
。奇怪的是,这是有效的:我不完全理解为什么它有效(而不是问题中的另一种方式),所以如果有人可以进一步解释,那就太好了。
Ok, seems I must avoid
mactypes.File
. Strangely, this works:I don't fully understand why that works (and not the other way as in the question), so if someone could explain further, that would be great.