Re: How to disable the -- comment
Re: How to disable the -- comment
- Subject: Re: How to disable the -- comment
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 23 Mar 2010 08:32:40 -0400
Your problem is not what you think it is; -- is not a comment inside
quotation marks.
You have an odd number of backslashes in this string:
"--no-align --tuples-only -R '\\\' -F ';' "
Backslashes in AppleScript strings can only come before a quotation
mark (which is what the "expected" error is telling you) or another
backslash, not an apostrophe. You need to figure out what the string
needs to look like when run from Terminal and then just double all the
backslashes for the AppleScript string literal.
> set resultText to psqlCommand & space & DatabaseName & space & "--no-align
> --tuples-only -R '\\\' -F ';'" & space & "--command " & (quoted form of
> sqlCommand)
> Now, I'm incurring in an AS error because the -- string is dealt with like a
> comment therefore the set command, according to AS is like this
> resultText to psqlCommand & space & DatabaseName & space & "
> How can I tell AS not to interpret -- as a comment?
> Ciao
> Vittorio
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden