You can do that, which makes coding a hassle, or if you don't expect it to be used very often, you can make input a hassle instead:
Pick a character, say, underscore ( _ ), and make that your "space". Then, the player can input "This_is_my_long_message_with_ spaces", and it'll go through as a single variable. Then you can use:
%message = strReplace(%message, "_", " ");
and that'll switch out the underscores for spaces.