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 ?

From "R.Wieser" <address@not.available>
Newsgroups microsoft.public.scripting.vbscript
Subject How do I check is 'wscript.stdout' is writable ?
Date 2022-07-10 11:33 +0200
Organization Aioe.org NNTP Server
Message-ID <tae6dl$1ut2$1@gioia.aioe.org> (permalink)

Show all headers | 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