Jump to content

ALT + Numpad at same time


Nucks
 Share

Recommended Posts

Hello,

I want to thank everyone for their help, even though you didn't realize you were helping me. I have searched the forums and read the help file. I almost have this script down but one thing isn't working right.

HotKeySet("{F12}", "Stop")

HotKeySet("{F11}", "Start")

While 1

Sleep(100)

WEnd

Func Stop()

Exit 0

EndFunc ;==>Stop

Func Start()

While 1

Send('2')

Sleep(500)

Send('5')

Sleep(500)

Send('4')

Sleep(500)

Send('6')

Sleep(3000)

Send('8')

Sleep(3000)

Send('!9')

Sleep(3000)

Send('!7')

Sleep(3000)

Send('6')

Sleep(3000)

Send('9')

Sleep(3000)

Send('2')

Sleep(500)

Send('4')

Sleep(500)

Send('5')

Sleep(500)

Send('!9')

Sleep(3000)

Send('!8')

Sleep(3000)

Send('6')

Sleep(3000)

Send('0')

Sleep(3000)

Send('!9')

Sleep(3000)

Send('-')

WEnd

EndFunc ;==>Start

Any time I use the Send('!9) [anything with !] it does not use it as ALT. The program is acting as if the ! is not there. I experimented and put a + in and it did the shift correctly.

Any thoughts would be appreciated and I will continue to lurk to learn more.

Thank you.

Link to comment
Share on other sites

  • Moderators

Seems to work fine for me:

HotKeySet('!9', '_Test')

Sleep(3000)
Send('!9')

Func _Test()
    MsgBox(64, 'Info', 'Alt + 9 was pressed.')
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I have been working with it some more and I noticed something interesting. Every once in a while it would work for hitting the ! (ALT) but it would never hit the ! everytime it was suppose to.

I even tried doing this script but it wouldn't work on a consist basis.

Send ('{ALTDOWN}')

Send ('9')

Send ('{ALTUP}')

Sleep (3000)

But when I manually work in the program ALT+9 works 100% of the time. I will keep looking around and maybe another suggestion will come.

thank you

Link to comment
Share on other sites

OK, I knew I had seen something that had to do with button presses and games. (I'm assuming this is a game question.) The value is SendKeyDownDelay. It defaults to 5 milliseconds, and it sounds like you need to increase that.

AutoItSetOption("SendKeyDownDelay", 10)

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...