vbscript - WScript Sendkey doesn't accept Unicode Characters -


i trying send char "ä" using wscript sendkeys.seems not working . found 1 post does or can vbscript's sendkeys support unicode?

my code:

set sh = wscript.createobject("wscript.shell") sh.run "notepad.exe", 9 wscript.sleep 1000 'wait while load notepad app' sh.sendkeys " äää hello world!"  //buggy line sh.sendkeys "{enter}" wscript.sleep 100' sh.sendkeys "^p" 

but unable understand solution. great if teach me in plain simple code (for solution). not @ wscript(as not area). know begging code(pz forgive me). plz understand situation.

many in advance!!

windows script host's sendkeys doesn't support unicode.

alternatives wsh/sendkeys:

  • use free tool autoit gui automation. can use autoit's send, controlsend or controlsettext commands automate text input.

    run('notepad.exe') winwaitactive("[class:notepad]", "", 10) controlsend("[class:notepad]", "", "edit1", "äää hello world!") 
  • write code in programming language (c++, c# etc) , call windows api sendinput function keyeventf_unicode flag.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -