2011-06-13 6 views
0

나는 Finder에서 선택한 여러 항목의 경로를 복사하기 위해 다음과 같은 코드를 가지고 :Applescript의 "quoted form of"에 인용 부호를 제거 하시겠습니까?

 
activate application "Finder" 
tell application "Finder" 
    set theSel to (selection of application "Finder") 
    set pathList to {} 
    repeat with anItem in theSel 
     set the end of pathList to quoted form of (POSIX path of (anItem as alias)) 
    end repeat 
    set savedDelimiters to AppleScript's text item delimiters 
    set AppleScript's text item delimiters to " 
" 
    set the clipboard to pathList as string 
    set AppleScript's text item delimiters to savedDelimiters 
end tell 

유일한 문제는이 결과이다 :

 
'/Applications/Burn.app/' 
'/Applications/Caffeine.app/' 
'/Applications/Calculator.app/' 

그게 전부를 '내가 원하는 기본적으로 무엇을,하지만 난 저기있는 독한 인용문을 원하지 마. 나는 어떻게 그들을 제거합니까? 나는 벌써 quoted form of을 제거했지만 운이 없었습니다.

감사합니다.

답변

0

당신이해야 할 모든

activate application "Finder" 
tell application "Finder" 
    set theSel to (selection of application "Finder") 
    set pathList to {} 
    repeat with anItem in theSel 
     set the end of pathList to (POSIX path of (anItem as alias)) 
    end repeat 
    set savedDelimiters to AppleScript's text item delimiters 
    set AppleScript's text item delimiters to " 
" 
    set the clipboard to pathList as string 
    set AppleScript's text item delimiters to savedDelimiters 
end tell 
+0

흠 "의 인용 형식"을 가지고, 나는 내가 전에 것을 시도 생각했다. 어쩌면 나는 오타가 있었을거야. 당신은 애플 스크립트를 어떻게 편집하나요? 나는 기본 편집기를 사용하고 Script Debugger를 시도했다 ... – cwd

+0

나는 그저 영원히 사용해온 스크립트 편집기를 사용한다. 나도 최신 OS를 돌리고있어. – mcgrailm

관련 문제