Jump to content

Recommended Posts

Posted (edited)

_ispressed('DE')  does not work on German keyboards for quote.

This works on German keyboards.

#include <Misc.au3>
;~ _ispressed('DE')  does not work on German keyboards for quote.
;~ This works on German keyboards.
;~ Place the cursor after the #cs line, since the quote will be written there.
;~ Then press F5
;~ Press ESC to exit
Local $hDLL = DllOpen("user32.dll")

While 1
    If _IsPressed("1B", $hDLL) Then ExitLoop
;~     If _IsPressed("BF", $hDLL) _
;~             Then Beep(1800, 200)          ; if CAPS LOCK, use _WinAPI_GetKeyState() to check keystate

If _IsPressed("BF", $hDLL) And _         ; the key with hash and quote
            _IsPressed("10", $hDLL) And _    ; a shift key is pressed
            (_IsPressed("A1", $hDLL) or _    ; if left shift key
            _IsPressed("A0", $hDLL))  _      ; if right shift key
            Then Beep(1800, 200)
WEnd

DllClose($hDLL)
Beep(800, 200)

#cs
    Place the cursor after this line, since the Quote will be written there.



#ce
Enjoy

Edit: Fixed issue with left shift key

Check for CAPS LOCK not fixed.

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Posted

Not working here (italian keyboard)

this doesn't work:

_IsPressed("BF", $hDLL) And _IsPressed("10", $hDLL) And (_IsPressed("A1", $hDLL) Or _IsPressed("A0", $hDLL))

nor this:

_ispressed('DE')

and even this doesnt

_IsPressed("C0")

..... :(

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Posted

Depends on the keyboard language, the key is VK_OEM_X

Example basend on the result of this thread:

  Quote

 

VK_OEM_3 0xC0
Used for miscellaneous characters; it can vary by keyboard.
For the US standard keyboard, the '`~' key
 
VK_OEM_7 0xDE
Used for miscellaneous characters; it can vary by keyboard.
For the US standard keyboard, the 'single-quote/double-quote' key

 

Just test the all the VK_OEM ( there are nine if i remember well ) and see what working for you.

Nothing is so strong as gentleness. Nothing is so gentle as real strength

 

Posted (edited)

For the italian keyboard the right code for quote is "BF"

 

found it with this little snippet

 

put cursor in console output area and press F5 to run

then press the quote key to see the right code for your keyboard

<snip>

Edited by Melba23
Code removed

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

  • Moderators
Posted

Chimp,

Please read this announcement - the code you posted was in direct contravention of the "watch for all keys" prohibition. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 5/17/2014 at 1:33 PM, Melba23 said:

Chimp,

Please read this announcement - the code you posted was in direct contravention of the "watch for all keys" prohibition. :naughty:

M23

 

opsss

I am sorry :(

done without thinking and without bad intentions

I'll pay more attention next time.

Thanks for cleaning that code.

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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
  • Recently Browsing   0 members

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