I have the following code to read contents from a file to open multiple Safari browsers.
set locations to paragraphs of (read (choose file with prompt "Pick text file containing urls"))
repeat with aLocation in locations
tell application "Safari" to open location aLocation
end repeat
How can I read contents from pbcopy (copied result from Command-C action)? I tried as follows, but I couldn't get the lines, but the alphabets.
try set the locations to Unicode text of (the clipboard as record) on error errMsg display dialog errMsg end try