The escape character is usually the backslash: \

Also, for complex scripts like this, I usually find it easier to have TS write 
out the entire script, with all the details right in the script text, to a 
temporary file then use the External action to call that script. This is easier 
than building a script with variables and arguments.

Robert

-----Original Message-----
From: Wayne Irvine [mailto:[email protected]]
Sent: Wednesday, April 18, 2012 4:49 AM
To: [email protected]
Subject: TeraScript-Talk: Passing arguments to the command line

I'm using ImageMagick to resize uploaded images through Terascript. I have a 
simple BASH script that accepts and argument which is a string that specifies 
the source file, what to do with it, and the target file. Works ok!

Now I want to create images. This is to implement a 'biological detection' 
system, or CAPTCHA. So I will create a string, then create an image from the 
string complete with distortion and noise so that it requires a human to 
interpret it. To do this I need to use the ImageMagick Convert application and 
pass to it some arguments like -draw. Easy enough. But then I need to pass the 
string and some cartesian arguments. This is where the problems come in. The 
string and arguments need to be quoted, and it appears this is what I am having 
trouble with.

The ImageMagick command to create and image of some text is:

convert -size 320x85 canvas:none -font Helvetica -pointsize 72  -draw 'text 
25,60 "It works"' -channel RGBA -blur 0x6 -fill darkred -stroke magenta  -draw 
'text 20,55 "It works"' outputfile.jpg

If I enter this into the Terminal it creates an image.

However, if I pass this argument to my BASH script using the Command Line 
action it doesn't work. I expect this is to do with escaping the ' and " but 
can't seem to find any clues as to what to do.

Any help would be appreciated.

Wayne Irvine

----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to