wshtextpad

How to avoid this WriteLine failure in TextPad tool?


Cscript.exe with this script

 Wscript.StdOut.WriteLine( "Test " & ChrW(&H2460))

works fine in a CMD window but in a TextPad tool fails with

Microsoft VBScript runtime error: Invalid procedure call or argument

How can I remedy this?

Changing Tool Output default encoding does not remedy this. https://i.sstatic.net/0xFqH.png https://i.sstatic.net/wBy3u.png https://i.sstatic.net/f7FZJ.png

I am running TextPad 7.5.1 in Windows 7 Pro 64-bit.


Solution

  • I reproduced your error by running your command via WScript.

    Change your code to use the WScript.Echo command instead of the WScript.StdOut.WriteLine command. E.g.

    WScript.Echo "Test " & ChrW(&H2460)
    

    This command works in both CScript and WScript. So, this should work for you in your TextPad tool as a valid VBA command.