Hoping for some Applescript advice. I have this simple script which I used a lot in Snow Leopard 10.6.8. The purpose is to ask the user (me) to select a folder and then to launch a random file from within that folder.
In 10.6 the script somehow "remembers" which folder was selected between runs and will automatically re-open in the last selected folder the next time.
In 10.9 the script defaults to the last used base-level folder within my home folder (e.g. ~/Movies or ~/Pictures, etc.) but refuses to remember the specific sub-folder (e.g. ~/Movies/Comedies).
Any ideas? Thank you.
Code:
tell application "Finder"
activate
set theFolder to (choose folder)
set theFileList to every file of theFolder
set FileToOpen to some item of theFileList
open FileToOpen
end tell
In 10.6 the script somehow "remembers" which folder was selected between runs and will automatically re-open in the last selected folder the next time.
In 10.9 the script defaults to the last used base-level folder within my home folder (e.g. ~/Movies or ~/Pictures, etc.) but refuses to remember the specific sub-folder (e.g. ~/Movies/Comedies).
Any ideas? Thank you.