Jump to content

hotkeyset for all keys?


cdkid
 Share

Recommended Posts

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!
Link to comment
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

Link to comment
Share on other sites

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!
Link to comment
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!
Link to comment
Share on other sites

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
Link to comment
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!
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...