AutoHotkey Community

It is currently May 24th, 2012, 2:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Keystroke Help?
PostPosted: June 2nd, 2007, 1:37 pm 
Offline

Joined: June 2nd, 2007, 1:33 pm
Posts: 9
Hi, I'm new to AutoHotkey.

Im curious how you record a keystroke?

I know how to record a mouse click.

~Lbutton::
MouseGetPos,X, Y
fileappend, MouseClick`, Left`, %X%`, %Y%`n ,C:\script.txt

----------
New Questions - ?

Code:
~F12::
 fileappend, %A_thisHotkey% ,C:\script.txt


And the code I just showed worked...but only to the degree it printed, ~F12 to the .txt file.

When I recieve the input from the user.....say I type in "A"
it displays ~A~A~A~A~A~A in the .txt file...is there a way to keep it relative to amount of time the key was pressed?


Last edited by Parabols on June 2nd, 2007, 3:02 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 2nd, 2007, 2:30 pm 
Offline

Joined: December 30th, 2005, 5:01 pm
Posts: 448
Parabols wrote:
Need some help
What a surprise in the Help forum :P Have you read this topic already?

Parabols wrote:
Im curious how you record a keystroke?

Do I have to understand this as "how you record every keystroke"?
I.e. a keylogger.

Otherwise the principle for a key is equivalent to mouse clicks.
Code:
~F12::MsgBox, You pushed %A_thisHotkey%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 2nd, 2007, 2:33 pm 
Offline

Joined: June 2nd, 2007, 1:33 pm
Posts: 9
^ Hey I changed the title, sorry.

And, no im not trying to design a keylogger.
But thank you for that piece of info.

How would you right that info to a .txt file?

Code:
~F12::
 fileappend, %A_thisHotkey% ,C:\script.txt


And the code I just showed worked...but only to the degree it printed, ~F12 to the .txt file.

When I recieve the input from the user.....say I type in "A"
it displays ~A~A~A~A~A~A in the .txt file...is there a way to keep it relative to amount of time the key was pressed?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 2nd, 2007, 5:10 pm 
Offline

Joined: June 2nd, 2007, 1:33 pm
Posts: 9
Sorry for double posting, but...any more help?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 2nd, 2007, 9:42 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8620
Location: Salem, MA
can you not use the included script recorder? it doesn't measure the time between keystrokes, but it does record the keys

I take it you are trying to write a script that generates scripts. Search the forum for auto script writer - there are improved versions posted.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Albireo, batto, jsquard, jyloup, LazyMan, Pulover, Yahoo [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group