Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

idonotliketostu

macrumors 6502
Original poster
Feb 28, 2008
398
0
How do I get rid of the backslash in the results?
 

Attachments

  • Screen shot 2009-10-15 at 7.07.22 PM.jpeg
    Screen shot 2009-10-15 at 7.07.22 PM.jpeg
    19.2 KB · Views: 216
In the Result window, you can't. It's how AppleScript handles quotes internally. But the slashes won't appear in dialog boxes or in text output.

mt
 
I though the results area is the text output area? which text output area are you referring to.

Files. You can run this test:

Code:
display dialog "Please input string (please use quotes):" default answer ""
set textOutput to text returned of result
set quotedText to textOutput -- check Events window and you'll see your string with slashes and quotes
display dialog "Here's what you input, without slashes:" & return & quotedText
display dialog "Now we'll save the string to a disk"
set docAlias to path to documents folder
set newFileName to (choose file name with prompt "Please enter a file name" default name "quote test" default location docAlias)
set newFileNameString to newFileName as string
set outPutfile to open for access file newFileNameString with write permission
write quotedText to outPutfile starting at eof
close access outPutfile
display dialog "Now please check the quotes in your file."

mt
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.