Sign in to follow this  
Followers 0
cdkid

hotkeyset for all keys?

7 posts in this topic

#1 ·  Posted (edited)

is there a way to <insert topic name here>

and get the key that was pressed? i understand if this sounds like im trying to make a keylogger, if so it's fine if u dont help me.

Edited by cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites



is there a way to <insert topic name here>

and get the key that was pressed? i understand if this sounds like im trying to make a keylogger, if so it's fine if u dont help me.

can you explain just a little more

1 topic

sounds like you want a hotkey

2 first line <blah>

looks like html

3 get key pressed

sounds like _IsPressed()

???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

This?

For $i = 0 To 255
    HotKeySet(Chr($i), "HotKeyFunc")
Next

While True
    Sleep(600000)
WEnd

Func HotKeyFunc()
    MsgBox(0, "Test", @HotKeyPressed)
    Send(@HotKeyPressed)
EndFunc

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

heh, thanks gamerman, just what i wanted :lmao:

**edit**

hhmm, that seems only to work with numbers & special keys (backpsace, tab etc)

Edited by cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

let me clarify what it is that im doing...

im making a log of my key frequencies, just cuz im curious. so what i want is (in psuedo-code)

set all buttons to execute function 'updatelog'

updatelog will make $array[keynum] go up by 1

it will then write to a file 'chr($array[keynum]) - pressed $array[keynum] tims

...hope this helps

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ya, I think the people at autoit make sure it's not easy to make 'bad' programs. You can use this to see the keys that do work and the asc code for them.

Opt("ExpandVarStrings", 1)

For $i = 0 To 255
    HotKeySet(Chr($i), "HotKeyFunc")
Next

$timer = ""
While True
    Sleep(6000)
    If $timer <> "" Then
        If TimerDiff($timer) > 500 Then $timer = ToolTip("")
    EndIf
WEnd

Func HotKeyFunc()
    ToolTip("@HotKeyPressed@@CRLF@-----@CRLF@" & Asc(@HotKeyPressed), 10, 10)
    $timer = TimerInit()
    HotKeySet(@HotKeyPressed)
    Send(@HotKeyPressed)
    HotKeySet(@HotKeyPressed, "HotKeyFunc")
EndFunc

[edit]

Lol, I found the problem. It's in the helpfile.

"Up to 64 simultaneous hotkeys per script may be registered."

Edited by gamerman2360

Share this post


Link to post
Share on other sites

nevermind i've figured it out, thanks again GamerMan


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

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