Noob Requires corrected on script lol

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
karlb1
Posts: 6
Joined: 17 Aug 2017, 08:53

Noob Requires corrected on script lol

21 Aug 2017, 12:05

Hi im very very new to this trying to get my head around it all
i have a code to login in to my game however once you start the complied scrip it goes through the process very quickly.

what i need to do is before it goes to login i need it to check if "ctrl" key has been pressed and then it needs to go to "main" in the script which is an alternative login position in the script (further on in the script,)
if if "ctrl" key not presses continue with script

ok this is what i wrote so far but i get error message

If GetKeyState "ctrl" Goto, MAIN

please can you tell me correct way to write this so it understands thanks
Rindis
Posts: 213
Joined: 23 Dec 2013, 13:58
Location: Norway
Contact:

Re: Noob Requires corrected on script lol

21 Aug 2017, 12:19

Code: Select all

GetKeyState, state, Control
	if state = D ; if Control pressed down 
	Gosub, Main ; u should use gosub instead of goto, makes script easier to read

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 338 guests