Yes. These are called DSLs (domain specific languages).
Some examples are Lex and Yacc. Lex writes C programs that implement lexical analyzers. For example:
%%
username { printf("%s", getlogin());
%%
is a Lex program that looks for the string "username" in it's input and replaces it with the current users name.
As you can see, all the hard bits of doing string manipulation, matching, etc. are GONE. Lex takes this input, and writes a C program for you that does this function. Anything having to assemble characters in an input stream into tokens...
Yacc is another DSL that writes C programs. It takes grammar specifications like:
input: /* empty */
| input line;
exp: NUM { $$ = $1; }
| exp exp '+' {$$ = $1 + $2; }
;
and builds a program that interprets that grammar, and produces results (in this case, an rpn addition program). The tokens are usually generated by a program written by Lex.
In both of these cases, DSLs are being used to reduce the programmers work.
Some languages like Scheme have macro languages that make producing DSLs very easy. The DSL is a way to mold the language closer to the problem space, reducing your work.
I use DSLs to produce web pages, advanced maths programming, text processing and other programming tedium. Initially, you can concentrate on leaning DSLs, and then produce your own to reduce your workload.
Unix (Linux) is based on the concept of small tools that each serve a function. These small tools can be thought of as DSLs, and the binder is the shell program . Scripts can tie together the smaller elements. For example: AWK, SED, BC, DC, TR, and many other of the Unix (Linux) tools. There is even a language specifically designed to tie these together (TCL) and TCL has a GUI (TCL/TK). This makes it trivial to generate GUI based programs.
I have given 9 examples of idea of DSLs can programs that "write programs" in this article. Assuming you are using Windows, you can start by investigating CYGWIN (a Unix/Linux work-alike for Windows), and start exploring AWK, TCL/TK, or LEX/YACC depending on your needs.
Please ask more questions as you explore these possibilities.