Jump to content

IsPressed() for all keys works only for one


Recommended Posts

Hello,

i made a simple screensaver for my company (=renamed exe), that will only run for 2 weeks.

The only problem left is how to make the script exit on any key.

I wrote the following function:

; fyi, misc.au3 is included
Func _anyKey()
    For $k In $aKeys
        If _IsPressed($k) = 1 Then
            Return 1
        EndIf
    Next
    Return 0
EndFunc
oÝ÷ ÛMúh§²²+ªëk&§uÊ'µ¨§±©e¶¤{+'^,¶¸§g¢}ý¶¯x]w¢¸b«²­ßÛ'¢Ø§r[yÖ®¶­sdFÒb33c¶¶W5³%ÒÒ²gV÷C³gV÷C²ÂgV÷C³"gV÷C²ÂgV÷C³BgV÷C²ÂgV÷C³gV÷C²Â¶WF2âââ

But it only works with the c-key so far. When i press any other key, the function returns 0.

Any ideas, why? I'm just interested. At the moment i'm working with a HotKey set on spacebar.

Andi

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