vbscript sendkeys()

Tom Glod tom at makeshyft.com
Fri Oct 12 21:52:14 EDT 2018


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 at 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 at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list