Jump to content

Odd problem sending keystrokes


tsherr
 Share

Recommended Posts

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

Link to comment
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")
Link to comment
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.

 
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...