Trying to figure out why exact same code won't work from desktop to laptop?

Ask gaming related questions
woodsman509
Posts: 3
Joined: 23 Sep 2019, 19:57

Trying to figure out why exact same code won't work from desktop to laptop?

30 Sep 2019, 17:47

Look at this:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#ifwinactive, Grand Theft Auto V

^j::

Loop
   {

   Send {Enter}

    Sleep 50
    
    }
    
    Until GetKeyState("w","p") || GetKeyState("a","p") || GetKeyState("s","p") || GetKeyState("d","p")

return
It works like a charm on my desktop to essentially just press enter over and over for me in a game whilst I go do other things. I installed AHK on laptop same basic express installation config. Opened a new file on desktop and then pasted the main body of the code starting with #ifwinactive on line 5. I compiled it and then went to run it and got "Error at line 10 Line Text: Error: This line does not contain a recognized action. The program will exit." Can anyone tell me what that's all about?
gregster
Posts: 3413
Joined: 30 Sep 2013, 06:48

Re: Trying to figure out why exact same code won't work from desktop to laptop?

30 Sep 2019, 18:15

I copied the code from the codebox above and couldn't reproduce the error - compiled or uncompiled (AHK v1.1.31.00 Unicode - 64 bit). Does it work uncompiled for you?
Which AHK version are we talking about?

And there is nothing shown after Line Text: in the error message? Usually it should show the contents of that line...
Perhaps you copied some non-printable characters into the script file somehow... 🤷‍♂️ It happened before. :shifty:
Try to copy the code again from the codebox above - it works for me.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 35 guests