简体   繁体   中英

Automator AppleScript action ignores input

I have an Automator workflow that returns a list, an NSArray of NSString s, in the example below "FN3", "VN3", "NN3", "organization", and "notCancelled" (sorry for the German, but I think the image is clear anyway).
This list is input to an AppleScript action, which for testing purposes simply returns the input. This AppleScript action does not ignore the input (this is indicated by the link between both actions).
Strangely, the output is an empty list:
在此处输入图片说明 What am I doing wrongly?

UPDATE:

I just realized the following:
When I use my own Obj-C action as input to the AppleScript action, the log file says between the end of my action, and the begin of the AppleScript action (translated): "Conversion of files/folders to files/folders terminated".
When I replace my own Obj-C action by a standard "Ask for text" action, everything works fine, and the log message before the AppleScript action says (translated): "Conversion of text to text terminated".
So, apparently, my Obj-C action returns something in the wrong format. What is the correct one?

I found the problem:
My Obj-C action had in its Info.plist a wrong output type specified. By default, it was:

在此处输入图片说明

For this reason, a conversion action tried to convert paths (which the action does not provide) to an appropriate input for the AppleScript action.

The correct setting is (in my case):

在此处输入图片说明

With this setting, the AppleScript action correctly outputs the input strings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM