Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12463

How do I check is 'wscript.stdout' is writable ?

Path csiph.com!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From "R.Wieser" <address@not.available>
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 <tae6dl$1ut2$1@gioia.aioe.org> (permalink)
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

Show key headers only | View raw


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

Back to microsoft.public.scripting.vbscript | Previous | Next | Find similar


Thread

How do I check is 'wscript.stdout' is writable ? "R.Wieser" <address@not.available> - 2022-07-10 11:33 +0200

csiph-web