Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace "\n" in AppleScript?

I want to replace "\n" in Applescript. Whenever I write that, it just brings whatever is after \n to the next line. How do I do that?

set newVar to my replaceText("\n/blah-blah", "")

EDIT:

set newVar to my replaceText(linefeed, "", newVar)
log newVar

newVar still prints with \n towards the end.

like image 626
Ava Avatar asked Dec 02 '22 21:12

Ava


1 Answers

Found this solution to your problem, Go to preferences-->Editing and check Escape tabs and line breaks in strings

http://forums.macrumors.com/showthread.php?t=1395073

like image 183
doublesharp Avatar answered Dec 13 '22 01:12

doublesharp