Script that prints 2 messages to a screen session

Im trying to make a script that prints 2 messages to a screen session, one after the other.

screen -x session44 -X stuff "`printf "Test 1\r"`"

This works fine, but adding a second lien with a different message yields no results.

This doesn't look right:

screen -x session44 -X stuff "`printf "Test 1\r"`"

You have nested double quotes, which won' work -- the second quote will turn them off, third on, fourth off.

Try this:

msg=`printf "Test 1\r"`
screen -x session44 -X stuff "$msg"

Any reason you are using \r instead of \r\n (windows) or \n (unix) ?