DONE: Tool output
DONE: Tool output
Is it possible to capture a tool output (DOS command) in real-time in messages pane instead of waiting for the tool to finish first?
Re: Tool output
Interesting question. I did some experiments and I guess the answer is no.
I used BAT file
because timeout command didn't work; of course I had to kill RJ TE, but the output was clear all the time. Then I wrote a small PHP script:
and it produced the output only after the run was completed.
I used BAT file
Code: Select all
:start
echo #
goto start
Code: Select all
<?php
echo "PHP\n";
for ($i = 0; $i < 5; $i++) {
echo $i, "\n";
sleep(1);
}
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Re: Tool output
But that would be a practical improvement. Maybe Rickard can modify it!?
Re: Tool output
My hunch, too, even though at the moment I can't point to any concrete case where it would be helpful. ...And the implementation would beg for a way to terminate the tool running in the background when you could observe its output "live", methinks.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: Tool output
In the tool item dialog window - set "Run as DOS command and capture output" and "Run in background".
That should run the tool in a different thread and capture the output whenever the tool decides to output some information...
That should run the tool in a different thread and capture the output whenever the tool decides to output some information...
Re: Tool output
That is my configuration, and still the output isn't captured piecemeal, but only on completion of tool's run. Moreover, "Halt a running script" is unavailable, and it's entry in the menu is dimmed. However, when I click on the icon to run the tool again, I get a message that the tool is running and I can stop it.Rickard Johansson wrote: ↑10 Nov 2022 19:06 In the tool item dialog window - set "Run as DOS command and capture output" and "Run in background".
That should run the tool in a different thread and capture the output whenever the tool decides to output some information...
Btw. after completing the run I got "Process completed with exit code: 259" message (usually it's 0).
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Re: Tool output
Correction: PHP code I posted above will always display output after it has run; here's the proper one:
It runs piecemeal on the command line (> php.exe test.php), but as a tool it waits for its completion and only then shows its output.
Code: Select all
<?php
for ($i = 0; $i < 5; $i++) {
echo $i, "\n";
flush();
sleep(1);
}
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: Tool output
Should work better in next version (15.66). Thanks!
Re: DONE: Tool output
Works with AutoIt-Tools too, but a single CRLF at the end of an output-sting is lost !?
Re: DONE: Tool output
Can we get an additional option to open the normally minimized Messages-window, when the tool output is inserted there, not only at the tool-exit/-end?
And: The problem with the CRLF above, still exists in V15.68.
And: The problem with the CRLF above, still exists in V15.68.
Re: DONE: Tool output
The problem with the lost CRLF still exists in V15.83.
And the "Messages"-windows is receive the output-text while the tool is running, but the "Messages"-windows remains unfortunately minimized and is maximized only when the tools ends.
And the "Messages"-windows is receive the output-text while the tool is running, but the "Messages"-windows remains unfortunately minimized and is maximized only when the tools ends.
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: DONE: Tool output
It's not something I can reproduce. It should work with CRLF, CR and LF. As long as the tool running in the background outputs CRLF's.The problem with the lost CRLF still exists in V15.83.
That is by design. A minimized panel wont stay open unless it has focus. You wont be able to edit or do anything if you want the minimized panel to stay open. The moment it loses focus - it will minimize again. Unless you pin it.And the "Messages"-windows is receive the output-text while the tool is running, but the "Messages"-windows remains unfortunately minimized and is maximized only when the tools ends.
Just open and pin it when you run the tool.
Re: DONE: Tool output
Repeat the test when "Run in backgroud" is activated!Rickard Johansson wrote: ↑29 Mar 2023 17:14It's not something I can reproduce. It should work with CRLF, CR and LF. As long as the tool running in the background outputs CRLF's.The problem with the lost CRLF still exists in V15.83.
Edit: Here's my test-tool (compiled AutoIt), which runs flawlessly in the windows commandline.
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: DONE: Tool output
Fixed in next release (v15.84). Thanks!