Applescript popumenu of a folder 'content

Aug 11, 2010 at 10:20pm

Applescript popumenu of a folder 'content

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.

#51756
Aug 17, 2010 at 8:38am

Up,
Thx.

#185704
Aug 17, 2010 at 9:29am

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

#185705
Aug 17, 2010 at 12:08pm

Thx you maĂ®tre Capello, but it’s not about my poor english here ! :)

#185706
Sep 1, 2010 at 4:46pm

Anybody ?

#185707
Sep 1, 2010 at 9:35pm

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

Something from this one could help you:

– Pasted Max Patch, click to expand. –

HTH,
Phil

#185708
Sep 2, 2010 at 8:53am

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.

#185709
Sep 2, 2010 at 12:09pm

It works on 10.6 but not with 10.5 for me.

#185710
Sep 2, 2010 at 7:06pm

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

#185711
Sep 2, 2010 at 7:33pm

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

#185712

You must be logged in to reply to this topic.