Sign in to follow this  
Followers 0
Travis

hotkeyset ?

5 posts in this topic

So i use the following function in this program I am writing

Hotkeyset("{ASC 097},"randomfunc")

For some reason, the ascii character 097 (which corresponds to the lower-case alphabet character "a") only wants to work when I type a CAPITAL A (shift + A)

If I change the ascii code to the proper code for a capital A, it works fine just like it should. But in this case I can't seem to capture a lowercase letter.

Here is the program that I have so far, you can run it and I would be interested in what results you get.

Hotkeyset("{ASC 097}","randomfunc")

While 1

Sleep(100)

WEnd

Func randomfunc()

msgbox(0,"","detected a stroke")

;$file = fileopen("c:\users\travis\desktop\test.txt",1)

;filewriteline($file,"a")a

EndFunc

Note that I've commented-out the lines that involve writing a file to your (likely) non-existant desktop for user: Travis.

Share this post


Link to post
Share on other sites



OK I will try that in a few minutes.

I just followed the help file and it said to use a three number ascii code for letters in the format {ASC 123}, etc.

Share this post


Link to post
Share on other sites

{ASC 097} is the right code for 'a'.


Share this post


Link to post
Share on other sites

lopolop, indeed is the right ascii code. But it doesn't want to capture the a character for some reason. The capital A character captures fine on both codes (like, the correct code and 097).

But I just used Hotkeyset("a","randomfumc") and it worked fine. Maybe the help file was not updated since an older version of autoit or something like that.

Share this post


Link to post
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
Sign in to follow this  
Followers 0