Photoshop CS5无法识别activeDocument [英] Photoshop CS5 not recognising activeDocument

查看:149
本文介绍了Photoshop CS5无法识别activeDocument的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在64位Vista机器上为Photoshop CS5.1写了一个非常大的脚本。现在,当我在新的64位Windows 7计算机上运行相同的脚本时,Adobe ExtendScript Tool在这个简单的脚本中抱怨 activeDocument (没有这样的元素):

I wrote a quite big script for Photoshop CS5.1 on my 64bit Vista machine. Now when I run the very same script on my new 64bit Windows 7 machine, Adobe ExtendScript Tool complains about activeDocument (no such element) in this simple script:

#target photoshop
var pDoc = app.activeDocument;
alert("Done!");

我已尝试过两次,没有 #target 并在ExtendedScript工具中选择目标。
有没有我错过的东西,或者我需要安装更多东西。我只安装了64位版本的Photoshop。 32bit Photoshop是否有脚本扩展?

I have tried both and without #target and choosing the target in the ExtendedScript Tool. Is there something I have missed, or do I need to install something more. I only installed the 64bit version of Photoshop. Is it so that the 32bit Photoshop has the script extensions?

我不明白为什么我需要安装32位和64位版本如果我只是要使用64位版本。

I don't see why I need to install both 32bit and 64bit versions if I'm only going to use the 64bit version.

推荐答案

已解决

这个谜团已经解决了。如果您更仔细地解释错误消息,那将是非常简单的尴尬。如果Photoshop中没有文档,我当然无法获得activeDocument,呃!
我将其解释为语句activeDocument未被识别,但当然如果我没有文档,则没有这样的元素(如photoshop文档)给我。我已经习惯了C ++,并且如果获取文档有问题,我希望reuslt是NULL值或类似的...借口,借口;)

SOLVED
The mystery is solved. It is embarrassing simple if you interpret the error message more careful. Of course I can't get an activeDocument if there are no documents in Photoshop, duh!?! I interpreted it as the statement activeDocument wasn't recognised, but of course if I have no document there is no such element (as a photoshop document) to give me. I'm used to C++ and would expect the reuslt to be a NULL value or similar if there is a problem to get the document... excuses, excuses ;)

好吧,如果其他人应该遇到同样的问题,我的费用就是答案:D
我现在将卸载32位版本......

Well, if someone else should get into the same problem, here is the answer on my expense :D I will uninstall the 32bit version now...

这篇关于Photoshop CS5无法识别activeDocument的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆