Sign in to follow this  
Followers 0
tsherr

Odd problem sending keystrokes

6 posts in this topic

I'm trying to automate AntiVirusKit scanning, but for some reason, I can't send Alt-O to it to open up options. Alt-O on the keyboard works, and I can send arrow keys and CTRL-TAB with no problems, but Alt-O does nothing. Here is the code:

Run("j:\programs\avk\scan.bat")

WinWait("AntiVirusKit 2004")

WinActivate("AntiVirusKit 2004")

WinWaitActive("AntiVirusKit 2004")

; Open Options

Sleep(500)

Send("^{Tab}")

Sleep(500)

Send("!O")

Sleep(500)

WinActivate("Options")

WinWaitActive("Options")

Sleep(500)

Send("^{Tab}")

Clearly I'm doing something wrong. Any idea what it is?

T

Share this post


Link to post
Share on other sites



I'm trying to automate AntiVirusKit scanning, but for some reason, I can't send Alt-O to it to open up options. Alt-O on the keyboard works, and I can send arrow keys and CTRL-TAB with no problems, but Alt-O does nothing. Here is the code:

Run("j:\programs\avk\scan.bat")

WinWait("AntiVirusKit 2004")

WinActivate("AntiVirusKit 2004")

WinWaitActive("AntiVirusKit 2004")

; Open Options

Sleep(500)

Send("^{Tab}")

Sleep(500)

Send("!O")

Sleep(500)

WinActivate("Options")

WinWaitActive("Options")

Sleep(500)

Send("^{Tab}")

Clearly I'm doing something wrong. Any idea what it is?

T

I have had similar issues with ! so I would just use something like:

Send("{ALT}o")

Share this post


Link to post
Share on other sites

I'm trying to automate AntiVirusKit scanning, but for some reason, I can't send Alt-O to it to open up options. Alt-O on the keyboard works, and I can send arrow keys and CTRL-TAB with no problems, but Alt-O does nothing. Here is the code:

Send("!O")

Clearly I'm doing something wrong. Any idea what it is?

T

from the help file

Some programs are very choosy about capital letters and ALT keys, i.e. "!A" is different to "!a". The first says ALT+SHIFT+A, the second is ALT+a. If in doubt, use lowercase!

did you try Send("!o")

?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Clearly I'm doing something wrong. Any idea what it is?

Not clear to me. I don't have that progam so I can't test it. Do you have any screen shots you can upload? Also, is there more than one window present with the same title "AntiVirusKit 2004"? Very difficult to troubleshoot without having the program.

Edit: Bog got his post in before me. But that is also a very good thing to try using the send ("!o").

Edited by simusphere

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I've run into the same problem from time to time.

Check to make sure that it isn't the upper case letter that is messing it up

Send("!o")

or do the alt down alt up in a separate command.

Send("{AlTDOWN}")

Send("O")

Send("{ALTUP}")

Bah not getting replies in quick enough as I look at several at once..

Edited by Kerros

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

from the help file

did you try Send("!o")

?

Yes! Switching from !O to !o fixed it. Thanks!

T

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0