Path: csiph.com!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: "R.Wieser"
Newsgroups: microsoft.public.scripting.vbscript
Subject: How do I check is 'wscript.stdout' is writable ?
Date: Sun, 10 Jul 2022 11:33:30 +0200
Organization: Aioe.org NNTP Server
Lines: 17
Message-ID:
Injection-Info: gioia.aioe.org; logging-data="64418"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
Xref: csiph.com microsoft.public.scripting.vbscript:12463
Hello all,
I've got some code that I would like to be able to call from both GUI as
well as console. In it I've got "wscript.stdout.writeline". When started
in the GUI it throws an "invalid handle" error (which I understand).
My question : how do I check if "wscript.stdout" contains a valid handle ?
Remark: I've found a work-around (if {this} is false do not call {that}"),
but rather have a direct check which covers /all/ cases - edge ones or not.
Also, I'd rather not wait for errors to be thrown and than catch them.
Regards,
Rudy Wieser