It seems like the problem is indeed with sendkeys happening too quickly..but i have also concluded that when I try the Wscript.Sleep 500 command it is not compiling and my vbscript, and the sendkeys are never sent. when i take the wait out...it works, but too quickly.
so i just need to find a working syntax to halt the vbscript. thanks for the hint...i'll just try a bunch of things to try to narrow down. On Fri, Oct 12, 2018 at 9:52 PM Tom Glod <t...@makeshyft.com> wrote: > Hi Brian, thanks.....I have tried that, seems to work even less than > without it. > > but you might be onto something here.... because sometimes "most" of the > text gets written... mostly none.....and other times all of them. will > keep on testing to see if i can find the cause of this inconsistency. > > Ty > > > > On Fri, Oct 12, 2018 at 6:02 PM Brian Milby via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> 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 >> > _______________________________________________ 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