Jump to content
Sign in to follow this  
fielmann

Problems with HotKeySet

Recommended Posts

fielmann

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?

Share this post


Link to post
Share on other sites
BitByteBit

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

Share this post


Link to post
Share on other sites
fielmann

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")?

Share this post


Link to post
Share on other sites
BitByteBit

10 a hexadecimal value that represents shift, for a full list look in the help file for _IsPressed (press F1 when the cursor is by _IsPressed).

The hexadecimal representation of Ctrl is 11.

Share this post


Link to post
Share on other sites
fielmann

thx again 4 reply

perfect! now it works completely under your workaround-conditions :blink:

I just created a bug-Ticket #1716 ;)

I hope it will be fixed soon...

Share this post


Link to post
Share on other sites
KaFu

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  

×