Hi,
Anybody knows how I can extend the results int eh script below? I need to have multiple results (/Volumes/HC, /Volumes/DC, /Volumes/ES) to be replaced by http://www.url.com
return expand("")
on ReplaceText(theString, fString, rString)
set current_Delimiters to text item delimiters of AppleScript
set AppleScript's text item delimiters to fString
set sList to every text item of theString
set AppleScript's text item delimiters to rString
set newString to sList as string
set AppleScript's text item delimiters to current_Delimiters
return newString
end ReplaceText
on expand(separator)
tell application "Finder"
set theSelection to get selection as list
set theResult to ""
if length of separator = 0 then set separator to linefeed
repeat with theItem in theSelection
if length of theResult > 0 then set theResult to theResult & separator
set theResult to theResult & POSIX path of (theItem as alias)
set theResult to ReplaceText(theResult, "/Volumes/HC", "http://www.url.com") of me
end repeat
return theResult
end tell
end expand
Already tried to add the multiple results like this /Volumes/HC, /Volumes/DC, /Volumes/ES" but that doesn’t give a good result.
Regards,
vanWoods