#1 2014-05-20 07:33

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

PascalScript - Hide console windows

ExecConsoleApp() desperately needs a intWindowStyle param like VBS' Run() method has so console apps can be executed (and their outputs captured) without irritating windows popping up every time!

It need not be as elaborate as intWindowStyle but even a Boolean true/false to show/hide the window would be fantastic.

Last edited by Andrew (2014-05-20 07:36)

Offline

#2 2014-05-20 16:54

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: PascalScript - Hide console windows

Could this be related with a similar problem I have with exiftool? I talk about it here.


If this software has helped you, consider getting your pro version. :)

Offline

#3 2014-05-20 23:50

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: PascalScript - Hide console windows

@SafetyCar: Of course, that is a console app too so if this issue is solved you'll not have to see an irritating window for ExifTool pop up for every single file that is processed, every time you preview or rename. hmm

Last edited by Andrew (2014-05-20 23:52)

Offline

#4 2014-05-21 16:56

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: PascalScript - Hide console windows

This should be addressed in the latest development version.

  • ExecConsoleApp function now forces the external process to be executed in the hidden mode (SW_HIDE flag).

  • ExecuteProgramShow function, similar to ExecuteProgram but it also allows to control how the window is to be shown.

More details on the wiki:
ReNamer:Pascal_Script:Functions#Process_Execution

Offline

#5 2014-05-27 01:40

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: PascalScript - Hide console windows

Haven't tested both but I assume they work as advertised. Was just hoping for an extra param for ExecConsoleApp() but the addition of ExecuteProgramShow() is pure icing on the cake! big_smile

Offline

#6 2014-06-04 14:00

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: PascalScript - Hide console windows

Andrew wrote:

Was just hoping for an extra param for ExecConsoleApp()...

I've decided not to bother with additional parameters for ExecConsoleApp because output is redirected to Output variable and input stream is closed to prevent console application from waiting for user input, so the console window will always be blank (no input, no output).

Offline

Board footer

Powered by FluxBB