Hello
I 've been using an applescript to copy the path of a folder to the clipboard and I wanted to add the clickability for the PC (which uses other slashes /). I am unsure about how to use the find/replace and then copy to clipboard functions.
Perhaps you can help. Here is what I have so far:
thanks in advance
Mucho
I 've been using an applescript to copy the path of a folder to the clipboard and I wanted to add the clickability for the PC (which uses other slashes /). I am unsure about how to use the find/replace and then copy to clipboard functions.
Perhaps you can help. Here is what I have so far:
Code:
try
tell application "Finder"
set currentPath to (POSIX path of (target of front window as alias))
# strWin = ReplaceText("script", "script", "re") of me
# strString = currentPath
# strString = Replace(strString, "/", vbcrlf)
set the clipboard to "file://" & currentPath & "
P:\\" & currentPath
end tell
on error
display dialog "Unable to copy a path to the clipboard. Make sure Finder is referencing a directory/folder within the file system." buttons {"Ok"} with icon caution with title "Error"
end try
thanks in advance
Mucho