Jump to content

Problems with HotKeySet


Recommended Posts

Hello,

HotKeySet("+{F11}", "stamp")

While 1

sleep(500)

wend

Func stamp()

Send(@MDAY & "." & @MON & "." & @YEAR & "{TAB}" & 'my text')

EndFunc

start the upper autoit-script

open e.g. notepad.exe

press the Hotkey [shift]+[F11]

you can see the timestamp

now try to type anything else in notepad: [shift] is still pressed! :blink:

the problem appears always after using the Hotkey-function

any ideas? mayby a bug?

Link to comment
Share on other sites

There, I fixed it.

#include<misc.au3>
HotKeySet("+{F11}", "stamp")
While 1
    Sleep(500)
WEnd
Func stamp()
    While _IsPressed("10") ;Wait until shift is release before sending anything...
        Sleep(10)
    WEnd
    Send(@MDAY & "." & @MON & "." & @YEAR & "{TAB}" & 'my text')
EndFunc   ;==>stamp
Edited by BitByteBit
Link to comment
Share on other sites

thanks for your reply and workaround :blink:

seemed to be a bug we should send to John Bennett

While _IsPressed("10") ;Wait until shift is release before sending anything...

What is the meaning of "10"?

I have the same problem with [CTRL]

How to workaround HotKeySet("^{F11}", "stamp2")?

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