Is it possible to copy a string to the clipboard without the string being enclosed in quotes? I am using the command:
set myVar to clipboard
where myVar contains a string.
Firstly, but you know this, your command gets myVar from the clipboard rather than the other way round.
Secondly, at least with my version of the software, the word ‘the’ is needed - the clipboard.
More to the point of your question you only see the quotes in, say, the result window of the Editor - a sort of shorthand for “this is a string”. Paste into somewhere (say a Word Processor) and there will be no quotes. Unless you deliberately included them a string has no quotes attached.
Andreas
: Is it possible to copy a string to the clipboard without the
: string being enclosed in quotes? I am using the command: set
: myVar to clipboard
: where myVar contains a string.
To place a string on the clipboard using Standard Additions,
try:
set myVar to "Brad Bumgarner"
set the clipboard to myVar
On my setup (OS 9/AppleScript 1.6), the clipboard then looks
like this (it has no quotes):
Brad Bumgarner
Same result with: set the clipboard to “Brad Bumgarner”
Later,
Rob J
: To place a string on the clipboard using Standard Additions,
: try: set myVar to “Brad Bumgarner” set the
: clipboard to myVar
: On my setup (OS 9/AppleScript 1.6), the clipboard then looks
: like this (it has no quotes): Brad Bumgarner
: Same result with: set the clipboard to “Brad Bumgarner”
: Later,
: Rob J
Interesting, I must have done something funky, because the contents of the clipboard ALWAYS had quotes. I used your two lines of code and it worked perfectly. I wish I kept my attempts so that I could see what I was doing. Anyway, thank you very much.