Upon testing this, temp vars are not global or local, they're on their own little planet.
This doesn't work, as we know:
var temp;
temp="HELLO!"
execute_string("draw_text(x,y,temp);");
However, this does:
var temp;
temp="HELLO!"
with (all){draw_text(x,y,temp);}
And likewise this doesn't work at all:
var temp;
temp="HELLO!"
with (all){execute_string("draw_text(x,y,temp);");}
My solution above works;
var temp; temp='HELLO!';
execute_string("var temp; temp='"+string(temp)+"';"+"draw_text(x,y,temp);");
To investigate more, I ran this:
var temp;
temp="HELLO!"
if variable_global_exists(temp) draw_text(x,y,"'tis a global!");
if variable_local_exists(temp) draw_text(x,y,"'tis a local!");
Which sadly states that GM doesn't class them as either. This may just be the functions, but meh.
execute_string does work with local and global vars though, both
temp="HELLO!";
execute_string("draw_text(x,y,temp);");
and global.temp="HELLO!";
execute_string("draw_text(x,y,global.temp);");
work.