Applescript popumenu of a folder 'content

Ad.'s icon

Hi,
I would like to make a menu with applescript wich displays the content of a folder and let an user to choose a file from the list…
Here's the line wich feeds my shell object:

osascript -e 'tell application "Finder"' -e 'set file_list to name of every file of entire contents of alias "Macbook Pro:XXX:"' -e 'set blah to (choose from list file_list with prompt "Wich file ?" Ok button name "Ok" cancel button name "Annuler")' -e 'end tell'

Nothing occurs…Do you have any clue about this ?
Thx.

Ad.'s icon

Up,
Thx.

Tim Lloyd's icon

I don't know, but you've spelt which incorrectly, which might matter.

Ad.'s icon

Thx you maître Capello, but it's not about my poor english here ! :)

Ad.'s icon

Anybody ?

PhiDjee's icon

It wasn't about your English, it was about the spelling of your tokens ;-)

Max Patch
Copy patch and select New From Clipboard in Max.

Something from this one could help you:

HTH,
Phil

Ad.'s icon

Thx for your response Phil but it still doesn't work.
It could be a path issue from me… 
I don't really understand the "Leopard" path…
How can I reach the classical "/" from this "leopard" adress, I think that must be my mistake.

Ad.'s icon

It works on 10.6 but not with 10.5 for me.

PhiDjee's icon

The folder path I put was just an example. Change it for your own path, and try first in Apple's "Script Editor".
Also, search in the archives for AppleScript.

Bye,
Phil

Ad.'s icon

Thank you anyway !! It's been a long time I was searching for a solution !
Merci,
Ad;