Right now your script tells QS to open paths (i.e. strings of text) rather 
than files or aliases. AppleScript Editor is being a bit forgiving of your 
error, whereas QS is more strict when it runs a script. Change your script 
so that all_paths gets populated with aliases instead of paths, and it 
should work.

On Friday, June 15, 2012 2:42:52 PM UTC-4, Christopher Harwood wrote:
>
> I am trying to set up a Quicksilver trigger that brings DEVONthink records 
> into the first pane in the same way that I can use the Current Selection 
> proxy object to bring Finder items into that pane.  So far, I have an 
> Applescript that works when run in the Applescript Editor and also when run 
> by other programs (specifically, QuicKeys).
>
> That's all well and good for my purposes, but I am hoping to find a way to 
> get Quicksilver to run the script itself.  A trigger set to run the script 
> appears to do nothing, but perhaps there is some way to see exactly where 
> it it failing?  Am I missing something obvious, perhaps?  I did not find 
> any similar issues in the forum, but perhaps I didn't find the right search 
> terms to use.  So, I'd appreciate any help.
>
> The script:
> -- Getting DEVONthink records into Quicksilver
> -- Emulates "Select Current Selection in command window" within DT
>
> -- Code for getting multiple record selections based on qsGetSel script
> -- -- by elspub/Elastic Threads at
> -- -- 
> https://groups.google.com/d/topic/blacktree-quicksilver/4Qm_esBfye0/discussion
>
>
> tell application "DEVONthink Pro"
>  -- Get the selection into a variable
> set the_selection to the selection
>  -- Count the number of items in the selection
> set file_count to count of the_selection
>  -- If the there are more than one items, then
> -- format the list into something QS recognizes
> if file_count > 1 then
> set all_paths to {}
> repeat with i from 1 to file_count
> set this_item to item i of the_selection
> set this_path to get the path of this_item
> -- set this_alias to this_path as alias
> set end of all_paths to POSIX path of this_path
> end repeat
>  -- If there is only one item, then
> -- just get the path and QS will know what to do
> else if file_count = 1 then
> repeat with this_item in the_selection
> set all_paths to get the path of this_item
> end repeat
>  end if
> end tell
>
> -- Open QS with the formatted path(s)
> tell application "Quicksilver" to open all_paths
>

-- You received this message because you are subscribed to the Google Groups 
Quicksilver group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send 
email to [email protected]. For more options, 
visit this group at 
https://groups.google.com/d/forum/blacktree-quicksilver?hl=en

Reply via email to