I'm having trouble..

Ask gaming related questions
anfractus
Posts: 5
Joined: 06 Jan 2016, 10:18

I'm having trouble..

06 Jan 2016, 10:20

$a::
{
send {a}
MouseClick, Left
send {w}
}
return


so basically, this is my code.
What I want to do with it is, after Clicking. I want the "W" to send immediately.
But due to my lack of experience, it does not. It does not send at all.
So my script is stucked at Mouseclick,Left. Does not continue to send {w}
Help me out here.
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: I'm having trouble..

06 Jan 2016, 10:41

There is no reason that script would not send the w. Are you sure that the mouse click is not activating a window/field that cannot accept the w?
anfractus
Posts: 5
Joined: 06 Jan 2016, 10:18

Re: I'm having trouble..

06 Jan 2016, 10:43

Yes I am sure. This is a game script.
So basically, my targeting skill is A, then click it, then the buff skill.
but the buff skill, which is in w, would not send.
Is there any other scripts, that would perform the same as mine?
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: I'm having trouble..

06 Jan 2016, 11:05

There are quite a few possible reasons for why your game is not accepting the w. My first guess would be that the script is simply going too quickly for the game. Try adding a Sleep before the Send {w}.

If that does not help, then take a look at this thread.
User avatar
TheDewd
Posts: 1415
Joined: 19 Dec 2013, 11:16
Location: USA

Re: I'm having trouble..

06 Jan 2016, 11:10

One game I used AutoHotkey with required me to run AutoHotkey as an Administrator before it would work... Might try that as well.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
anfractus
Posts: 5
Joined: 06 Jan 2016, 10:18

Re: I'm having trouble..

06 Jan 2016, 11:29

TheDewd wrote:One game I used AutoHotkey with required me to run AutoHotkey as an Administrator before it would work... Might try that as well.
Been running on my laptop, so everything I do is with administrative powers. But Thank you.
anfractus
Posts: 5
Joined: 06 Jan 2016, 10:18

Re: I'm having trouble..

06 Jan 2016, 11:31

Shadowpheonix wrote:There are quite a few possible reasons for why your game is not accepting the w. My first guess would be that the script is simply going too quickly for the game. Try adding a Sleep before the Send {w}.

If that does not help, then take a look at this thread.

I have tried that. Tried
sleep, 100
send {w}

but it still doesn't work.
I tried
SetKeyDelay, 100
but it still doesn't work. I'm getting frustrated on this. Omg. :headwall:

EDIT: Tried prolonging the sleep, it work. Thanks.
User avatar
PipeDreams
Posts: 149
Joined: 19 Dec 2015, 00:20

Re: I'm having trouble..

19 Jan 2016, 19:05

anfractus wrote:$a::
{
send {a}
MouseClick, Left
send {w}
}
return


so basically, this is my code.
What I want to do with it is, after Clicking. I want the "W" to send immediately.
But due to my lack of experience, it does not. It does not send at all.
So my script is stucked at Mouseclick,Left. Does not continue to send {w}
Help me out here.
The code works fine in notepad for me. So when you say "it doesn't work" am I correct to assume you mean, it will not send the commands in-game? If so, you most likely need to change your

Code: Select all

send method
. Try using

Code: Select all

SendInput
, rather than

Code: Select all

Send
. Also, for that left click, you could try just using

Code: Select all

Click
, rather than

Code: Select all

MouseClick, Left
.
If that doesn't seem to work try being more specific with your send commands.

for example:

Code: Select all

	SendInput, {! DownTemp}
	Sleep, 10
	SendInput, {1 DownTemp}
	Sleep, 100
	SendInput, {! Up}
	Sleep, 10
	SendInput, {1 Up}
Make use of the Up/Down commands. Check out the doc on SendInput details. https://autohotkey.com/docs/commands/Se ... nputDetail

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 11 guests