How do I write some text to the Last Run Window?

What do I put in a script to simply write some text in the Last Run Window?

like “Check the results here stupid!”

I copy and paste my Last Run Window contents and search it to find my test failures… etc… thanks

You want the “put” command. You can also use that to check the value of a variable, for example.

Excellent… Works like a chimp. Thanks! :shock:

oh oh! I just thought of something… what I REALLY want to do is write the scriptname into the Run Window… so I would end up with a line that sez


so who about this

put “ScriptFailure” && ScriptName

Does that look right? What do I use to grab the scriptname I guess?

put “ScriptFailure:” && my name

Assuming that it’s the name of the currently executing script that you want. If you called another script, then you can get it’s name from “the result”.

I tried

put “ScriptFailure:” && “the result”

and it just printed

ScriptFailure the result

… I missed something… thanks for any help!

Well, you have to have “the result” of something. I suggested that if you were running a second script and wanted to record its outcome, but it only works if you’re using the runWithNewResults command. If you just call a second script by name or with the “run” command, then it just becomes part of the calling script and doesn’t have a result. And actually, since you just called the script by name, you would presumably already know its name and could just type it in the log message – it wouldn’t really be worth the effort to extract the name from the result. So if the “my name” code isn’t doing enough for you, you’re going to have to give us some more context of what you’re trying to accomplish.