Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return an array in action applescripts #1825

Closed
yarray opened this issue Apr 16, 2014 · 2 comments · Fixed by #1826
Closed

return an array in action applescripts #1825

yarray opened this issue Apr 16, 2014 · 2 comments · Fixed by #1826

Comments

@yarray
Copy link

yarray commented Apr 16, 2014

QuickSilver Version 1.1.3
OS X Mavericks 10.9.2

Hi,

Recently I want to write an action which returns a list of objects, which can be selected afterwards in the first pane. According to the documentation at http://qsapp.com/wiki/AppleScript_Actions#Returning_Items_to_Quicksilver it is possible:

At the moment, you can only return strings, URLs or an array (of strings or URLs)

But there was a discussion claimed that only strings were acceptable, which made me a bit confused.

In practice, when I returned something like return {"1", "2", "3"}, there was simply no result. And in Console.app I found the following:

valueForUndefinedKey:]: this class is not key value coding-compliant for the key path.

I know I can return something like "1\n2\n3\n" but an extra click is needed to expand it. It will be ideal if returning arrays are possible, or am I missed something?

@pjrobertson
Copy link
Member

Thanks for reporting this. You're right, it is a bug.

I have submitted a fix, which will find its way into a QS release at some point.
Unfortunately right now there's no way for QS to deal with a 'group' of string or URL items (only files), so even with my fix, you still have to press → to see all the strings separately

@yarray
Copy link
Author

yarray commented Apr 18, 2014

Many thanks for the quick fix. The scripting will be more expressive after that. It would be more fantastic if quicksilver can handle arrays or even other data structures directly in the future.

By the way, what I want to implement is an enhanced version of "show results for". I'd like to view the search results instantly in quicksilver to avoid opening too many search pages, but currently the "show results for" simply returns every hyperlinks in the result, which is not very practical (the first ones of googled results are links to images or news search, for example). Is there any advice for the specific use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants