need help to gather 3 scripts in 1

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
flambisounours
Posts: 2
Joined: 24 Sep 2017, 06:14

need help to gather 3 scripts in 1

24 Sep 2017, 06:35

hello everyone,
i just begin using AutoHotkey and i'm blocked when i want joined 3 scripts in 1. (sorry for my bad english)

i explain : i make 3 differents scripts :
1) a macro script for crouch jumping in video game (pressing 2 key at the same time)
2) a macro script to peek left just clicking the key and release not press it.
3) a macro script to peek right just clicking the key and release not press it.

My 3 scripts works very good separately but when i want gather all, i have got an error.

you can see 2 of my scripts just here ;
Capture4444.PNG
Capture4444.PNG (2.89 KiB) Viewed 596 times
Capture11.PNG
Capture11.PNG (5.97 KiB) Viewed 596 times

I want to have only one key combo (F1+F2) to activate/desactivate the macro. So i done that ;
Capture.PNG
Capture.PNG (12.38 KiB) Viewed 596 times
but it didn't worked.
The text error is :
"error at line 46.
Line Text: SendTheKey.
Error:Duplicate label.
The program will exit."

i hope you could help me.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: need help to gather 3 scripts in 1

24 Sep 2017, 08:27

Hello and welcome :wave:
Lable names need be unique, change the name of the duplicate labels, eg, change SendTheKey to SendTheKeyA, SendTheKeyB... Also, you might be interested in the tutorial.

Good luck
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

Re: need help to gather 3 scripts in 1

24 Sep 2017, 08:33

Add Return after this line:

Code: Select all

SendInput, {f}


You use same variable and label/timer names for a and e hotkeys. Change them and You should be fine I guess.
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
flambisounours
Posts: 2
Joined: 24 Sep 2017, 06:14

Re: need help to gather 3 scripts in 1

24 Sep 2017, 09:00

thanks guys. You solved my problems !!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: jeves, Joey5 and 165 guests