AutoHotkey Community

It is currently May 26th, 2012, 10:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: keystroke
PostPosted: September 2nd, 2009, 9:11 pm 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
what was the command for autohotkey to simulate someone actually pressing down the button? not the Send, function


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 2nd, 2009, 9:13 pm 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
http://www.autohotkey.com/docs/commands/Send.htm


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 2nd, 2009, 9:27 pm 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
like this?
SendInput, {Raw} {SPACE}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2009, 8:17 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
AHK can only generate artificial input.

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2009, 5:55 am 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
someone made a code awhile back that was able to use hotkeys in games, so lets say i want space to actually press enter, are there any other ways of typing remapping hotkeys?
Code:
Space::Enter
this code is probably far from right but its just a example =)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 10:04 am 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
bump


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 11:02 am 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Sorry about the wording, but I just HAD to :)

There is no other, there is only SEND.

In short, as engunneer said, AHK can only send artificial keystrokes, using Send. Either

Code:
a::b

or
Code:
a::Send, b


BUT, you can experiment with SendMode and SetKeyDelay to try and make it work with your game. Read up in the docs about the commands and see if they make a difference.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 7:02 pm 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
let me try to find the one someone else made and ill post it


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 7:26 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
AHK Help File wrote:
Limitation: AutoHotkey's remapping feature described below is generally not as pure and effective as remapping directly via the Windows registry. For the advantages and disadvantages of each approach, see registry remapping.
:?:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 7:44 pm 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
i dont want to mess with the registery, so your saying autohotkey is not capable of sending commands to a directX game?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2009, 7:48 pm 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Yes it is, I use it regularly.

EDIT: Even DX10 games work. But as I said, you need to experiment with SendMode and/or SetKeyDelay to see which settings work with your game.

EDIT2: Example, with H.A.W.X, I need to use SetKeyDelay, 50, 50 (ANY other values and it doesn't work, I don't know how, but that's how it goes.) Also I need to be sure SendMode is NOT set to Input or Play, else it won't work with HAWX. LFS is not that picky, it accepts almost whatever I throw at it. and so on.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 4:27 am 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
so how would u get those SetKeyDelay numbers? is it just a guessing game? and same about the SendMode how do i know which one? i am playing aion just to let u know, the skill bar hotkeys are annoying i was jus ttrying to move it down a few rows to z-m keys


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 4:33 am 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
More than likely, it's all trial and error. SetMode isn't so bad 'cause there aren't that many choices, but experimenting with SetKeyDelay takes time. I tried multiple settings and didn't get my game to work, then I needed to tinker with the setting for another reason and suddenly I had found settings that also worked with my game.

SetKeyDelay sets the time between keypresses and the time the key stays pressed, If the game doesn't register any keystrokes, I think the first thing one should do, is lengthen the delay and the press time.

I'm sorry I can't be more helpful, but I really don't know any other ways.

You could probably make a hotkey/loop logic to automatically go through multiple setkeydelay settings and each time try if the key works.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:01 am 
Offline

Joined: February 20th, 2008, 1:22 am
Posts: 117
i will try that and get back to u


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 7:14 am 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Just curious, what game are we talking about?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], JSLover, Miguel, rbrtryn and 64 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