Hello all,
Anyone have a code snippet that does the following:
Question:
- How do you use " in text I want to concatenate?
Ex.
set v1 to “how are”
set v2 to ““you”” <----- this causes an error thought string would work but apparently applescript syntax to clear to me in this area
set v3 to “doing?”
set resultouput to v1 & v2 & v3
output:
How are “you” doing?
any help would be appreciated,
tia
You have to escape those characters.
set v2 to "\"you\""
Cheers,
Craig
thanks for the direction
but the output I get is:
"how are\"you\"doing?"
not
"how are "you" doing?"
Any help would be appreciated.
Would you mind posting your code?
Thanks,
Craig
I don’t mind at all, just figured the above example would be easier understood.
I’m actually trying to use this code to create a formula that I’ll put in to numerous excel cells
--=IF(E8<>"","",'09.19.05'!B4)
set d to "09.19.05"
set c to "8"
set singQ to "\"" as string
set columnFormula to "=IF(E" & c & "<>\"\",\"\"" & "'" & d & "'!B4" as string
What do you see when you run this code?
Also, you were missing a comma so I added it.
--=IF(E8<>"","",'09.19.05'!B4)
set d to "09.19.05"
set c to "8"
set singQ to "\"" as string
set columnFormula to "=IF(E" & c & "≠\"\",\"\"," & "'" & d & "'!B4" as string
display dialog columnFormula
Oh so I think there was a bit of confusion on my part i think the applescript editor displays the \ but the actual output may be without the \ as it shows in the display as
“=IF(E8<>”“,”“,‘09.19.05’!B4)”
i’ll confirm with my excel script and be sure to reply back
thanks