Can someone create a script for me

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
argau
Posts: 20
Joined: 21 Jul 2016, 15:05

Can someone create a script for me

26 May 2017, 04:27

So what the script should do: When holding mouse 4 OR 5, it would bind the key A to the key S, W to D, S to A, D to W, Q to E and E to Q and when mouse 4 OR 5 is not held the script would not be active.

Thanks.
Last edited by argau on 26 May 2017, 12:57, edited 2 times in total.
Rohwedder
Posts: 7549
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can someone create a script for me

26 May 2017, 06:45

Hallo,
I can't test it, I have no XButtons

Code: Select all

XButton1::
	XButton := True
	KeyWait, XButton1
	XButton := False
Return
XButton2::
	XButton := True
	KeyWait, XButton2
	XButton := False
Return
#If XButton
	a::s
	w::d
	s::a
	d::w
	q::e
	e::q
#If
argau
Posts: 20
Joined: 21 Jul 2016, 15:05

Re: Can someone create a script for me

26 May 2017, 07:13

Rohwedder wrote:Hallo,
I can't test it, I have no XButtons

Code: Select all

XButton1::
	XButton := True
	KeyWait, XButton1
	XButton := False
Return
XButton2::
	XButton := True
	KeyWait, XButton2
	XButton := False
Return
#If XButton
	a::s
	w::d
	s::a
	d::w
	q::e
	e::q
#If
I don't know anything about AHK coding, what are XButtons?
astrals
Posts: 10
Joined: 25 May 2017, 17:06

Re: Can someone create a script for me

26 May 2017, 07:55

xbutton are the additional mouse button
argau
Posts: 20
Joined: 21 Jul 2016, 15:05

Re: Can someone create a script for me

26 May 2017, 08:42

The script is not working for some reason.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Can someone create a script for me

03 Jun 2017, 07:50

Since you bumped repeatedly, I try to help.

1) The script is perfect. I do have XButton1 and XButton2 on my mouse, and I tested the script by Rohwedder. Perfect.
2) Next step: Either I explain exactly what I did to test, or you explain exactly what you did to test.

What do you prefer?
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: Can someone create a script for me

03 Jun 2017, 08:50

wolf_II wrote:Since you bumped repeatedly, I try to help.

1) The script is perfect. I do have XButton1 and XButton2 on my mouse, and I tested the script by Rohwedder. Perfect.
2) Next step: Either I explain exactly what I did to test, or you explain exactly what you did to test.

What do you prefer?
Your reply is really nice, wolf_II, but - in my opinion - you omitted 2 further options:

3) Tell the forum what you did yourself between each 'bump' post (... or were these posts the sum total of your investment in your problem).
4) Check out DonationCoder.com (where there's no expectation that posters have even attempted to help themselves/read the FAQ's and documentation/searched the forum, etc.).

I have absolutely no criticism of you for responding, just a general query... why? What does this teach the OP about AHK?
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Can someone create a script for me

03 Jun 2017, 09:31

Hi RickC,

It is an attempt to teach OP nothing about AHK specifically, but about how to ask for help in general. I have originally written something to the effect: "I prefer you explain your way.", but I reconsidered and found the "What do you prefer?" to be a little nicer.

@argau: Look here for further information about how to ask for help: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html.
How is that relevant? you might ask ... Consider you want to report a bug in a piece of code (such as Rohwedder's) and you report it as such. Then you should see the relevance of it.
This forum has no intention to enforce any rules about how to ask for help, but there is this in the help file: https://autohotkey.com/docs/Tutorial.htm#s85

Summary: The message I try to get across is: Help your helpers to help you, don't just say "it's not working". explain exactly
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: Can someone create a script for me

03 Jun 2017, 10:04

wolf_II wrote:It is an attempt to teach OP nothing about AHK specifically, but about how to ask for help in general.
Hi wolf_II,

I applaud your assistance... but, for me, the post title "Can someone create a script for me" tends to say it all about the OP's attitude to asking for help. He/she didn't ask for help... he/she quite obviously wants to have a script written for them without any effort on their part... hence my post.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Can someone create a script for me

03 Jun 2017, 10:46

@RickC,

I understand your perspective, I think the same way.

But sometimes, or rather, in this case, I also think he/she might be interested enough (or get interested enough) to join our joy in AHK. (that sentence is rubbish, but I'm sure you understand what I'm trying to say).

I personally came across AHK from the gaming side of things, I wanted to know If I can manage to write an auto-solver for MineSweeper on Win98. My best effort was actually a script written in Enphoria, but along the way I saw attitudes in forums where I browsed for hints how to do things within a certain language. That's why I stopped and stayed with AHK. Maybe OP will also show or develop interest over time?
argau
Posts: 20
Joined: 21 Jul 2016, 15:05

Re: Can someone create a script for me

04 Jun 2017, 03:47

wolf_II wrote:Since you bumped repeatedly, I try to help.

1) The script is perfect. I do have XButton1 and XButton2 on my mouse, and I tested the script by Rohwedder. Perfect.
2) Next step: Either I explain exactly what I did to test, or you explain exactly what you did to test.

What do you prefer?
I don't know what's wrong. I tested the script by opening notepad, held down mouse 4 whilst pressing wasdqe. Also tested with mouse 5.
Last edited by argau on 04 Jun 2017, 04:05, edited 1 time in total.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, hugojans and 96 guests