On Aug 26, 2011, at 22:13, Michelle Steiner wrote: The simulation doesn't work, but the real thing does.
______________________________________________________________________
Hey Michelle,
The point is that there's a problem with the selection in the Finder being reliable.
Try this.
By hand:
Open a window. Make a selection. Open another window. Navigate somewhere. Select some files. Run the following script using a hotkey from a script runner app like FastScripts, QuicKeys, Keyboard Maestro, or ikey.
I have many workflows that have been made unreliable by this bug.
The workaround is to open and close a new Finder window which forces the Finder to wake up and smell the coffee.
-- Best Regards, Chris
______________________________________________________________________
set nameList to {} tell application "Finder" try set sel to selection as alias list if sel ≠ {} then repeat with i in sel set end of nameList to name of i end repeat set theChoice to choose from list nameList ¬ with title "NAME_LIST" with prompt ¬ "Pick A Name:" default items {item 1 of nameList} ¬ multiple selections allowed true ¬ with empty selection allowed end if on error errMsg number errNum set sep to "==============================" set e to sep & return & "Error: " & errMsg & return & sep & return ¬ & "Error Number: " & errNum & return & sep beep display dialog e end try end tell
|