Plugins Applescript:“;将用户交互级别设置为“从不交互”;不在illustrator工作

Plugins Applescript:“;将用户交互级别设置为“从不交互”;不在illustrator工作,plugins,applescript,adobe-illustrator,Plugins,Applescript,Adobe Illustrator,我正在尝试设置它,以便在使用applescript打开illustrator文件时没有用户交互,但标准: tell application id "com.adobe.Illustrator" activate set user interaction level to never interact open theFile without dialogs 不适用于我安装的检查白色套印的插件。 如果由我决定的话,我会卸载这个插件,但它是用于工作电脑的 我还尝试通过以下方式自动单击按钮(在Tim

我正在尝试设置它,以便在使用applescript打开illustrator文件时没有用户交互,但标准:

tell application id "com.adobe.Illustrator"
activate
set user interaction level to never interact
open theFile without dialogs
不适用于我安装的检查白色套印的插件。 如果由我决定的话,我会卸载这个插件,但它是用于工作电脑的

我还尝试通过以下方式自动单击按钮(在Tim Joe的帮助下):

try
    tell application "System Events"
        tell process "Finder"
            click button "OK" of window "Adobe Illustrator"
        end tell
    end tell
end try
我已经试过了

tell application "System Events"
  tell process "Adobe Illustrator"
    keystroke return 
  end tell
end tell
有人知道解决这个问题的方法吗

以下是目前的完整代码:

set saveLocation to ((path to desktop) as string) --place to save the files
set theFile to choose file with prompt "Choose the Illustrator file to get outlines on"
set outputFolder to choose folder with prompt "Select the output folder"
tell application "Finder" to set fileName to name of theFile
set fullPath to (saveLocation & fileName) --file path of new .ai
set fileName to (text 1 thru ((length of fileName) - 3) of fileName) --remove .ai from fileName
set olPath to text 1 thru ((length of fullPath) - 3) of fullPath & "_OL.ai" --path of outlined file


 tell application id "com.adobe.Illustrator"
activate
ignoring application responses
    open theFile without dialogs
end ignoring
tell application "System Events"
    tell process "Adobe Illustrator"
        repeat 60 times -- wait up to 60 seconds for WOPD window to appear
            try
                tell window "White Overprint Detector"
                    keystroke return
                    exit repeat
                end tell
            on error
                delay 1
            end try
        end repeat
    end tell
end tell
save current document in file fullPath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 15, font subset threshold:0.0, embed linked files:true, save multiple artboards:false} --save file to desktop
convert to paths (every text frame of current document) --convert text to paths
save current document in file olPath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 15, font subset threshold:0.0, embed linked files:true, save multiple artboards:false} --save another copy to desktop with name + _OL.ai 

 end tell
 tell application "Finder"
set newFolder to make new folder at saveLocation with properties {name:fileName}
move fullPath to newFolder --create new folder and move both new files into it
move olPath to newFolder
set newFolderPath to (newFolder) as string
set newFolderPath to text 1 thru -2 of newFolderPath --remove the trailing ":" 

tell current application --zip up the new folder
    set qpp to quoted form of POSIX path of newFolderPath
    do shell script "cd $(dirname " & qpp & ")
zip -r  \"$(basename " & qpp & ").zip\" \"$(basename " & qpp & ")\""
end tell
set zipFile to newFolderPath & ".zip"
move zipFile to outputFolder --move .zip to output
delete newFolder --delete folder on desktop left from zipping
 end tell


 --prepare a notification email 
 set presetText to "Hello,    


 Files Uploaded: 


  " & fileName & ".zip


 To access our FTP Server: 
 http://217.207.130.162:8080/WebInterface/login.html   

 To access our FTP server, log onto our website below: 

 Username: 
 Password: 

 Thanks, 
  Joe"
tell application "Mail" --open up prepared email
activate
set theMEssage to make new outgoing message with properties {visible:true,       subject:fileName, content:presetText}
  end tell
  --open file containing usernames and passwords for the FTP
  do shell script "open /Users/produser/Desktop/FTP_Users"

因为我原来的帖子看起来太客观了,无法理解,所以我会修改

在illustrator的告诉块中,查找打开文件的行。有些命令允许使用和不使用属性。尝试应用“without dialogs”属性,使其看起来像这样

    tell application id "com.adobe.Illustrator"
        open file (VariableOfFilePath) without dialogs
    end tell
更新:

我能想到两个解决办法。1) 尝试告诉系统事件,让AI在没有对话框的情况下打开

tell application "system events"
    tell application id "com.adobe.Illustrator"
        open file (VariableOfFilePath) without dialogs
    end tell
end tell
另一个是只需添加一点就可以了提示

     try
        tell application "System Events"
           tell process "Finder"
              click button "Continue" of window "Adobe Illustrator"
           end tell
        end tell
     end try
可以尝试让它接受默认按钮

tell application "System Events"
   tell process "Finder"
      keystroke return
   end tell
end tell

我找到并安装了白色套印检测器,我明白你的意思。我不得不使用旧版本,因为我只有CS3,我看到了它在打开文档时生成的对话框。以下是我让它被解雇的原因:

tell application "Adobe Illustrator" to activate
tell application "System Events"
    tell process "Adobe Illustrator"
        repeat 60 times -- wait up to 60 seconds for WOPD window to appear
            try
                tell window "White Overprint Detector"
                    keystroke return
                    exit repeat
                end tell
            on error
                delay 1
            end try
        end repeat
    end tell
end tell

问题是,当他打开一个文件时,他会得到提示,我建议添加一个“无对话框”后缀。投票否决而不是建议进一步澄清对我没有任何好处。感谢Tim Joe的帮助,但我的代码中已经有了这一点,只是没有在我发布的代码片段中,我已经编辑了这个问题以显示我是如何放置它的。再次感谢,但按钮单击也不起作用,我将“继续”更改为“确定”,因为按钮上是这么说的,你认为这可能是因为窗户被称为不同的东西吗?我已经更新了我的代码嗯。。。按钮选项是什么,由默认选择唯一的按钮是由默认选择的OK按钮插件的名称是什么?我想它叫:white OP detector,显然它是由worker72a.com制作的,不管这意味着什么:/我尝试了你的解决方案,但对我来说不起作用。你的密码在哪里?你打开文件了吗?我尝试在“告诉系统事件”之前设置它,在“告诉系统事件”结束之后设置它,但两者都不起作用。我稍后会看一看。同时,您可以尝试将文件打开命令包装在
忽略应用程序响应
结束忽略
之间,并报告您得到的结果吗?我尝试了它,它没有停止白色套印弹出窗口,但它确实打断了代码的后续部分。我现在就把完整的代码放上去。@man-qa谢谢。你能不能给我一份文件的副本,这样我就可以清楚地知道你在做什么?你可以发电子邮件给我ivan@ivanx.com.