tim_espasandin
12 years agoOccasional Contributor
Concatenating objects with strings
I'm trying to use Javascript to modify the object that a variable points to by adding a string to the variable. However, this simply gives me an undefinded variable. Is there some way for me to achieve this?
Here's an example of what I'm trying to do:
function ConcatProblem()
{
var notepad, window, finished;
notepad = Sys.Process("notepad");
window = ".Window(\"Notepad\", \"Untitled - Notepad\", 1).Window(\"Edit\", \"\", 1)";
finished = notepad + window;
finished.wtext = "Text here";
}
Edit: Corrected string.
Here's an example of what I'm trying to do:
function ConcatProblem()
{
var notepad, window, finished;
notepad = Sys.Process("notepad");
window = ".Window(\"Notepad\", \"Untitled - Notepad\", 1).Window(\"Edit\", \"\", 1)";
finished = notepad + window;
finished.wtext = "Text here";
}
Edit: Corrected string.