Allan Odgaard <throw-away-1 <at> ...> writes:
On 26/9/2006, at 11:27, Piero D'Ancona wrote:
[...] osascript -s 'tell app "TextMate" to insert ""'
I want to do the same from a javascript contained in an a href link. But I can not find the correct way to escape things [...]
Use \ for one backslash in JavaScript strings.
I confirm what I said: it does not work. Try the following html:
<a href="javascript:TextMate.system("/usr/bin/osascript &>/dev/null -e 'tell app \"TextMate\" to insert \"\\eqref\"' &", null);">try</a>
A link is produced but if you click on it nothing happens. (if you put \eqref instead of \eqref, the text "eqref" is inserted). Sorry! something here really escapes me, as usual
Piero