quote charcters in Eggplants result Log Files

The Run logs are kept in a Log.txt file . I want to pass all the contents of the LogFile to an applescript as a string . But since the contents of the LogFile contain " character I am running into Syntax errors . I tried using something like
replace """" by " " in <contents_of_logFile>
but was unable to strip of all the quotes .
Can you suggest what to do ?

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    The trick requires knowing that there's another way to quote things in Eggplant: <<>>. So you could do what you're asking something like this:
    put file "~/documents/temp/quotes.txt" into myTemp
    replace every occurrence of <<">> in myTemp with empty
    put myTemp
    
    I'd also suggest that if there's a way of escaping quotes in AppleScript, that you might use that as the replacement string rather than just empty, for example:
    replace every occurrence of <<">> in myTemp with <<\">>
    
Sign In or Register to comment.