I'm trying to build an action that will list all the scripts specific to a certain application. The problem I'm having is that when I set a selection, it's just a bunch of aliases, not actual files. I could go through and create children, but when I do that, I end up with roughly the same thing unless I do quite a bit of heavy lifting to create follow-up actions based on the type of file returned.

Is there a way to simply provide individual files as children or as a selection so that the returned scripts can be run, have their handle_string handler utilized, etc.?

set appScripts to {} tell application "System Events" to set appProc to name of first application process whose frontmost is true and visible is true

tell application "Finder"

try get path to scripts folder from user domain get folder appProc of folder "Applications" of result as alias set localFiles to (files of (entire contents of result) whose name extension is in indexedFileExtensions or kind is in indexedFileTypes) as alias list

set appScripts to appScripts & localFiles

end try

try get path to scripts folder from local domain get folder appProc of folder "Applications" of result as alias set localFiles to (files of (entire contents of result) whose name extension is in indexedFileExtensions or kind is in indexedFileTypes) set appScripts to appScripts & localFiles end try end tell

tell application "LaunchBar"

if (count of appScripts) > 0 then set selection as list to appScripts else display in large type "There are no application-specific scripts for " & appProc & "." end if end tell

Thanks, but the script is working fine and returns a list of files. However, those files are literally just paths - they do not display as nor behave as a list of files. See screenshot of what the script returns:

The question is how do I get this to behave as actual files rather than just a list of URL paths?

An action return was needed on some selection of files that was possible on certain applications that was not actual file. I need to get the list of applications available on ukbestessays custom writing this have all the data of ODF.