Oh my! That worked perfectly! Many thanks Philostein.

Bryan


On Tuesday, April 17, 2012 6:15:14 PM UTC-4, philostein wrote:
>
> Change
> set myFilePath to POSIX path of (path to inputFiles) as string
> to
> set myFilePath to POSIX path of inputFiles
>
> - if it's one file.
>
>
>
>
> On Wednesday, April 18, 2012 5:34:28 AM UTC+9, Bryan wrote:
>>
>> Ok, I tried the following script:
>>
>> on open inputFiles
>> set myFilePath to POSIX path of (path to inputFiles) as string
>> display dialog myFilePath
>> end open
>>
>> That didn't do anything either. Sorry if I'm missing something obvious -- 
>> any ideas?
>>
>> Bryan
>>
>>
>> On Tuesday, April 17, 2012 12:53:17 PM UTC-4, Jon Stovell wrote:
>>>
>>> For the on open handler, you don't need the using terms from handler.
>>>
>>> On Tuesday, April 17, 2012 8:38:06 AM UTC-4, Bryan wrote:
>>>>
>>>> Hi Jon -- I tried your suggestion and couldn't get this to work. I 
>>>> saved the script MyScript.scpt into the Actions folder, with the content,
>>>>
>>>> using terms from application "Quicksilver"
>>>> on open inputFiles
>>>> set myFilePath to POSIX path of (path to inputFiles) as string
>>>> display dialog myFilePath
>>>> end open
>>>> end using terms from
>>>>
>>>> Called a file in the first pane, tabbed to MyScript, hit enter, nothing 
>>>> happens. Can anyone else get this to work?
>>>>
>>>> On Tuesday, January 3, 2012 12:10:51 AM UTC-5, Jon Stovell wrote:
>>>>>
>>>>> All you need to do is include the on open handler in your script, and 
>>>>> then save it in ~/Library/Application Support/Quicksilver/Actions 
>>>>>
>>>>> on open inputFiles 
>>>>> -- insert code to process the input files here 
>>>>> end open 
>>>>>
>>>>> On Jan 2, 10:59 pm, yoose <[email protected]> wrote: 
>>>>> > thanks Daniel, I realize that applescript can take files and folders 
>>>>> > as inputs, but the trouble i am having here is that runing an 
>>>>> > applescript is not an option in the second pane when i have a file 
>>>>> or 
>>>>> > folder in the first pane. 
>>>>> > 
>>>>> > On Jan 3, 9:29 am, Daniel <[email protected]> wrote: 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > 
>>>>> > > It would be pretty cool if QS supported some sort of action 
>>>>> chaining, 
>>>>> > > via a shortcut like ctrl-tab or something, similar to ctrl-return. 
>>>>> > > Actually I have an idea how to implement it—a "process result..." 
>>>>> > > action that takes a QS command (from ctrl-return) in the first 
>>>>> pane 
>>>>> > > and an action in the 3rd pane. Probably difficult to support 
>>>>> 3-pane 
>>>>> > > actions as the second item in the chain, though... 
>>>>> > 
>>>>> > > Fortunately for you, AppleScript actions can take a file as input 
>>>>> > > directly using "on open theFile", and then get the path using 
>>>>> "(quoted 
>>>>> > > form of POSIX path of theFile)". For instance, my script to 
>>>>> convert a 
>>>>> > > plist to XML format is: 
>>>>> > 
>>>>> > > on open thePlist 
>>>>> > >         do shell script "plutil -convert xml1 " & (quoted form of 
>>>>> POSIX path 
>>>>> > > of thePlist) 
>>>>> > >         return thePlist 
>>>>> > > end open 
>>>>> > 
>>>>> > > Lots of other cool stuff can be done this way—for instance I was 
>>>>> just 
>>>>> > > inspired to make a "Make Burn Folder" and "Unmake Burn Folder" 
>>>>> script 
>>>>> > > pair. "Encode"/"Decode URL" is also useful. 
>>>>> > 
>>>>> > > On Jan 1, 4:33 am, yoose <[email protected]> wrote: 
>>>>> > 
>>>>> > > > Hi, i want to be able to use a file or folder as input to an 
>>>>> > > > applescript much like how text can be used, but do not see it in 
>>>>> the 
>>>>> > > > action list for "files and folders". for my current purpose, 
>>>>> having 
>>>>> > > > the path is good enough for me, so I can use the "Get Absolute 
>>>>> (POSIX) 
>>>>> > > > Path" action, but that does not allow an action afterwards to 
>>>>> follow 
>>>>> > > > so I have to execute that and then take the result and feed it 
>>>>> into 
>>>>> > > > the applescipt. so i was wondering if it is possible to make it 
>>>>> so i 
>>>>> > > > can use a file/folder as an input to applescript where it takes 
>>>>> the 
>>>>> > > > POSIX path as text or if actions in the second pane that produce 
>>>>> text 
>>>>> > > > can have a third pane option to process that text. thanks.
>>>>
>>>>

Reply via email to