Have you tried adding a delay? It could be that the sendkeys is happening before the app is ready for input. (Have not tried from LC, but I do something similar in a .vbs file.)
Wsh.AppActivate "Notepad" : WScript.Sleep 500 Thanks, Brian On Oct 12, 2018, 4:38 PM -0500, Tom Glod via use-livecode <use-livecode@lists.runrev.com>, wrote: > Hey folks, is anyone currently successfully using "do as vbscript" and > sending keystrokes to other application windows? > > I have it set to work when i hit a hotkey.... > > this is my vb script: > > Dim Wsh > Set Wsh = CreateObject("Wscript.Shell") > Wsh.AppActivate "Notepad" > Wsh.SendKeys "Test abc" > > it works to focus notepad every time > > but only once in a while do the sendkeys work, what am I doing wrong? > > Thanks, > > Tom > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode